From 7c11f353572ee2c0bfb1d2e09881cca97c7d528f Mon Sep 17 00:00:00 2001 From: skudasov Date: Fri, 3 Jul 2026 10:29:56 +0200 Subject: [PATCH 1/3] cleanup --- book/src/SUMMARY.md | 80 +- book/src/framework/chaos/chaos.md | 89 - book/src/framework/chaos/debug-k8s.md | 26 - book/src/framework/components/overview.md | 2 +- book/src/framework/testing.md | 5 - book/src/k8s-test-runner/k8s-test-runner.md | 159 - book/src/legacy.md | 8 +- book/src/lib.md | 366 - book/src/lib/blockchain.md | 45 - book/src/lib/client.md | 11 - book/src/lib/client/aws_secrets_manager.md | 33 - book/src/lib/client/github.md | 28 - book/src/lib/client/grafana.md | 80 - book/src/lib/client/kafka.md | 19 - book/src/lib/client/loki.md | 63 - book/src/lib/client/mockserver.md | 120 - book/src/lib/client/postgres.md | 44 - book/src/lib/client/prometheus.md | 44 - book/src/lib/concurrency.md | 95 - book/src/lib/config/config.md | 363 - book/src/lib/docker/blockchain_nodes.md | 202 - book/src/lib/docker/chainlink_ecosystem.md | 49 - book/src/lib/docker/overview.md | 68 - book/src/lib/docker/test_helpers.md | 10 - book/src/lib/k8s/KUBERNETES.md | 36 - book/src/lib/k8s/REMOTE_RUN.md | 48 - book/src/lib/k8s/TUTORIAL.md | 743 - book/src/lib/k8s/labels.md | 67 - book/src/lib/k8s_new/environments.md | 287 - book/src/lib/k8s_new/overview.md | 29 - book/src/lib/k8s_new/remote_runner.md | 250 - book/src/lib/k8s_new/test_secrets.md | 36 - book/src/lib/logging.md | 23 - .../src/lib/wasp/how-to/run_included_tests.md | 1 - infra/chaosmesh-playground/README.md | 26 - .../chaosmesh-playground/chaos-mesh-crds.yaml | 50617 ---------------- infra/chaosmesh-playground/devbox.json | 38 - infra/chaosmesh-playground/devbox.lock | 236 - infra/chaosmesh-playground/dummy-cluster.yaml | 619 - infra/chaosmesh-playground/kind.yaml | 9 - .../manifests/latency.yaml | 16 - .../manifests/partition.yaml | 21 - .../manifests/stress.yaml | 17 - justfile | 3 - k8s-test-runner/.changeset/.gitkeep | 0 k8s-test-runner/.changeset/v0.6.0.md | 1 - k8s-test-runner/.changeset/v0.7.0.md | 1 - k8s-test-runner/.gitignore | 4 - k8s-test-runner/Dockerfile.testbin | 28 - k8s-test-runner/README.md | 5 - k8s-test-runner/chart/.helmignore | 23 - k8s-test-runner/chart/Chart.yaml | 6 - k8s-test-runner/chart/manual/role.yaml | 78 - k8s-test-runner/chart/templates/job.yaml | 56 - k8s-test-runner/chart/values.yaml | 35 - k8s-test-runner/cmd/internal/create.go | 180 - k8s-test-runner/cmd/internal/ecr.go | 116 - k8s-test-runner/cmd/internal/run.go | 136 - k8s-test-runner/cmd/main.go | 35 - k8s-test-runner/config/config.go | 115 - k8s-test-runner/exec/exec.go | 50 - k8s-test-runner/go.mod | 81 - k8s-test-runner/go.sum | 226 - k8s-test-runner/k8s_client/client.go | 272 - k8s-test-runner/package.json | 5 - k8s-test-runner/package.sh | 39 - k8s-test-runner/runner/runner.go | 112 - 67 files changed, 28 insertions(+), 56707 deletions(-) delete mode 100644 book/src/framework/chaos/chaos.md delete mode 100644 book/src/framework/testing.md delete mode 100644 book/src/k8s-test-runner/k8s-test-runner.md delete mode 100644 book/src/lib.md delete mode 100644 book/src/lib/blockchain.md delete mode 100644 book/src/lib/client.md delete mode 100644 book/src/lib/client/aws_secrets_manager.md delete mode 100644 book/src/lib/client/github.md delete mode 100644 book/src/lib/client/grafana.md delete mode 100644 book/src/lib/client/kafka.md delete mode 100644 book/src/lib/client/loki.md delete mode 100644 book/src/lib/client/mockserver.md delete mode 100644 book/src/lib/client/postgres.md delete mode 100644 book/src/lib/client/prometheus.md delete mode 100644 book/src/lib/concurrency.md delete mode 100644 book/src/lib/config/config.md delete mode 100644 book/src/lib/docker/blockchain_nodes.md delete mode 100644 book/src/lib/docker/chainlink_ecosystem.md delete mode 100644 book/src/lib/docker/overview.md delete mode 100644 book/src/lib/docker/test_helpers.md delete mode 100644 book/src/lib/k8s/KUBERNETES.md delete mode 100644 book/src/lib/k8s/REMOTE_RUN.md delete mode 100644 book/src/lib/k8s/TUTORIAL.md delete mode 100644 book/src/lib/k8s/labels.md delete mode 100644 book/src/lib/k8s_new/environments.md delete mode 100644 book/src/lib/k8s_new/overview.md delete mode 100644 book/src/lib/k8s_new/remote_runner.md delete mode 100644 book/src/lib/k8s_new/test_secrets.md delete mode 100644 book/src/lib/logging.md delete mode 100644 book/src/lib/wasp/how-to/run_included_tests.md delete mode 100644 infra/chaosmesh-playground/README.md delete mode 100644 infra/chaosmesh-playground/chaos-mesh-crds.yaml delete mode 100644 infra/chaosmesh-playground/devbox.json delete mode 100644 infra/chaosmesh-playground/devbox.lock delete mode 100644 infra/chaosmesh-playground/dummy-cluster.yaml delete mode 100644 infra/chaosmesh-playground/kind.yaml delete mode 100644 infra/chaosmesh-playground/manifests/latency.yaml delete mode 100644 infra/chaosmesh-playground/manifests/partition.yaml delete mode 100644 infra/chaosmesh-playground/manifests/stress.yaml delete mode 100644 k8s-test-runner/.changeset/.gitkeep delete mode 100644 k8s-test-runner/.changeset/v0.6.0.md delete mode 100644 k8s-test-runner/.changeset/v0.7.0.md delete mode 100644 k8s-test-runner/.gitignore delete mode 100644 k8s-test-runner/Dockerfile.testbin delete mode 100644 k8s-test-runner/README.md delete mode 100644 k8s-test-runner/chart/.helmignore delete mode 100644 k8s-test-runner/chart/Chart.yaml delete mode 100644 k8s-test-runner/chart/manual/role.yaml delete mode 100644 k8s-test-runner/chart/templates/job.yaml delete mode 100644 k8s-test-runner/chart/values.yaml delete mode 100644 k8s-test-runner/cmd/internal/create.go delete mode 100644 k8s-test-runner/cmd/internal/ecr.go delete mode 100644 k8s-test-runner/cmd/internal/run.go delete mode 100644 k8s-test-runner/cmd/main.go delete mode 100644 k8s-test-runner/config/config.go delete mode 100644 k8s-test-runner/exec/exec.go delete mode 100644 k8s-test-runner/go.mod delete mode 100644 k8s-test-runner/go.sum delete mode 100644 k8s-test-runner/k8s_client/client.go delete mode 100644 k8s-test-runner/package.json delete mode 100755 k8s-test-runner/package.sh delete mode 100644 k8s-test-runner/runner/runner.go diff --git a/book/src/SUMMARY.md b/book/src/SUMMARY.md index 5dc9501e3..33658f76f 100644 --- a/book/src/SUMMARY.md +++ b/book/src/SUMMARY.md @@ -5,9 +5,8 @@ - [Developer Environment](./framework/developer_environment/overview.md) - [Configuration](./framework/developer_environment/toml.md) - [External Environment Configuration](./framework/developer_environment/toml_external_env_integration.md) -- [Basic Usage](./framework/getting_started.md) +- [Usage](./framework/getting_started.md) - [Getting Started](./framework/getting_started.md) -- [Advanced Usage](./framework/configuration.md) - [CLI](./framework/cli.md) - [Configuration](./framework/configuration.md) - [Debugging Tests](framework/components/debug.md) @@ -18,7 +17,6 @@ - [Verifying Contracts](./framework/verify.md) - [CL Node Keys Import](./framework/cl_node_keys_import.md) - [Test Configuration](./framework/test_configuration_overrides.md) - - [Debugging K8s Chaos Tests](framework/chaos/debug-k8s.md) - [Components Cleanup](framework/components/cleanup.md) - [Components Caching](framework/components/caching.md) - [Components Resources](framework/components/resources.md) @@ -28,6 +26,8 @@ - [Compatibility Testing](framework/compat.md) - [Copying Files](framework/copying_files.md) - [Running in Kubernetes](./framework/kubernetes.md) + - [Fork Testing](./framework/fork.md) + - [Fork Testing (Mutating Storage)](./framework/fork_storage.md) - [Observability Stack](framework/observability/observability_stack.md) - [Metrics](framework/observability/metrics.md) - [Logs](framework/observability/logs.md) @@ -37,7 +37,6 @@ - [Observability Stack (VictoriaMetrics)](framework/observability-victoria/observability_stack_victoria.md) - [Logs](framework/observability-victoria/logs.md) - [Components](framework/components/overview.md) - - [Overview](framework/components/overview.md) - [Blockchains](framework/components/blockchains/overview.md) - [EVM](framework/components/blockchains/evm.md) - [Solana](framework/components/blockchains/solana.md) @@ -52,10 +51,6 @@ - [Chip Ingress Set](framework/components/chipingresset/chip_ingress.md) - [Troubleshooting](framework/components/troubleshooting.md) - [Mono Repository Tooling](./monorepo-tools.md) -- [Testing Maturity Model](framework/testing.md) - - [Chaos Testing](./framework/chaos/chaos.md) - - [Fork Testing](./framework/fork.md) - - [Fork Testing (Mutating Storage)](./framework/fork_storage.md) - [Libraries](./libraries.md) - [Overview](./libraries.md) - [WASP](./libs/wasp/overview.md) @@ -64,35 +59,15 @@ - [Stateful test](./libs/wasp/stateful_test.md) - [User Journey test](./libs/wasp/user_journey_test.md) - [Profile test](./libs/wasp/profile_test.md) - - [Testing alerts]() - [Configuration](./libs/wasp/configuration.md) - [k8s](./libs/wasp/k8s.md) - [Components](./libs/wasp/components/overview.md) - - [Alert Checker]() - [Dashboard](./libs/wasp/components/dashboard.md) - [Generator](./libs/wasp/components/generator.md) - [Loki](./libs/wasp/components/loki.md) - [Profile](./libs/wasp/components/profile.md) - [Sampler](./libs/wasp/components/sampler.md) - [Schedule](./libs/wasp/components/schedule.md) - - [BenchSpy](./libs/wasp/benchspy/overview.md) - - [Getting started](./libs/wasp/benchspy/getting_started.md) - - [Your first test](./libs/wasp/benchspy/first_test.md) - - [Simplest metrics](./libs/wasp/benchspy/simplest_metrics.md) - - [Standard Loki metrics](./libs/wasp/benchspy/loki_std.md) - - [Custom Loki metrics](./libs/wasp/benchspy/loki_custom.md) - - [Standard Prometheus metrics](./libs/wasp/benchspy/prometheus_std.md) - - [Custom Prometheus metrics](./libs/wasp/benchspy/prometheus_custom.md) - - [To Loki or not to Loki?](./libs/wasp/benchspy/loki_dillema.md) - - [Real world example](./libs/wasp/benchspy/real_world.md) - - [Debugging](./libs/wasp/benchspy/debugging.md) - - [Reports](./libs/wasp/benchspy/reports/overview.md) - - [Standard Report](./libs/wasp/benchspy/reports/standard_report.md) - - [Adding new QueryExecutor](./libs/wasp/benchspy/reports/new_executor.md) - - [Adding new standard load metric]() - - [Adding new standard resource metric]() - - [Defining a new report](./libs/wasp/benchspy/reports/new_report.md) - - [Adding new storage]() - [How to](./libs/wasp/how-to/overview.md) - [Start local observability stack](./libs/wasp/how-to/start_local_observability_stack.md) - [Chose between RPS and VUs](./libs/wasp/how-to/chose_rps_vu.md) @@ -103,43 +78,30 @@ - [Reuse dashboard components](./libs/wasp/how-to/reuse_dashboard_components.md) - [Parallelize load](./libs/wasp/how-to/parallelise_load.md) - [Debug Loki errors](./libs/wasp/how-to/debug_loki_errors.md) - - [Havoc](./libs/havoc.md) - [Seth](./libs/seth.md) - [Sentinel](./libs/sentinel.md) --- - [Legacy](./legacy.md) - - [Overview](./legacy.md) - - [CTFv1](lib.md) - - [Blockchain](lib/blockchain.md) - - [Concurrency](lib/concurrency.md) - - [Client](lib/client.md) - - [Anvil]() - - [AWS Secrets Manager](lib/client/aws_secrets_manager.md) - - [Github](lib/client/github.md) - - [Grafana](lib/client/grafana.md) - - [Kafka](lib/client/kafka.md) - - [Loki](lib/client/loki.md) - - [MockServer](lib/client/mockserver.md) - - [Postgres](lib/client/postgres.md) - - [Prometheus](lib/client/prometheus.md) - - [Kubernetes](lib/k8s_new/overview.md) - - [Creating environments](lib/k8s_new/environments.md) - - [Using remote runner](lib/k8s_new/remote_runner.md) - - [Passing test secrets](lib/k8s_new/test_secrets.md) - - [chain.link labels](lib/k8s/labels.md) - - [Kubernetes (legacy docs)](lib/k8s/KUBERNETES.md) - - [K8s Remote Run](lib/k8s/REMOTE_RUN.md) - - [K8s Tutorial](lib/k8s/TUTORIAL.md) - - [Config](lib/config/config.md) - - [Docker](lib/docker/overview.md) - - [Blockchain nodes](lib/docker/blockchain_nodes.md) - - [Chainlink ecosystem](lib/docker/chainlink_ecosystem.md) - - [Third party apps]() - - [Test helpers](lib/docker/test_helpers.md) - - [Logging](lib/logging.md) - - [K8s Test Runner](k8s-test-runner/k8s-test-runner.md) + - [Havoc](./libs/havoc.md) + - [BenchSpy](./libs/wasp/benchspy/overview.md) + - [Getting started](./libs/wasp/benchspy/getting_started.md) + - [Your first test](./libs/wasp/benchspy/first_test.md) + - [Simplest metrics](./libs/wasp/benchspy/simplest_metrics.md) + - [Standard Loki metrics](./libs/wasp/benchspy/loki_std.md) + - [Custom Loki metrics](./libs/wasp/benchspy/loki_custom.md) + - [Standard Prometheus metrics](./libs/wasp/benchspy/prometheus_std.md) + - [Custom Prometheus metrics](./libs/wasp/benchspy/prometheus_custom.md) + - [To Loki or not to Loki?](./libs/wasp/benchspy/loki_dillema.md) + - [Real world example](./libs/wasp/benchspy/real_world.md) + - [Debugging](./libs/wasp/benchspy/debugging.md) + - [Reports](./libs/wasp/benchspy/reports/overview.md) + - [Standard Report](./libs/wasp/benchspy/reports/standard_report.md) + - [Adding new QueryExecutor](./libs/wasp/benchspy/reports/new_executor.md) + - [Adding new standard load metric]() + - [Adding new standard resource metric]() + - [Defining a new report](./libs/wasp/benchspy/reports/new_report.md) --- diff --git a/book/src/framework/chaos/chaos.md b/book/src/framework/chaos/chaos.md deleted file mode 100644 index cf09ed318..000000000 --- a/book/src/framework/chaos/chaos.md +++ /dev/null @@ -1,89 +0,0 @@ -# Chaos Testing - -We offer Docker and Kubernetes boilerplates designed to test the resilience of `NodeSet` and `Blockchain`, which you can customize and integrate into your pipeline. - - -## Goals - -We recommend structuring your tests as a linear suite that applies various chaos experiments and verifies the outcomes using a load testing suite. Focus on critical user metrics, such as: - -- The ratio of successful responses to failed responses -- The nth percentile of response latency - -Next, evaluate observability: - -- Ensure proper alerts are triggered during failures (manual or automated) -- Verify the service recovers within the expected timeframe (manual or automated) - -In summary, the **primary** focus is on meeting user expectations and maintaining SLAs, while the **secondary** focus is on observability and making operational part smoother. - - -## Docker - -For Docker, we utilize [Pumba](https://github.com/alexei-led/pumba) to conduct chaos experiments, including: - -- Container reboots -- Network simulations (such as delays, packet loss, corruption, etc., using the tc tool) -- Stress testing for CPU and memory usage - -Additionally, we offer a [resources](../../framework/components/resources.md) API that allows you to test whether your software can operate effectively in low-resource environments. - -You can also use [fake](../../framework/components/mocking.md) package to create HTTP chaos experiments. - -Given the complexity of `Kubernetes`, we recommend starting with `Docker` first. Identifying faulty behavior in your services early—such as cascading latency—can prevent more severe issues when scaling up. Addressing these problems at a smaller scale can save significant time and effort later. - -Check `NodeSet` + `Blockchain` template [here](https://github.com/smartcontractkit/chainlink-testing-framework/blob/main/framework/examples/myproject/chaos/chaos_docker_test.go). - -## Kubernetes - -We utilize a subset of [ChaosMesh](https://chaos-mesh.org/) experiments that can be safely executed on an isolated node group. These include: - -- [Pod faults](https://chaos-mesh.org/docs/simulate-pod-chaos-on-kubernetes/) - -- [Network faults](https://chaos-mesh.org/docs/simulate-network-chaos-on-kubernetes/) – We focus on delay and partition experiments, as others may impact pods outside the dedicated node group. - -- [HTTP faults](https://chaos-mesh.org/docs/simulate-http-chaos-on-kubernetes/) - -Check `NodeSet` + `Blockchain` template [here](https://github.com/smartcontractkit/chainlink-testing-framework/blob/main/framework/examples/myproject/chaos/chaos_k8s_test.go). - -## Blockchain - -We also offer a set of blockchain-specific experiments, which typically involve API calls to blockchain simulators to execute certain actions. These include: - -- Adjusting gas prices - -- Introducing chain reorganizations (setting a new head) - -- Utilizing developer APIs (e.g., Anvil) - -Check [gas](https://github.com/smartcontractkit/chainlink-testing-framework/blob/main/framework/examples/myproject/chaos/chaos_blockchain_evm_gas_test.go) and [reorg](https://github.com/smartcontractkit/chainlink-testing-framework/blob/main/framework/examples/myproject/chaos/chaos_blockchain_evm_reorg_test.go) examples, the same example work for [K8s](https://github.com/smartcontractkit/chainlink-testing-framework/blob/main/framework/examples/myproject/chaos/chaos_k8s_test.go). - -## Debugging and Developing Chaos Suites - -To debug `Docker` applications you can just use `CTFv2` deployments and Docker logs. - -To debug `K8s` please use our [simulator](../chaos/debug-k8s.md). - -The simplest way to start is to spin up the simulator and run `K8s` tests: -``` -cd infra/chaosmesh-playground -devbox run up -k9s -``` -Then go to `default` namespace and check which example pods we have, run the tests -``` -cd framework/examples/myproject/chaos -CTF_CONFIGS=chaos_k8s.toml go test -v -run TestK8sChaos -``` -Reorg and gas tests will fail and that's fine, you should run them on a real `Geth` deployment. - -Grafana's annotations required `GRAFANA_URL` environment variable to be set -``` -export GRAFANA_URL=... -export GRAFANA_TOKEN=... -``` -If you want CRDs to stay use `remove_k8s_chaos` flag in `chaos-k8s.toml` -``` - remove_k8s_chaos = false -``` -Then search for `:podchaos` and `:networkchaos` in `k9s` to inspect the CRDs diff --git a/book/src/framework/chaos/debug-k8s.md b/book/src/framework/chaos/debug-k8s.md index bd4656981..d897d352b 100644 --- a/book/src/framework/chaos/debug-k8s.md +++ b/book/src/framework/chaos/debug-k8s.md @@ -1,27 +1 @@ # Debugging K8s Chaos Tests - -This deployment is used to debug various [ChaosMesh](https://chaos-mesh.org/) with [Kind](https://kind.sigs.k8s.io/) - -Install [DevBox](https://www.jetify.com/devbox) and run your environment -``` -cd infra/chaosmesh-playground -devbox run up -``` - -Check the services -``` -devbox shell -k9s -``` -Apply experiments (inside devbox shell) - -If you running it from any other shell or using `Go` don't forget to apply `kubectl config set-context kind-cm-playground` before! -``` -kubectl apply -f manifests/latency.yaml -``` -Debug `ChaosMesh` using `k9s`, check daemon logs. - -Remove the environment -``` -devbox run down -``` diff --git a/book/src/framework/components/overview.md b/book/src/framework/components/overview.md index 3db19f12c..e78762045 100644 --- a/book/src/framework/components/overview.md +++ b/book/src/framework/components/overview.md @@ -1,5 +1,5 @@ # Components CTF contains of two groups of components: -- Off-chain services like [NodeSet](../../framework/nodeset_environment.md) +- Off-chain services like [NodeSet](../../framework/developer_environment/toml.html#node-set) - Test components, blockchain simulators, fake server diff --git a/book/src/framework/testing.md b/book/src/framework/testing.md deleted file mode 100644 index 302865547..000000000 --- a/book/src/framework/testing.md +++ /dev/null @@ -1,5 +0,0 @@ -# Testing Maturity Model - -Read this [doc](https://github.com/smartcontractkit/chainlink-testing-framework/tree/main/framework/examples/myproject) to understand the rationale behind our testing approach and to explore the stages of maturity in end-to-end testing. - -The following chapters detail specific testing types and best practices for system-level end-to-end testing. \ No newline at end of file diff --git a/book/src/k8s-test-runner/k8s-test-runner.md b/book/src/k8s-test-runner/k8s-test-runner.md deleted file mode 100644 index f8dce0708..000000000 --- a/book/src/k8s-test-runner/k8s-test-runner.md +++ /dev/null @@ -1,159 +0,0 @@ -## Preparing to Run Tests on Staging - -
-This is legacy documentation and code, it'd be sunset on next release -
- -Ensure you complete the following steps before executing tests on the staging environment: - -1. **Connect to the VPN** - -2. **AWS Login with Staging Profile** - - Authenticate to AWS using your staging profile, specifically with the `StagingEKSAdmin` role. Execute the following command: - - ```sh - aws sso login --profile staging - ``` - -3. **Verify Authorization** - - Confirm your authorization status by listing the namespaces in the staging cluster. Run `kubectl get namespaces`. If you see a list of namespaces, this indicates successful access to the staging cluster. - -## Running Tests - -### Creating an Image with the Test Binary - -Before running tests, you must create a Docker image containing the test binary. To do this, execute the `create-test-image` command and provide the path to the test folder you wish to package. This command: - -1. Compiles test binary under `` -2. Creates a docker image with the test binary -3. Pushes the docker image to the image registry (e.g. Staging ECR) - -```sh -go run ./cmd/main.go create-test-image --image-registry-url --image-name "" --image-tag "" "" -``` - -Where `image-tag` should be a descriptive name for your test, such as "mercury-load-tests". - -### Running the Test in Kubernetes - -If a Docker image containing the test binary is available in an image registry (such as staging ECR), use `run` command to execute the test in K8s. - -``` -go run ./cmd/main.go run -c "" -``` - -The TOML config should specify the test runner configuration as follows: - -``` -namespace = "e2e-tests" -rbac_role_name = "" # RBAC role name for the chart -rbac_service_account_name = "" # RBAC service account name for the chart -image_registry_url = "" # URL to the ECR containing the test binary image, e.g., staging ECR URL -image_name = "k8s-test-runner" -image_tag = "" # The image tag to use, like "mercury-load-tests" (see readme above) -job_count = "1" -test_name = "TestMercuryLoad/all_endpoints" -test_timeout = "24h" -test_config_base64_env_name = "LOAD_TEST_BASE64_TOML_CONTENT" -test_config_file_path = "/Users/lukasz/Documents/test-configs/load-staging-testnet.toml" -resources_requests_cpu = "1000m" -resources_requests_memory = "512Mi" -resources_limits_cpu = "2000m" -resources_limits_memory = "1024Mi" -[envs] -WASP_LOG_LEVEL = "info" -TEST_LOG_LEVEL = "info" -MERCURY_TEST_LOG_LEVEL = "info" -[metadata.labels] -"chain.link/component" = "test-runner" -"chain.link/product" = "" -"chain.link/team" = "" -"chain.link/cost-center" = "test-tooling--test" -``` - -> [NOTE] -> Make sure to quote labels with "/" as otherwise parsing them will fail. - -Where: - -- `test_name` is the name of the test to run (must be included in the test binary). -- `test_config_env_name` is the name of the environment variable used to provide the test configuration for the test (optional). -- `test_config_file_path` is the path to the configuration file for the test (optional). - -## Using K8s Test Runner on CI - -### Example - -This example demonstrates the process step by step. First, it shows how to download the Kubernetes Test Runner. Next, it details the use of the Test Runner to create a test binary specifically for the Mercury "e2e_tests/staging_prod/tests/load" test package. Finally, it describes executing the test in Kubernetes using a customized test runner configuration. - -``` -- name: Download K8s Test Runner - run: | - mkdir -p k8s-test-runner - cd k8s-test-runner - curl -L -o k8s-test-runner.tar.gz https://github.com/smartcontractkit/chainlink-testing-framework/releases/download/v0.2.4/test-runner.tar.gz - tar -xzf k8s-test-runner.tar.gz - chmod +x k8s-test-runner-linux-amd64 -``` - -Alternatively, you can place the k8s-test-runner package within your repository and unpack it: - -``` -- name: Unpack K8s Test Runner - run: | - cd e2e_tests - mkdir -p k8s-test-runner - tar -xzf k8s-test-runner-v0.0.1.tar.gz -C k8s-test-runner - chmod +x k8s-test-runner/k8s-test-runner-linux-amd64 -``` - -Then: - -``` -- name: Build K8s Test Runner Image - if: github.event.inputs.test-type == 'load' && github.event.inputs.rebuild-test-image == 'yes' - run: | - cd e2e_tests/k8s-test-runner - - ./k8s-test-runner-linux-amd64 create-test-image --image-registry-url "${{ secrets.AWS_ACCOUNT_ID_STAGING }}.dkr.ecr.${{ secrets.AWS_REGION }}.amazonaws.com" --image-tag "mercury-load-test" "../staging_prod/tests/load" - -- name: Run Test in K8s - run: | - cd e2e_tests/k8s-test-runner - - cat << EOF > config.toml - namespace = "e2e-tests" - rbac_role_name = "" # RBAC role name for the chart - rbac_service_account_name = "" # RBAC service account name for the chart - image_registry_url = "${{ secrets.AWS_ACCOUNT_ID_STAGING }}.dkr.ecr.${{ secrets.AWS_REGION }}.amazonaws.com" - image_name = "k8s-test-runner" - image_tag = "mercury-load-test" - job_count = "1" - chart_path = "./chart" - test_name = "TestMercuryLoad/all_endpoints" - test_timeout = "24h" - resources_requests_cpu = "1000m" - resources_requests_memory = "512Mi" - resources_limits_cpu = "2000m" - resources_limits_memory = "1024Mi" - test_config_base64_env_name = "LOAD_TEST_BASE64_TOML_CONTENT" - test_config_base64 = "${{ steps.conditional-env-vars.outputs.LOAD_TEST_BASE64_TOML_CONTENT }}" - [envs] - WASP_LOG_LEVEL = "info" - TEST_LOG_LEVEL = "info" - MERCURY_TEST_LOG_LEVEL = "info" - [metadata.labels] - "chain.link/component" = "test-runner" - "chain.link/product" = "data-streamsv0.3" - "chain.link/team" = "Data Streams" - "chain.link/cost-center" = "test-tooling-load-test" - EOF - - ./k8s-test-runner-linux-amd64 run -c config.toml -``` - -## Release - -Run `./package ` diff --git a/book/src/legacy.md b/book/src/legacy.md index c1dcda801..323797a4d 100644 --- a/book/src/legacy.md +++ b/book/src/legacy.md @@ -1,3 +1,7 @@ -# Legacy +# Legacy libraries -This chapter contains legacy documentation or code examples that will be sunset in the next major release +Here we list libs and docs which are no longer used and will be sunset next release + +- [v1 Libraries](https://github.com/smartcontractkit/chainlink-testing-framework/tree/main/lib) - docs are removed, Go code will be removed next release +- [Havoc](libs/havoc.md) - migrating to [Griddle Chaos Stack](https://github.com/smartcontractkit/griddle-stacks/tree/main/stacks/chaos) +- [BenchSpy](libs/wasp/benchspy/overview.md) - sunsetting, migrating to using Go code + alerts to assert \ No newline at end of file diff --git a/book/src/lib.md b/book/src/lib.md deleted file mode 100644 index 522f2ede0..000000000 --- a/book/src/lib.md +++ /dev/null @@ -1,366 +0,0 @@ -
- -# Framework v1 (Deprecated) - -[![Lib tag](https://img.shields.io/github/v/tag/smartcontractkit/chainlink-testing-framework?filter=%2Alib%2A)](https://github.com/smartcontractkit/chainlink-testing-framework/tags) -[![Go Report Card](https://goreportcard.com/badge/github.com/smartcontractkit/chainlink-testing-framework)](https://goreportcard.com/report/github.com/smartcontractkit/chainlink-testing-framework) -[![Go Reference](https://pkg.go.dev/badge/github.com/smartcontractkit/chainlink-testing-framework.svg)](https://pkg.go.dev/github.com/smartcontractkit/chainlink-testing-framework) -[![Go Version](https://img.shields.io/github/go-mod/go-version/smartcontractkit/chainlink-testing-framework?filename=./lib/go.mod)](https://go.dev/) -![Tests](https://github.com/smartcontractkit/chainlink-testing-framework/actions/workflows/test.yaml/badge.svg) -![Lint](https://github.com/smartcontractkit/chainlink-testing-framework/actions/workflows/lint.yaml/badge.svg) - -
- -
- -**DEPRECATED: This is v1 version and it is not actively maintained** - -
- - -The purpose of this framework is to: -- Interact with different blockchains -- Configure CL jobs -- Deploy using `docker` -- Deploy using `k8s` - -If you're looking to implement a new chain integration for the testing framework, head over to the [blockchain](lib/blockchain.md) directory for more info. - -## k8s package - -We have a k8s package we are using in tests, it provides: - -- [cdk8s](https://cdk8s.io/) based wrappers -- High-level k8s API -- Automatic port forwarding - -You can also use this package to spin up standalone environments. - -### Local k8s cluster - -Read [here](lib/k8s/KUBERNETES.md) about how to spin up a local cluster - -#### Install - -Set up deps, you need to have `node 14.x.x`, [helm](https://helm.sh/docs/intro/install/) and [yarn](https://classic.yarnpkg.com/lang/en/docs/install/#mac-stable) - -Then use - -```shell -make install_deps -``` - -##### Optional Nix - -We have setup a nix shell which will produce a reliable environment that will behave the same locally and in ci. To use it instead of the above you will need to [install nix](https://nixos.org/download/) - -To start the nix shell run: - -```shell -make nix_shell -``` - -If you install [direnv](https://github.com/direnv/direnv/blob/master/docs/installation.md) you will be able to have your environment start the nix shell as soon as you cd into it once you have allowed the directory via: - -```shell -direnv allow -``` - -### Running tests in k8s - -To read how to run a test in k8s, read [here](lib/k8s/REMOTE_RUN.md) - -### Usage - -#### With env vars (deprecated) - -Create an env in a separate file and run it - -```sh -export CHAINLINK_IMAGE="public.ecr.aws/chainlink/chainlink" -export CHAINLINK_TAG="1.4.0-root" -export CHAINLINK_ENV_USER="Satoshi" -go run k8s/examples/simple/env.go -``` - -For more features follow [tutorial](lib/k8s/TUTORIAL.md) - -#### With TOML config - -It should be noted that using env vars for configuring CL nodes in k8s is deprecated. TOML config should be used instead: - -```toml -[ChainlinkImage] -image="public.ecr.aws/chainlink/chainlink" -version="v2.8.0" -``` - -Check the example here: [env.go](https://github.com/smartcontractkit/chainlink-testing-framework/blob/main/lib/k8s/examples/simple_toml/env_toml_config.go) - -### Development - -#### Running standalone example environment - -```shell -go run k8s/examples/simple/env.go -``` - -If you have another env of that type, you can connect by overriding environment name - -```sh -ENV_NAMESPACE="..." go run k8s/examples/chainlink/env.go -``` - -Add more presets [here](https://github.com/smartcontractkit/chainlink-testing-framework/blob/main/lib/k8s/presets) - -Add more programmatic examples [here](../../lib/k8s/examples/) - -If you have [chaosmesh](https://chaos-mesh.org/) installed in your cluster you can pull and generated CRD in go like that - -```sh -make chaosmesh -``` - -If you need to check your system tests coverage, use [that](../../lib/k8s/TUTORIAL.md#coverage) - -# Chainlink Charts - -This repository contains helm charts used by the chainlink organization mostly in QA. - -## Chart Repository - -You can add the published chart repository by pointing helm to the `gh-pages` branch with a personal access token (PAT) that has at least read-only access to the repository. - -```sh -helm repo add chainlink-qa https://raw.githubusercontent.com/smartcontractkit/qa-charts/gh-pages/ -helm search repo chainlink -``` - -## Releasing Charts - -The following cases will trigger a chart release once a PR is merged into the `main` branch. -Modified packages or new packages get added and pushed to the `gh-pages` branch of the [qa-charts](https://github.com/smartcontractkit/qa-charts) repository. - -- An existing chart is version bumped -- A new chart is added - -Removed charts do not trigger a re-publish, the packages have to be removed and the index file regenerated in the `gh-pages` branch of the [qa-charts](https://github.com/smartcontractkit/qa-charts) repository. - -Note: The qa-charts repository is scheduled to look for changes to the charts once every hour. This can be expedited by going to that repo and running the cd action via github UI. - -# Simulated EVM chains - -We have extended support for execution layer clients in simulated networks. Following ones are supported: - -- `Geth` -- `Nethermind` -- `Besu` -- `Erigon` - -When it comes to consensus layer we currently support only `Prysm`. - -The easiest way to start a simulated network is to use a builder. It allows to configure the network in a fluent way and then start it. For example: - -```go -builder := NewEthereumNetworkBuilder() -cfg, err: = builder. - WithEthereumVersion(EthereumVersion_Eth2). - WithExecutionLayer(ExecutionLayer_Geth). - Build() -``` - -Since we support both `eth1` (aka pre-Merge) and `eth2` (aka post-Merge) client versions, you need to specify which one you want to use. You can do that by calling `WithEthereumVersion` method. There's no default provided. The only exception is when you use custom docker images (instead of default ones), because then we can determine which version it is based on the image version. - -If you want your test to execute as fast as possible go for `eth1` since it's either using a fake PoW or PoA consensus and is much faster than `eth2` which uses PoS consensus (where there is a minimum viable length of slot/block, which is 4 seconds; for `eth1` it's 1 second). If you want to test the latest features, changes or forks in the Ethereum network and have your tests running on a network which is as close as possible to Ethereum Mainnet, go for `eth2`. - -Every component has some default Docker image it uses, but builder has a method that allows to pass custom one: - -```go -builder := NewEthereumNetworkBuilder() -cfg, err: = builder. - WithEthereumVersion(EthereumVersion_Eth2). - WithConsensusLayer(ConsensusLayer_Prysm). - WithExecutionLayer(ExecutionLayer_Geth). - WithCustomDockerImages(map[ContainerType]string{ - ContainerType_Geth: "my-custom-geth-pos-image:my-version"}). - Build() -``` - -When using a custom image you can even further simplify the builder by calling only `WithCustomDockerImages` method. Based on the image name and version we will determine which execution layer client it is and whether it's `eth1` or `eth2` client: - -```go -builder := NewEthereumNetworkBuilder() -cfg, err: = builder. - WithCustomDockerImages(map[ContainerType]string{ - ContainerType_Geth: "ethereum/client-go:v1.13.10"}). - Build() -``` - -In the case above we would launch a `Geth` client with `eth2` network and `Prysm` consensus layer. - -You can also configure epochs at which hardforks will happen. Currently only `Deneb` is supported. Epoch must be >= 1. Example: - -```go -builder := NewEthereumNetworkBuilder() -cfg, err: = builder. - WithConsensusType(ConsensusType_PoS). - WithConsensusLayer(ConsensusLayer_Prysm). - WithExecutionLayer(ExecutionLayer_Geth). - WithEthereumChainConfig(EthereumChainConfig{ - HardForkEpochs: map[string]int{"Deneb": 1}, - }). - Build() -``` - -## Command line - -You can start a simulated network with a single command: - -```sh -go run docker/test_env/cmd/main.go start-test-env private-chain -``` - -By default it will start a network with 1 node running `Geth` and `Prysm`. It will use default chain id of `1337` and won't wait for the chain to finalize at least one epoch. Once the chain is started it will save the network configuration in a `JSON` file, which then you can use in your tests to connect to that chain (and thus save time it takes to start a new chain each time you run your test). - -Following cmd line flags are available: - -```sh - -c, --chain-id int chain id (default 1337) - -l, --consensus-layer string consensus layer (prysm) (default "prysm") - -t, --consensus-type string consensus type (pow or pos) (default "pos") - -e, --execution-layer string execution layer (geth, nethermind, besu or erigon) (default "geth") - -w, --wait-for-finalization wait for finalization of at least 1 epoch (might take up to 5 minutes) - --consensus-client-image string custom Docker image for consensus layer client - --execution-layer-image string custom Docker image for execution layer client - --validator-image string custom Docker image for validator -``` - -To connect to that environment in your tests use the following code: - -```go - builder := NewEthereumNetworkBuilder() - cfg, err := builder. - WithExistingConfigFromEnvVar(). - Build() - - if err != nil { - return err - } - - net, rpc, err := cfg.Start() - if err != nil { - return err - } -``` - -Builder will read the location of chain configuration from env var named `PRIVATE_ETHEREUM_NETWORK_CONFIG_PATH` (it will be printed in the console once the chain starts). - -`net` is an instance of `blockchain.EVMNetwork`, which contains characteristics of the network and can be used to connect to it using an EVM client. `rpc` variable contains arrays of public and private RPC endpoints, where "private" means URL that's accessible from the same Docker network as the chain is running in. - -## Logs -By default, we will save logs of all Docker containers running on the host machine, when the test ends (regardless whether it failed or succeeded). They will be available in the `./logs/` directory. Same goes for dumping the databases of PostgresDBs -used by the Chainlink nodes. These will be saves in the `./db_dumps/` directory. - -## Loki and Grafana - -If you need to pass Loki or Grafana configuration to your tests you can do that by providing the following config: - -```toml -[Logging.Loki] -tenant_id="promtail" -url="https://change.me" -basic_auth_secret="my-secret-auth" -bearer_token_secret="bearer-token" -``` - -Also, do remember that different URL should be used when running in CI and everywhere else. In CI it should be a public endpoint, while in local environment it should be a private one. - -If your test has a Grafana dashboard you should provide the following config: - -```toml -[Logging.Grafana] -base_url="https://your-grafana-url" -dashboard_url="/my-dashboard" -dashboard_uid="my-dashboard-uid" # optional -``` - -## Grouping test execution - -When running tests in CI you're probably interested in grouping logs by test execution, so that you can easily find the logs in Loki. To do that your job should set `RUN_ID` environment variable. In GHA it's recommended to set it to workflow id. If that variable is not set, then a run id will be automatically generated and saved in `.run.id` file, so that it can be shared by tests that are part of the same execution, but are running in different processes. - -## Test Summary - -In order to facilitate displaying information in GH's step summary `testsummary` package was added. It exposes a single function `AddEntry(testName, key string, value interface{}) `. When you call it, it either creates a test summary JSON file or appends to it. The result is is a map of keys with values. - -Example: - -```JSON -{ - "file":[ - { - "test_name":"TestOCRv2Basic", - "value":"./logs/TestOCRv2Basic-2023-12-01T18-00-59-TestOCRv2Basic-38ac1e52-d0a6-48" - } - ], - "loki":[ - { - "test_name":"TestOCRv2Basic", - "value":"https://grafana.ops.prod.cldev.sh/d/ddf75041-1e39-42af-aa46-361fe4c36e9e/ci-e2e-tests-logs?orgId=1\u0026var-run_id=TestOCRv2Basic-38ac1e52-d0a6-48\u0026var-container_id=cl-node-a179ca7d\u0026var-container_id=cl-node-76798f87\u0026var-container_id=cl-node-9ff7c3ae\u0026var-container_id=cl-node-43409b09\u0026var-container_id=cl-node-3b6810bd\u0026var-container_id=cl-node-69fed256\u0026from=1701449851165\u0026to=1701450124925" - } - ] -} -``` - -In GHA after tests have ended we can use tools like `jq` to extract the information we need and display it in step summary. - -# TOML Config - -Basic and universal building blocks for TOML-based config are provided by `config` package. For more information do read [this](lib/config/config.md). - -# ECR Mirror - -An ecr mirror can be used to push images used often in order to bypass rate limit issues from dockerhub. The list of image mirrors can be found in the [matrix here](https://github.com/smartcontractkit/chainlink-testing-framework/blob/main/.github/workflows/update-internal-mirrors.yaml). This currently works with images with version numbers in dockerhub. Support for gcr is coming in the future. The images must also have a version number so putting `latest` will not work. We have a separate list for one offs we want that can be added to [here](https://github.com/smartcontractkit/chainlink-testing-framework/blob/main/.github/actions/update-internal-mirrors/scripts/mirror.json) that does work with gcr and latest images. Note however for `latest` it will only pull it once and will not update it in our mirror if the latest on the public repository has changed, in this case it is preferable to update it manually when you know that you need the new latest and the update will not break your tests. - -For images in the mirrors you can use the INTERNAL_DOCKER_REPO environment variable when running tests and it will use that mirror in place of the public repository. - -We have two ways to add new images to the ecr. The first two requirements are that you create the ecr repository with the same name as the one in dockerhub out in aws and then add that ecr to the infra permissions (ask TT if you don't know how to do this). - -1. If it does not have version numbers or is gcr then you can add it [here](https://github.com/smartcontractkit/chainlink-testing-framework/blob/main/.github/actions/update-internal-mirrors/scripts/mirror.json) -2. You can add to the [mirror matrix](https://github.com/smartcontractkit/chainlink-testing-framework/blob/main/.github/actions/update-internal-mirrors/scripts/update_mirrors.sh) the new image name and an expression to get the latest versions added when the workflow runs. You can check the postgres one used in there for an example but basically the expression should filter out only the latest image or 2 for that particular version when calling the dockerhub endpoint, example curl call `curl -s "https://hub.docker.com/v2/repositories/${image_name}/tags/?page_size=100" | jq -r '.results[].name' | grep -E ${image_expression}` where image_name could be `library/postgres` and image_expression could be `'^[0-9]+\.[0-9]+$'`. Adding your ecr to this matrix should make sure we always have the latest versions for that expression. - -## Debugging HTTP and RPC calls - -```bash -export SETH_LOG_LEVEL=info -export RESTY_DEBUG=true -``` - -## Loki Client - -The `LokiClient` allows you to easily query Loki logs from your tests. It supports basic authentication, custom queries, and can be configured for (Resty) debug mode. - -### Debugging Resty and Loki Client - -```bash -export LOKI_CLIENT_LOG_LEVEL=info -export RESTY_DEBUG=true -``` - -### Example usage: - -```go -auth := LokiBasicAuth{ - Username: os.Getenv("LOKI_LOGIN"), - Password: os.Getenv("LOKI_PASSWORD"), -} - -queryParams := LokiQueryParams{ - Query: `{namespace="test"} |= "test"`, - StartTime: time.Now().AddDate(0, 0, -1), - EndTime: time.Now(), - Limit: 100, - } - -lokiClient := NewLokiClient("https://loki.api.url", "my-tenant", auth, queryParams) -logEntries, err := lokiClient.QueryLogs(context.Background()) -``` diff --git a/book/src/lib/blockchain.md b/book/src/lib/blockchain.md deleted file mode 100644 index 5100655fa..000000000 --- a/book/src/lib/blockchain.md +++ /dev/null @@ -1,45 +0,0 @@ -# Blockchain Clients - -
- -This documentation is deprecated, we are using it in [Chainlink Integration Tests](https://github.com/smartcontractkit/chainlink/tree/develop/integration-tests) - -If you want to test our new products use [v2](../framework/overview.md) -
- -This folder contains the bulk of code that handles integrating with different EVM chains. If you're looking to run tests on a new EVM chain, and are having issues with the default implementation, you've come to the right place. - -### Some Terminology - -- [L2 Chain](https://ethereum.org/en/layer-2/): A Layer 2 chain "branching" off Ethereum. -- [EVM](https://ethereum.org/en/developers/docs/evm/): Ethereum Virtual Machine that underpins the Ethereum blockchain. -- [EVM Compatible](https://blog.thirdweb.com/evm-compatible-blockchains-and-ethereum-virtual-machine/#:~:text=What%20does%20'EVM%20compatibility'%20mean,significant%20changes%20to%20their%20code.): A chain that has some large, underlying differences from how base Ethereum works, but can still be interacted with largely the same way as Ethereum. -- [EIP-1559](https://eips.ethereum.org/EIPS/eip-1559): The Ethereum Improvement Proposal that changed how gas fees are calculated and paid on Ethereum -- Legacy Transactions: Transactions that are sent using the old gas fee calculation method, the one used before EIP-1559. -- Dynamic Fee Transaction: Transactions that are sent using the new gas fee calculation method, the one used after EIP-1559. - -## How Client Integrations Work - -In order to test Chainlink nodes, the `chainlink-testing-framework` needs to be able to interact with the chain that the node is running on. This is done through the `blockchain.EVMClient` interface. The `EVMClient` interface is a wrapper around [geth](https://geth.ethereum.org/) to interact with the blockchain. We conduct all our testing blockchain operations through this wrapper, like sending transactions and monitoring on-chain events. The primary implementation of this wrapper is built for [Ethereum](./ethereum.go). Most others, like the [Metis](./metis.go) and [Optimism](./optimism.go) integrations, extend and modify the base Ethereum implementation. - -## Do I Need a New Integration? - -If you're reading this, probably. The default EVM integration is designed to work with mainnet Ethereum, which covers most other EVM chain interactions, but it's not guaranteed to work with all of them. If you're on a new chain and the test framework is throwing errors while doing basic things like send transactions, receive new headers, or deploy contracts, you'll likely need to create a new integration. The most common issue with new chains (especially L2s) is gas estimations and lack of support for dynamic transactions. - -## Creating a New Integration - -Take a look at the [Metis](./metis.go) integration as an example. Metis is an L2, EVM compatible chain. It's largely the same as the base Ethereum integration, so we'll extend from that. - -```go -type MetisMultinodeClient struct { - *EthereumMultinodeClient -} - -type MetisClient struct { - *EthereumClient -} -``` - -Now we need to let other libraries (like our tests in the main Chainlink repo) that this integration exists. So we add the new implementation to the [known_networks.go](https://github.com/smartcontractkit/chainlink-testing-framework/blob/main/lib/blockchain/known_networks.go) file. We can then add that network to our tests' own [known_networks.go](https://github.com/smartcontractkit/chainlink/blob/develop/integration-tests/known_networks.go) file (it's annoying, there are plans to simplify). - -Now our Metis integration is the exact same as our base Ethereum one, which doesn't do us too much good. I'm assuming you came here to make some changes, so first let's find out what we need to change. This is a mix of reading developer documentation on the chain you're testing and trial and error. Mostly the latter in later stages. In the case of Metis, like many L2s, they [have their own spin on gas fees](https://docs.metis.io/dev/protocol-in-detail/transaction-fees-on-the-metis-platform). They also only support Legacy transactions. So we'll need to override any methods that deal with gas estimations, `Fund`, `DeployContract`, and `ReturnFunds`. diff --git a/book/src/lib/client.md b/book/src/lib/client.md deleted file mode 100644 index cc46e7190..000000000 --- a/book/src/lib/client.md +++ /dev/null @@ -1,11 +0,0 @@ -# Client - -We support a variety of clients that ease communication with following applications: -* [Anvil](./client/anvil.md) -* [AWS Secrets Manager](./client/aws_secrets_manager.md) -* [Github](./client/github.md) -* [Kafka](./client/kafka.md) -* [Loki](./client/loki.md) -* [MockServer](./client/mockserver.md) -* [Postgres](./client/postgres.md) -* [Prometheus](./client/prometheus.md) \ No newline at end of file diff --git a/book/src/lib/client/aws_secrets_manager.md b/book/src/lib/client/aws_secrets_manager.md deleted file mode 100644 index 54cf899d8..000000000 --- a/book/src/lib/client/aws_secrets_manager.md +++ /dev/null @@ -1,33 +0,0 @@ -# AWS Secrets Manager - -This simple client makes it even easier to: -* read -* create -* remove secrets from AWS Secrets Manager. - -Creating a new instance is straight-forward. You should either use environment variables or shared configuration and credentials. - -> [!NOTE] -> Environment variables take precedence over shared credentials. - -## Using environment variables -You can pass required configuration as following environment variables: -* `AWS_ACCESS_KEY_ID` -* `AWS_SECRET_ACCESS_KEY` -* `AWS_REGION` - -## Using shared credentials -If you have shared credentials stored in `.aws/credentials` file, then the easiest way to configure the client is by setting -`AWS_PROFILE` environment variable with the profile name. If that environment variable is not set, the SDK will try to use default profile. - -> [!WARNING] -> Remember, that most probably you will need to manually create a new session for that profile before running your application. - - -> [!NOTE] -> You can read more about configuring the AWS SDK [here](https://docs.aws.amazon.com/sdk-for-go/v1/developer-guide/configuring-sdk.html). - -Once you have an instance of AWS Secrets Manager you gain access to following functions: -* `CreateSecret(key string, val string, override bool) error` -* `GetSecret(key string) (AWSSecret, error)` -* `RemoveSecret(key string, noRecovery bool) error` \ No newline at end of file diff --git a/book/src/lib/client/github.md b/book/src/lib/client/github.md deleted file mode 100644 index aab94058f..000000000 --- a/book/src/lib/client/github.md +++ /dev/null @@ -1,28 +0,0 @@ -# Github - -This small client makes it easy to get `N` latest releases or tags from any Github.com repository. To use it, all you need to have -is a properly scoped access token. - -```go -publicRepoClient := NewGithubClient(WITHOUT_TOKEN) - -// "smartcontractkit", "chainlink" -latestCLReleases, err := publicRepoClient.ListLatestCLCoreReleases(10) -if err != nil { - panic(err) -} - -// "smartcontractkit", "chainlink" -latestCLTags, err := publicRepoClient.ListLatestCLCoreTags(10) -if err != nil { - panic(err) -} - -privateRepoClient := NewGithubClient("my-secret-PAT") -myLatestReleases, err := privateRepoClient.ListLatestReleases("my-org", "my-private-repo", 5) -if err != nil { - panic(err) -} -``` - -There's really not much more to it... \ No newline at end of file diff --git a/book/src/lib/client/grafana.md b/book/src/lib/client/grafana.md deleted file mode 100644 index c66f4329c..000000000 --- a/book/src/lib/client/grafana.md +++ /dev/null @@ -1,80 +0,0 @@ -# Grafana - -> [!NOTE] -> Contrary to other clients, you will find Grafana client in a [separate package & go module](https://github.com/smartcontractkit/chainlink-testing-framework/tree/main/lib/grafana). - -Grafana client encapsulate following functionalities: -* Dashboard creation -* Managing dashboard annotations (CRUD) -* Checking alerts - -# New instance -In order to create a new instance you will need: -* URL -* API token - -For example: -```go -url := "http://grafana.io" -apiToken := "such-a-secret-1&11n" -gc := NewGrafanaClient(url, apiToken) -``` - -# Dashboard creation -You can create a new dashboard defined in JSON with: -```go - -//define your dashboard here -dashboardJson := `` - -request := PostDashboardRequest { - Dashboard: dashboardJson, - FolderId: 5 // change to your folder id -} - -dr, rawResponse, err := gc.PostDashboard(request) -if err != nil { - panic(err) -} - -if rawResponse.StatusCode() != 200 { - panic("response code wasn't 200, but " + rawResponse.StatusCode()) -} - -fmt.Println("Dashboard slug is is " + *dr.Slug) -``` - -# Posting annotations -You can post annotations in a following way: -```go -annDetails := PostAnnotation { - DashboardUID: "some-uid", - Time: time.Now(), - TimeEnd: time.Now().Add(1 * time.Second) - Text: "my test annotation" -} - -r, rawResponse, err := gc.PostAnnotation(annDetails) -if rawResponse.StatusCode() != 200 { - panic("response code wasn't 200, but " + rawResponse.StatusCode()) -} - -fmt.Println("Created annotation with id: " + r.Id) - -``` - -# Checking alerts -You can check alerts firing for a dashboard with UID: -```go -alerts, rawResponse, err := gc.AlertRulerClient.GetAlertsForDashboard("some-uid") -if rawResponse.StatusCode() != 200 { - panic("response code wasn't 200, but " + rawResponse.StatusCode()) -} - -for name, value := range alerts { - fmt.Println("Alert named " + name + "was triggered. Details: " + string(value)) -} -``` - -# Troubleshooting -To enable debug mode for the underlaying HTTP client set `RESTY_DEBUG` environment variable to `true`. \ No newline at end of file diff --git a/book/src/lib/client/kafka.md b/book/src/lib/client/kafka.md deleted file mode 100644 index 308e28415..000000000 --- a/book/src/lib/client/kafka.md +++ /dev/null @@ -1,19 +0,0 @@ -# Kafka - -This is a wrapper over HTTP client that can only return a list of topics from Kafka instance. - -```go -client, err := NewKafkaRestClient(&NewKafkaRestClient{URL: "my-kafka-url"}) -if err != nil { - panic(err) -} - -topis, err := client.GetTopics() -if err != nil { - panic(err) -} - -for _, topic := range topics { - fmt.Println("topic: " + topic) -} -``` \ No newline at end of file diff --git a/book/src/lib/client/loki.md b/book/src/lib/client/loki.md deleted file mode 100644 index bf5f8130e..000000000 --- a/book/src/lib/client/loki.md +++ /dev/null @@ -1,63 +0,0 @@ -# Loki - -Loki client simplifies querying of Loki logs with `LogQL`. - -The way it's designed now implies that: -* you need to create a new client instance for each query -* query results are returned as `string` - -## New instance -To create a new instance you to provide the following at the very least: -* Loki URL -* query to execute -* time range - -```go -// scheme is required -lokiUrl := "http://loki-host.io" -// can be empty -tenantId := "promtail" -basicAuth := LokiBasicAuth{ - Login: "admin", - Password: "oh-so-secret", -} -queryParams := LokiQueryParams{ - Query: "quantile_over_time(0.5, {name='my awesome app'} | json| unwrap duration [10s]) by name", - StartTime: time.Now().Add(1 * time.Hour), - EndTime: time.Now(), - Limit: 1000, -} -lokiClient := client.NewLokiClient(lokiUrl, tenantId, basicAuth, queryParams) -``` - -If your instance doesn't have basic auth you should use an empty string: -```go -basicAuth := LokiBasicAuth{} -``` - -## Executing a query -Once you have the client instance created you can execute the query with: -```go -ctx, cancelFn := context.WithTimeout(context.Background, 3 * time.Minute) -defer cancelFn() -results, err := lokiClient.QueryLogs(ctx) -if err != nil { - panic(err) -} - -for _, logEntry := range results { - fmt.Println("At " + logEntry.Timestamp + " found following log: " + logEntry.Log) -} -``` - -## Log entry types -Loki can return various data types in responses to queries. We will try to convert the following ones to `string`: -* `int` -* `float64` - -If it's neither of these types nor a `string` the client will return an error. Same will happen if `nil` is returned. - -# Troubleshooting -If you find yourself in trouble these two environment variables might help you: -* `RESTY_DEBUG` set to `true` will enable debug mode for the underlaying HTTP client -* `LOKI_CLIENT_LOG_LEVEL` controls log level of Loki client (for supported log levels check [logging package](../logging.md) documentation) \ No newline at end of file diff --git a/book/src/lib/client/mockserver.md b/book/src/lib/client/mockserver.md deleted file mode 100644 index 25f2c8a24..000000000 --- a/book/src/lib/client/mockserver.md +++ /dev/null @@ -1,120 +0,0 @@ -# MockServer - -This client is reponsible for simplifying interaction with MockServer during test execution (e.g. to dynamically create or modify mocked responses). - -## Initialising -There are three ways of intializing the client: -* providing the URL -* providing pointer to `Environment` (CTF's representation of a k8s environment) -* providing pointer to raw `MockserverConfig` - -```go -var myk8sEnv *environment.Environment - -// ... create k8s environment - -k8sMockserver := ConnectMockServer(myk8sEnv) - -mockServerUrl := "http://my.mockserver.instance.io" -myMockServer := ConnectMockServerURL(mockServerUrl) - -customConfig := &MockserverConfig{ - LocalURL: mockServerUrl, - ClusterURL: mockServerUrl, - Headers: map[string]string{"x-secret-auth-header": "such-a-necessary-auth-header"}, -} - -myCustomMockServerClient := NewMockserverClient(customConfig) -``` - -In most cases you should initialise it with `*environment.Environment`, unless you need to pass custom headers to make the connection possible. - -## Typical usages -### Arbitrary mock -You can set any desired behaviour by using `PutExpectations(body interface{}) error` funciton, where the body should be a JSON string conforming to -MockServer's format that consists of a request matcher and corresponding action. For example: -```go -var myk8sEnv *environment.Environment - -returnOk := `{ - "httpRequest": { - "method": "GET", - "path": "/status" - }, - "httpResponse": { - "statusCode": 200, - "body": { - "message": "Service is running" - } - } -}` - -ms := ConnectMockServer(myk8sEnv) -err := ms.PutExpectations(returnOk) -if err != nil { - panic(err) -} -``` - -> [!NOTE] -> You can read more about expecations syntax, including OpenAPI v3 or dynamic expecations with JavaScript [here](https://www.mock-server.com/mock_server/creating_expectations.html). - -### Returning a random integer -To return random integer in the response body, together with `200` status code for all requests with a given path, use: -```go -err := ms.SetRandomValuePath("/api/v2/my_endpoint") -if err != nil { - panic(err) -} -``` - -### Returning a static integer -To return a static integer in the response body, together with `200` status code for all requests with a given path, use: -```go -err := ms.SetValuePath("/api/v2/my_endpoint") -if err != nil { - panic(err) -} -``` - -### Returning a static string -To return a static string in the response body, together with `200` status code for all requests with a given path, use: -```go -err := ms.SetStringValuePath("/api/v2/my_endpoint", "oh-my") -if err != nil { - panic(err) -} -``` - -### Returning arbitrary data -To return arbitrary data in the response body, together with `200` status code for all requests with a given path, use: -```go -err := ms.SetAnyValueResponse("/api/v2/my_endpoint", []int{1, 2, 3}) -if err != nil { - panic(err) -} -``` - -### Returning arbitrary response from external adatper -To mock a response for Chainlink's external adapter for all requests with a given path, use: -```go -var mockedResult interface{} -mockedResult = 5 -err := ms.SetAnyValuePath("/api/v2/my_endpoint", mockedResult) -if err != nil { - panic(err) -} -``` - -It will return a response with following structure: -```json -{ - "id": "", - "data": { - "result": 5 - } -} -``` - -# Troubleshooting -Enabling debug mode for the underlaying HTTP client can be achieved by setting `RESTY_DEBUG` environment variable to `true`. \ No newline at end of file diff --git a/book/src/lib/client/postgres.md b/book/src/lib/client/postgres.md deleted file mode 100644 index 5032e1219..000000000 --- a/book/src/lib/client/postgres.md +++ /dev/null @@ -1,44 +0,0 @@ -# Postgres Connector - -Postgres Connect simplifies connecting to a Postgres DB, by either: -* providing it full db config -* providing it a pointer to `enviroment.Environment` - -# Arbitrary DB - -```go -config := &PostgresConfig{ - Host: "db-host.io", - Port: 5432, - User: "admin", - Password: "oh-so-secret", - DBName: "database", - //SSLMode: -} -connector, err := NewPostgresConnector(config) -if err != nil { - panic(err) -} -``` - -If no `SSLMode` is supplied it will default to `sslmode=disable`. - -# K8s -This code assumes it connects to k8s enviroment created with the CTF, where each Chainlink Node -has an underlaying Postgres DB instance using CTF's default configuration: -```go -var myk8sEnv *environment.Environment - -// ... create k8s environment - -node0PgClient, node0err := ConnectDB(0, myk8sEnv) -if node0err != nil { - panic(node0err) -} - -node1PgClient, node1err := ConnectDB(1, myk8sEnv) -if node1err != nil { - panic(node1err) -} -``` - diff --git a/book/src/lib/client/prometheus.md b/book/src/lib/client/prometheus.md deleted file mode 100644 index 32d05bc00..000000000 --- a/book/src/lib/client/prometheus.md +++ /dev/null @@ -1,44 +0,0 @@ -# Prometheus - -This client is basically a wrapper over the official Prometheus client that gas three usesful functions: -* new client creation -* fetching of all firing alerts -* executing an arbitrary query with time range of `(-infinity, now)` - -## New instance -```go -c, err := NewPrometheusClient("prometheus.io") -if err != nil { - panic(err) -} -``` - -## Get all firing alerts -```go -alerts, err := c.GetAlerts() -if err != nil { - panic(err) -} - -for _, alert := range alerts { - fmt.Println("Found alert: " + alert.Value + "in state: " + alert.AlertState) -} -``` - -## Execute a query -```go -queryResult, err := c.GetQuery(`100 - (avg by (instance) (irate(node_cpu_seconds_total{mode="idle"}[2m])) * 100)`) -if err != nil { - panic(err) -} - -if asV, ok := queryResult.(.model.Vector); ok { - for _, v := range asV { - fmt.Println("Metric data: " +v.Metric) - fmt.Println("Value: " + v.Value) - } -} else { - panic(fmt.Sprintf("Result wasn't a model.Vector, but %T", queryResult)) -} - -``` \ No newline at end of file diff --git a/book/src/lib/concurrency.md b/book/src/lib/concurrency.md deleted file mode 100644 index fcf11f48f..000000000 --- a/book/src/lib/concurrency.md +++ /dev/null @@ -1,95 +0,0 @@ -# Concurrency - -It's a small library that simplifies dividing N tasks between X workers with but two options: -* payload -* early exit on first error - -It was created for parallelising chain interaction with [Seth](../libs/seth.md), where strict ordering -and association of a given private key with a specific contract is required. - -> [!NOTE] -> This library is an overkill if all you need to do is to deploy 10 contract, where each deployment -> consists of a single transaction. -> But... if your deployment flow is a multi-stepped one and it's crucial that all operations are executed -> using the same private key (e.g. due to privilleged access) it might be a good pick. Especially, if -> you don't want to extensively test a native `WaitGroup`/`ErrGroup`-based solution. - -## No payload -If the task to be executed requires no payload (or it's the same for each task) using the tool is much simpler. - -First you need to create an instance of the executor: -```go -l := logging.GetTestLogger(nil) - -executor := concurrency.NewConcurrentExecutor[ContractIntstance, contractResult, concurrency.NoTaskType](l) -``` - -Where generic parameters represent (from left to right): -* type of execution result -* type of channel that holds the results -* type of task payload - -In our case, we want the execution to return `ContractInstance`s, that will be stored by this type: -```go -type contractResult struct { - instance ContractIntstance -} -``` - -And which won't use any payload, as indicated by a no-op `concurrency.NoTaskType`. - -Then, we need to define a function that will be executed for each task. For example: -```go -var deployContractFn = func(channel chan contractResult, errorCh chan error, executorNum int) { - keyNum := executorNum + 1 // key 0 is the root key - - instance, err := client.deployContractFromKey(keyNum) - if err != nil { - errorCh <- err - return - } - - channel <- contractResult{instance: instance} -} -``` - -It needs to have the following signature: -```go -type SimpleTaskProcessorFn[ResultChannelType any] func(resultCh chan ResultChannelType, errorCh chan error, executorNum int) -``` -and send results of successful execution to `resultCh` and errors to `errorCh`. - -Once the processing function is defined all that's left is the execution: -```go -results, err := executor.ExecuteSimple(client.getConcurrency(), numberOfContracts, deployContractFn) -``` - -Parameters for `ExecuteSimple` (without payload) are as follows(from left to right): -* concurrency count (number of parallel executors) -* total number of executions -* function to execute - -`results` contain a slice with results of each execution with `ContractInstance` type. -`err` will be non-nil if any of the executions failed. To get all errors you should call `executor.GetErrors()`. - -## With payload -If your tasks need payload, then two things change. - -First, you need to pass task type, when creating the executor instance: -```go -executor := concurrency.NewConcurrentExecutor[ContractIntstance, contractResult, contractConfiguration](l) -``` - -Here, it's set to dummy: -```go -type contractConfiguration struct{} -``` - -Second, the signature of processing function: -```go -type TaskProcessorFn[ResultChannelType, TaskType any] func(resultCh chan ResultChannelType, errorCh chan error, executorNum int, payload TaskType) -``` -Which now includes a forth parameter representing the payload. And that function's implementation (making use of the payload). - -> [!NOTE] -> You can find the full example [here](https://github.com/smartcontractkit/chainlink-testing-framework/blob/main/lib/concurrency/example_test.go). \ No newline at end of file diff --git a/book/src/lib/config/config.md b/book/src/lib/config/config.md deleted file mode 100644 index 38c04672f..000000000 --- a/book/src/lib/config/config.md +++ /dev/null @@ -1,363 +0,0 @@ -# TOML Config - -
- -This documentation is deprecated, we are using it in [Chainlink Integration Tests](https://github.com/smartcontractkit/chainlink/tree/develop/integration-tests) - -If you want to test our new products use [v2](../framework/overview.md) -
- -These basic building blocks can be used to create a TOML config file. For example: - -```golang -import ( - ctf_config "github.com/smartcontractkit/chainlink-testing-framework/config" - ctf_test_env "github.com/smartcontractkit/chainlink-testing-framework/docker/test_env" -) - -type TestConfig struct { - ChainlinkImage *ctf_config.ChainlinkImageConfig `toml:"ChainlinkImage"` - ChainlinkUpgradeImage *ctf_config.ChainlinkImageConfig `toml:"ChainlinkUpgradeImage"` - Logging *ctf_config.LoggingConfig `toml:"Logging"` - Network *ctf_config.NetworkConfig `toml:"Network"` - Pyroscope *ctf_config.PyroscopeConfig `toml:"Pyroscope"` - PrivateEthereumNetwork *ctf_test_env.EthereumNetwork `toml:"PrivateEthereumNetwork"` -} -``` - -It's up to the user to provide a way to read the config from file and unmarshal it into the struct. You can check [testconfig.go](https://github.com/smartcontractkit/chainlink-testing-framework/blob/main/lib/config/examples/testconfig.go) to see one way it could be done. - -`Validate()` should be used to ensure that the config is valid. Some of the building blocks have also a `Default()` method that can be used to get default values. - -Also, you might find `BytesToAnyTomlStruct(logger zerolog.Logger, filename, configurationName string, target any, content []byte) error` utility method useful for unmarshalling TOMLs read from env var or files into a struct - -## Test Secrets - -Test secrets are not stored directly within the `TestConfig` TOML due to security reasons. Instead, they are passed into `TestConfig` via environment variables. Below is a list of all available secrets. Set only the secrets required for your specific tests, like so: `E2E_TEST_CHAINLINK_IMAGE=qa_ecr_image_url`. - -### Default Secret Loading - -By default, secrets are loaded from the `~/.testsecrets` dotenv file. Example of a local `~/.testsecrets` file: - -```bash -E2E_TEST_CHAINLINK_IMAGE=qa_ecr_image_url -E2E_TEST_CHAINLINK_UPGRADE_IMAGE=qa_ecr_image_url -E2E_TEST_ARBITRUM_SEPOLIA_WALLET_KEY=wallet_key -``` - -### All E2E Test Secrets - -| Secret | Env Var | Example | -| ----------------------------- | ------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| Chainlink Image | `E2E_TEST_CHAINLINK_IMAGE` | `E2E_TEST_CHAINLINK_IMAGE=qa_ecr_image_url` | -| Chainlink Upgrade Image | `E2E_TEST_CHAINLINK_UPGRADE_IMAGE` | `E2E_TEST_CHAINLINK_UPGRADE_IMAGE=qa_ecr_image_url` | -| Wallet Key per network | `E2E_TEST_(.+)_WALLET_KEY` or `E2E_TEST_(.+)_WALLET_KEY_(\d+)$` | `E2E_TEST_ARBITRUM_SEPOLIA_WALLET_KEY=wallet_key` or `E2E_TEST_ARBITRUM_SEPOLIA_WALLET_KEY_1=wallet_key_1`, `E2E_TEST_ARBITRUM_SEPOLIA_WALLET_KEY_2=wallet_key_2` for multiple keys per network | -| RPC HTTP URL per network | `E2E_TEST_(.+)_RPC_HTTP_URL` or `E2E_TEST_(.+)_RPC_HTTP_URL_(\d+)$` | `E2E_TEST_ARBITRUM_SEPOLIA_RPC_HTTP_URL=url` or `E2E_TEST_ARBITRUM_SEPOLIA_RPC_HTTP_URL_1=url`, `E2E_TEST_ARBITRUM_SEPOLIA_RPC_HTTP_URL_2=url` for multiple http urls per network | -| RPC WebSocket URL per network | `E2E_TEST_(.+)_RPC_WS_URL` or `E2E_TEST_(.+)_RPC_WS_URL_(\d+)$` | `E2E_TEST_ARBITRUM_RPC_WS_URL=ws_url` or `E2E_TEST_ARBITRUM_RPC_WS_URL_1=ws_url_1`, `E2E_TEST_ARBITRUM_RPC_WS_URL_2=ws_url_2` for multiple ws urls per network | -| Loki Tenant ID | `E2E_TEST_LOKI_TENANT_ID` | `E2E_TEST_LOKI_TENANT_ID=tenant_id` | -| Loki Endpoint | `E2E_TEST_LOKI_ENDPOINT` | `E2E_TEST_LOKI_ENDPOINT=url` | -| Loki Basic Auth | `E2E_TEST_LOKI_BASIC_AUTH` | `E2E_TEST_LOKI_BASIC_AUTH=token` | -| Loki Bearer Token | `E2E_TEST_LOKI_BEARER_TOKEN` | `E2E_TEST_LOKI_BEARER_TOKEN=token` | -| Grafana Bearer Token | `E2E_TEST_GRAFANA_BEARER_TOKEN` | `E2E_TEST_GRAFANA_BEARER_TOKEN=token` | -| Pyroscope Server URL | `E2E_TEST_PYROSCOPE_SERVER_URL` | `E2E_TEST_PYROSCOPE_SERVER_URL=url` | -| Pyroscope Key | `E2E_TEST_PYROSCOPE_KEY` | `E2E_TEST_PYROSCOPE_KEY=key` | - -### Run GitHub Workflow with Your Test Secrets - -By default, GitHub workflows execute with a set of predefined secrets. However, you can use custom secrets by specifying a unique identifier for your secrets when running the `gh workflow` command. - -#### Steps to Use Custom Secrets - -1. **Upload Local Secrets to GitHub Secrets Vault:** - - - **Install `ghsecrets` tool:** - Install the `ghsecrets` tool to manage GitHub Secrets more efficiently. - - ```bash - go install github.com/smartcontractkit/chainlink-testing-framework/tools/ghsecrets@latest - ``` - - If you use `asdf`, run `asdf reshim` - - - **Upload Secrets:** - Run `ghsecrets set` from local core repo to upload the content of your `~/.testsecrets` file to the GitHub Secrets Vault and generate a unique identifier (referred to as `your_ghsecret_id`). - - ```bash - cd path-to-chainlink-core-repo - ``` - - ```bash - ghsecrets set - ``` - - For more details about `ghsecrets`, visit https://github.com/smartcontractkit/chainlink-testing-framework/tree/main/tools/ghsecrets#faq - -2. **Execute the Workflow with Custom Secrets:** - - To use the custom secrets in your GitHub Actions workflow, pass the `-f test_secrets_override_key={your_ghsecret_id}` flag when running the `gh workflow` command. - ```bash - gh workflow run -f test_secrets_override_key={your_ghsecret_id} - ``` - -#### Default Secrets Handling - -If the `test_secrets_override_key` is not provided, the workflow will default to using the secrets preconfigured in the CI environment. - -### Creating New Test Secrets in TestConfig - -When adding a new secret to the `TestConfig`, such as a token or other sensitive information, the method `ReadConfigValuesFromEnvVars()` in `config/testconfig.go` must be extended to include the new secret. Ensure that the new environment variable starts with the `E2E_TEST_` prefix. This prefix is crucial for ensuring that the secret is correctly propagated to Kubernetes tests when using the Remote Runner. - -Here’s a quick checklist for adding a new test secret: - -- Add the secret to ~/.testsecrets with the `E2E_TEST_` prefix to ensure proper handling. -- Extend the `config/testconfig.go:ReadConfigValuesFromEnvVars()` method to load the secret in `TestConfig` -- Add the secrets to [All E2E Test Secrets](#all-e2e-test-secrets) table. - -## Working example - -For a full working example making use of all the building blocks see [testconfig.go](https://github.com/smartcontractkit/chainlink-testing-framework/blob/main/lib/config/examples/testconfig.go). It provides methods for reading TOML, applying overrides and validating non-empty config blocks. It supports 4 levels of overrides, in order of precedence: - -- `BASE64_CONFIG_OVERRIDE` env var -- `overrides.toml` -- `[product_name].toml` -- `default.toml` - -All you need to do now to get the config is execute `func GetConfig(configurationName string, product string) (TestConfig, error)`. It will first look for folder with file `.root_dir` and from there it will look for config files in all subfolders, so that you can place the config files in whatever folder(s) work for you. It assumes that all configuration versions for a single product are kept in `[product_name].toml` under different configuration names (that can represent anything you want: a single test, a test type, a test group, etc). - -Overrides of config files are done in a super-simple way. We try to unmarshall consecutive files into the same struct. Since it's all pointer based only not-nil keys are overwritten. - -## IMPORTANT! - -It is **required** to add `overrides.toml` to `.gitignore` in your project, so that you don't accidentally commit it as it might contain secrets. - -## Network config (and default RPC endpoints) - -Some more explanation is needed for the `NetworkConfig`: - -```golang -type NetworkConfig struct { - // list of networks that should be used for testing - SelectedNetworks []string `toml:"selected_networks"` - // map of network name to EVMNetworks where key is network name and value is a pointer to EVMNetwork - // if not set, it will try to find the network from defined networks in MappedNetworks under known_networks.go - // it doesn't matter if you use `arbitrum_sepolia` or `ARBITRUM_SEPOLIA` or even `arbitrum_SEPOLIA` as key - // as all keys will be uppercased when loading the Default config - EVMNetworks map[string]*blockchain.EVMNetwork `toml:"EVMNetworks,omitempty"` - // map of network name to ForkConfigs where key is network name and value is a pointer to ForkConfig - // only used if network fork is needed, if provided, the network will be forked with the given config - // networkname is fetched first from the EVMNetworks and - // if not defined with EVMNetworks, it will try to find the network from defined networks in MappedNetworks under known_networks.go - ForkConfigs map[string]*ForkConfig `toml:"ForkConfigs,omitempty"` - // map of network name to RPC endpoints where key is network name and value is a list of RPC HTTP endpoints - RpcHttpUrls map[string][]string `toml:"RpcHttpUrls"` - // map of network name to RPC endpoints where key is network name and value is a list of RPC WS endpoints - RpcWsUrls map[string][]string `toml:"RpcWsUrls"` - // map of network name to wallet keys where key is network name and value is a list of private keys (aka funding keys) - WalletKeys map[string][]string `toml:"WalletKeys"` -} - -func (n *NetworkConfig) Default() error { - ... -} -``` - -Sample TOML config: - -```toml -selected_networks = ["arbitrum_goerli", "optimism_goerli", "new_network"] - -[EVMNetworks.new_network] -evm_name = "new_test_network" -evm_chain_id = 100009 -evm_simulated = true -evm_chainlink_transaction_limit = 5000 -evm_minimum_confirmations = 1 -evm_gas_estimation_buffer = 10000 -client_implementation = "Ethereum" -evm_supports_eip1559 = true -evm_default_gas_limit = 6000000 - -[ForkConfigs.new_network] -url = "ws://localhost:8546" -block_number = 100 - -[RpcHttpUrls] -arbitrum_goerli = ["https://devnet-2.mt/ABC/rpc/"] -new_network = ["http://localhost:8545"] - -[RpcWsUrls] -arbitrum_goerli = ["wss://devnet-2.mt/ABC/ws/"] -new_network = ["ws://localhost:8546"] - -[WalletKeys] -arbitrum_goerli = ["1810868fc221b9f50b5b3e0186d8a5f343f892e51ce12a9e818f936ec0b651ed"] -optimism_goerli = ["1810868fc221b9f50b5b3e0186d8a5f343f892e51ce12a9e818f936ec0b651ed"] -new_network = ["ac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80"] -``` - -Whenever you are adding a new EVMNetwork to the config, you can either - -- provide the rpcs and wallet keys in RpcUrls and WalletKeys. Like in the example above, you can see that `new_network` is added to the `selected_networks` and `EVMNetworks` and then the rpcs and wallet keys are provided in `RpcHttpUrls`, `RpcWsUrls` and `WalletKeys` respectively. -- provide the rpcs and wallet keys in the `EVMNetworks` itself. Like in the example below, you can see that `new_network` is added to the `selected_networks` and `EVMNetworks` and then the rpcs and wallet keys are provided in `EVMNetworks` itself. - -```toml - -selected_networks = ["new_network"] - -[EVMNetworks.new_network] -evm_name = "new_test_network" -evm_chain_id = 100009 -evm_urls = ["ws://localhost:8546"] -evm_http_urls = ["http://localhost:8545"] -evm_keys = ["ac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80"] -evm_simulated = true -evm_chainlink_transaction_limit = 5000 -evm_minimum_confirmations = 1 -evm_gas_estimation_buffer = 10000 -client_implementation = "Ethereum" -evm_supports_eip1559 = true -evm_default_gas_limit = 6000000 -``` - -If your config struct looks like that: - -```golang - -type TestConfig struct { - Network *ctf_config.NetworkConfig `toml:"Network"` -} -``` - -then your TOML file should look like that: - -```toml -[Network] -selected_networks = ["arbitrum_goerli","new_network"] - -[Network.EVMNetworks.new_network] -evm_name = "new_test_network" -evm_chain_id = 100009 -evm_simulated = true -evm_chainlink_transaction_limit = 5000 -evm_minimum_confirmations = 1 -evm_gas_estimation_buffer = 10000 -client_implementation = "Ethereum" -evm_supports_eip1559 = true -evm_default_gas_limit = 6000000 - -[Network.RpcHttpUrls] -arbitrum_goerli = ["https://devnet-2.mt/ABC/rpc/"] -new_network = ["http://localhost:8545"] - -[Network.RpcWsUrls] -arbitrum_goerli = ["ws://devnet-2.mt/ABC/rpc/"] -new_network = ["ws://localhost:8546"] - -[Network.WalletKeys] -arbitrum_goerli = ["1810868fc221b9f50b5b3e0186d8a5f343f892e51ce12a9e818f936ec0b651ed"] -new_network = ["ac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80"] -``` - -If in your product config you want to support case-insensitive network names and map keys remember to run `NetworkConfig.UpperCaseNetworkNames()` on your config before using it. - -## Providing custom values in the CI - -Up to this point when we wanted to modify some dynamic tests parameters in the CI we would simply set env vars. That approach won't work anymore. The way to go around it is to build a TOML file, `base64` it, mask it and then set is as `BASE64_CONFIG_OVERRIDE` env var that will be read by tests. Here's an example of a working snippet of how that could look: - -```bash -convert_to_toml_array() { - local IFS=',' - local input_array=($1) - local toml_array_format="[" - - for element in "${input_array[@]}"; do - toml_array_format+="\"$element\"," - done - - toml_array_format="${toml_array_format%,}]" - echo "$toml_array_format" -} - -selected_networks=$(convert_to_toml_array "$SELECTED_NETWORKS") - -if [ -n "$PYROSCOPE_SERVER" ]; then - pyroscope_enabled=true -else - pyroscope_enabled=false -fi - -if [ -n "$ETH2_EL_CLIENT" ]; then - execution_layer="$ETH2_EL_CLIENT" -else - execution_layer="geth" -fi - -cat << EOF > config.toml -[Network] -selected_networks=$selected_networks - -[ChainlinkImage] -image="$CHAINLINK_IMAGE" -version="$CHAINLINK_VERSION" - -[Pyroscope] -enabled=$pyroscope_enabled -server_url="$PYROSCOPE_SERVER" -environment="$PYROSCOPE_ENVIRONMENT" -key_secret="$PYROSCOPE_KEY" - -[Logging.Loki] -tenant_id="$LOKI_TENANT_ID" -url="$LOKI_URL" -basic_auth_secret="$LOKI_BASIC_AUTH" -bearer_token_secret="$LOKI_BEARER_TOKEN" - -[Logging.Grafana] -url="$GRAFANA_URL" -EOF - -BASE64_CONFIG_OVERRIDE=$(cat config.toml | base64 -w 0) -echo ::add-mask::$BASE64_CONFIG_OVERRIDE -echo "BASE64_CONFIG_OVERRIDE=$BASE64_CONFIG_OVERRIDE" >> $GITHUB_ENV -``` - -**These two lines in that very order are super important** - -```bash -BASE64_CONFIG_OVERRIDE=$(cat config.toml | base64 -w 0) -echo ::add-mask::$BASE64_CONFIG_OVERRIDE -``` - -`::add-mask::` has to be called only after env var has been set to it's final value, otherwise it won't be recognized and masked properly and secrets will be exposed in the logs. - -## Providing custom values for local execution - -For local execution it's best to put custom variables in `overrides.toml` file. - -## Providing custom values in k8s - -It's easy. All you need to do is: - -- Create TOML file with these values -- Base64 it: `cat your.toml | base64` -- Set the base64 result as `BASE64_CONFIG_OVERRIDE` environment variable. - -`BASE64_CONFIG_OVERRIDE` will be automatically forwarded to k8s (as long as it is set and available to the test process), when creating the environment programmatically via `environment.New()`. - -Quick example: - -```bash -BASE64_CONFIG_OVERRIDE=$(cat your.toml | base64) go test your-test-that-runs-in-k8s ./file/with/your/test -``` - -# Not moved to TOML - -Not moved to TOML: - -- `SLACK_API_KEY` -- `SLACK_USER` -- `SLACK_CHANNEL` -- `TEST_LOG_LEVEL` -- `CHAINLINK_ENV_USER` -- `DETACH_RUNNER` -- `ENV_JOB_IMAGE` -- most of k8s-specific env variables were left untouched diff --git a/book/src/lib/docker/blockchain_nodes.md b/book/src/lib/docker/blockchain_nodes.md deleted file mode 100644 index 9f312d406..000000000 --- a/book/src/lib/docker/blockchain_nodes.md +++ /dev/null @@ -1,202 +0,0 @@ -# Blockchain Nodes - -If you plan to experiment with these Docker containers, **use an existing Ethereum environment builder** rather than assembling components manually. This is particularly important for Proof-of-Stake (PoS) networks, where the setup involves multi-stage operations and shared state across multiple containers. - -Each supported client has a default image version defined [here](https://github.com/smartcontractkit/chainlink-testing-framework/blob/main/lib/docker/ethereum/images.go). Clients (except Reth) are available in two flavors: -- **Proof-of-Stake (PoS)**: Ethereum 2.0. -- **Proof-of-Work/Authority (PoW/PoA)**: Ethereum 1.0. - -Reth supports only PoS networks. - -These ephemeral networks use a simplified configuration with a single blockchain node. For PoS, three containers simulate this: -- Execution layer -- Consensus layer -- Validator - -> [!NOTE] -> We use a fork of [Ethereum Genesis Generator](https://github.com/ethpandaops/ethereum-genesis-generator) to create genesis files for PoS networks. - ---- - -## Execution Layer Clients -The following execution layer clients are available: -- Besu -- Erigon -- Geth -- Nethermind -- Reth - -## Consensus Layer Client -- **Prysm** (the only available consensus client). - ---- - -# Quick Start - -The simplest way to start an Ethereum network is by specifying the execution layer only: - -```go -builder := NewEthereumNetworkBuilder() -cfg, err := builder. - WithExecutionLayer(types.ExecutionLayer_Nethermind). - Build() -if err != nil { - panic(err) -} - -net, rpcs, err := cfg.Start() -if err != nil { - panic(err) -} -``` -If no version is specified, **Ethereum 1.0 (pre-Merge)** will be used. - -### Starting Ethereum 2.0 Networks -To start an Ethereum 2.0 network, add the Ethereum version parameter: - -```go -builder := NewEthereumNetworkBuilder() -cfg, err := builder. - WithEthereumVersion(config_types.EthereumVersion_Eth2). - WithExecutionLayer(config_types.ExecutionLayer_Geth). - Build() -if err != nil { - panic(err) -} - -net, rpcs, err := cfg.Start() -if err != nil { - panic(err) -} -``` -> [!NOTE] -> Booting Ethereum 2.0 networks takes longer due to the additional containers. Wait times of up to 1 minute are common. - ---- - -## Custom Docker Images -To use custom Docker images instead of the defaults: - -```go -builder := NewEthereumNetworkBuilder() -cfg, err := builder. - WithCustomDockerImages(map[config.ContainerType]string{ - config.ContainerType_ExecutionLayer: "ethereum/client-go:v1.15.0", - }). - Build() -if err != nil { - panic(err) -} - -net, rpcs, err := cfg.Start() -if err != nil { - panic(err) -} -``` -### Available Container Types -```go -const ( - ContainerType_ExecutionLayer ContainerType = "execution_layer" - ContainerType_ConsensusLayer ContainerType = "consensus_layer" - ContainerType_ConsensusValidator ContainerType = "consensus_validator" - ContainerType_GenesisGenerator ContainerType = "genesis_generator" - ContainerType_ValKeysGenerator ContainerType = "val_keys_generator" -) -``` -> [!NOTE] -> Use the `latest_available` tag for the most recent release, including pre-releases, or the `latest_stable` tag for the latest officially stable release. The `latest_available` may include beta or development versions, whereas `latest_stable` ensures compatibility with production environments. - ---- - -# Advanced Options - -## Connect to Existing Docker Networks -By default, a new random Docker network is created. To use an existing one: - -```go -builder := NewEthereumNetworkBuilder() -cfg, err := builder. - WithExecutionLayer(types.ExecutionLayer_Nethermind). - WithDockerNetworks([]string{"my-existing-network"}). - Build() -``` - -## Chain Customization - -### Ethereum 2.0 Parameters -- **Seconds per slot**: This defines how many seconds validators have to propose and vote on blocks. Lower values accelerate block production and epoch finalization but can cause issues if validators fail to keep up. The minimum allowed value is `3`. -- **Slots per epoch**: Determines the number of slots (voting rounds) per epoch. Lower values mean epochs finalize faster, but fewer voting rounds can impact network stability. The minimum value is `2`. -- **Genesis delay**: The extra delay (in seconds) before the genesis block starts. This ensures all containers (execution, consensus, and validator) are up and running before block production begins. -- **Validator count**: Specifies the number of validators in the network. A higher count increases the robustness of block validation but requires more resources. The minimum allowed value is `4`. - -### General Parameters -- **ChainID**: Integer value for the chain. -- **Addresses to fund**: Pre-fund accounts in the genesis block. - -### Default Configuration -```toml -seconds_per_slot=12 -slots_per_epoch=6 -genesis_delay=15 -validator_count=8 -chain_id=1337 -addresses_to_fund=["0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266"] -``` - ---- - -## Log Level -Customize node log levels (default: `info`): -```go -WithNodeLogLevel("debug") -``` -Supported values: -- `trace`, `debug`, `info`, `warn`, `error` - -## Wait for Finalization (Ethereum 2.0) -Wait until the first epoch finalizes: -```go -WithWaitingForFinalization() -``` - ---- - -# Accessing Containers -The `builder.Start()` function returns: -1. **Network configuration**: Input to test clients. -2. **RPC endpoints**: - - **Public**: Accessible externally. - - **Private**: Internal to the Docker network. - -### Endpoint Usage -- Use **public endpoints** for Ethereum clients deploying contracts, interacting with the chain, etc. -- Use **private endpoints** for Chainlink nodes within the same Docker network. - ---- - -# Ethereum 2.0 Container Creation Sequence -The following sequence explains Ethereum 2.0 container startup: - -```mermaid -sequenceDiagram - participant Host - participant Validator Keys Generator - participant Genesis Generator - participant Execution Layer - participant Beacon Chain (Consensus Layer) - participant Validator - participant After Genesis Helper - participant User - - Validator Keys Generator->>Host: Generate validator keys - Genesis Generator->>Host: Create genesis files - Host->>Execution Layer: Start with genesis - Host->>Beacon Chain (Consensus Layer): Start with genesis - Beacon Chain (Consensus Layer)->>Execution Layer: Connect and sync - Host->>Validator: Start with validator keys - Validator->>Beacon Chain (Consensus Layer): Begin block voting - loop new blocks - After Genesis Helper->>Execution Layer: Monitor new blocks - end - After Genesis Helper->>User: Ready to interact -``` \ No newline at end of file diff --git a/book/src/lib/docker/chainlink_ecosystem.md b/book/src/lib/docker/chainlink_ecosystem.md deleted file mode 100644 index a570bae69..000000000 --- a/book/src/lib/docker/chainlink_ecosystem.md +++ /dev/null @@ -1,49 +0,0 @@ -# Chainlink ecosystem - -Currently, only one application has a wrapper that lives in this framework: the Job Distributor. -Chainlink Node wrapper can be found in the [chainlink repository](https://github.com/smartcontractkit/chainlink/blob/develop/integration-tests/docker/test_env/cl_node.go). - -## Job Distributor -JD is a component for a centralized creation and management of jobs executed by Chainlink Nodes. It's a single point of entry -that frees you from having to setup each job separately on each node from the DON. - -It requires a Postgres DB instance, which can also be started using the CTF: -```go -pg, err := test_env.NewPostgresDb( - []string{network.Name}, - test_env.WithPostgresDbName("jd-db"), - test_env.WithPostgresImageVersion("14.1")) -if err != nil { - panic(err) -} -err = pg.StartContainer() -if err != nil { - panic(err) -} -``` - -Then all you need to do, to start a new instance is: -```go -jd := New([]string{network.Name}, - //replace with actual image - WithImage("localhost:5001/jd"), - WithVersion("latest"), - WithDBURL(pg.InternalURL.String()), -) - -err = jd.StartContainer() -if err != nil { - panic(err) -} -``` - -Once you have JD started you can create a new GRPC connection and start interacting with it -to register DON nodes, create jobs, etc: -```go -conn, cErr := grpc.NewClient(jd.Grpc, []grpc.DialOption{grpc.WithTransportCredentials(insecure.NewCredentials())}...) -if cErr != nil { - panic(cErr) -} - -// use the connection -``` \ No newline at end of file diff --git a/book/src/lib/docker/overview.md b/book/src/lib/docker/overview.md deleted file mode 100644 index 54c1bbadc..000000000 --- a/book/src/lib/docker/overview.md +++ /dev/null @@ -1,68 +0,0 @@ -# Docker - -Docker package represents low-level wrappers for Docker containers built using [testcontainers-go](https://golang.testcontainers.org/) library. -It is strongly advised that you use CTFv2's [Framework](../framework/overview.md) to build your enviroment instead of using it directly. **Consider yourself warned!** - -Supported Docker containers can be divided in a couple of categories: -* [Chainlink ecosystem-related](./chainlink_ecosystem.md) -* [Blockchain nodes](./blockchain_nodes.md) -* Third party apps -* [Test helpers](./test_helpers.md) -* helper containers - -Following Chainlink-related containers are available: -* Job Distributor - -Blockchain nodes: -* Besu -* Erigon -* Geth -* Nethermind -* Reth -* Prysm Beacon client (PoS Ethereum) - -Third party apps: -* Kafka -* Postgres -* Zookeeper -* Schema registry - -Test helpers (mocking solutions): -* Killgrave -* Mockserver - -Helper containers: -* Ethereum genesis generator -* Validator keys generator - -# Basic structure - -All of our Docker container wrappers are composed of some amount of specific elements and an universal part called `EnvComponent` defined as: -```go -type EnvComponent struct { - ContainerName string `json:"containerName"` - ContainerImage string `json:"containerImage"` - ContainerVersion string `json:"containerVersion"` - ContainerEnvs map[string]string `json:"containerEnvs"` - WasRecreated bool `json:"wasRecreated"` - Networks []string `json:"networks"` - Container tc.Container `json:"-"` - PostStartsHooks []tc.ContainerHook `json:"-"` - PostStopsHooks []tc.ContainerHook `json:"-"` - PreTerminatesHooks []tc.ContainerHook `json:"-"` - LogLevel string `json:"-"` - StartupTimeout time.Duration `json:"-"` -} -``` - -It comes with a bunch of functional options that allow you to: -* set container name -* set image name and tag -* set startup timeout -* set log level -* set post start/stop hooks - -And following chaos-testing related functions: -* `ChaosNetworkDelay()` - introducing networking delay -* `ChaosNetworkLoss()` - simulating network package loss -* `ChaosPause()` - pausing the container \ No newline at end of file diff --git a/book/src/lib/docker/test_helpers.md b/book/src/lib/docker/test_helpers.md deleted file mode 100644 index 03f8fa2e4..000000000 --- a/book/src/lib/docker/test_helpers.md +++ /dev/null @@ -1,10 +0,0 @@ -# Test helpers - -There two test helper containers: -* Killgrave -* Mockserver - -Both represent HTTP mocking solutions, with Mockserver used in k8s and Killgrave outside of it. Since both will soon -be replaced by a single, in-house solution, their usage is discouraged. - -That worked is begin done in [this PR](https://github.com/smartcontractkit/chainlink-testing-framework/pull/1246) and tracked in [this ticket](https://smartcontract-it.atlassian.net/browse/TT-1608). \ No newline at end of file diff --git a/book/src/lib/k8s/KUBERNETES.md b/book/src/lib/k8s/KUBERNETES.md deleted file mode 100644 index a80756a00..000000000 --- a/book/src/lib/k8s/KUBERNETES.md +++ /dev/null @@ -1,36 +0,0 @@ -# Kubernetes - - -
- -Managing k8s is challenging, so we've decided to separate `k8s` deployments here - [CRIB](https://github.com/smartcontractkit/crib) - -This documentation is outdated, and we are using it only internally to run our soak tests. For `v2` tests please check [this example](../crib.md) and read [CRIB docs](https://github.com/smartcontractkit/crib) -
- -We run our software in Kubernetes. - -### Local k3d setup - -1. `make install` -2. (Optional) Install `Lens` from [here](https://k8slens.dev/) or use `k9s` as a low resource consumption alternative from [here](https://k9scli.io/topics/install/) - or from source [here](https://github.com/smartcontractkit/helmenv) -3. Setup your docker resources, 6vCPU/10Gb RAM are enough for most CL related tasks -4. `make create_cluster` -5. `make install_monitoring` Note: this will be actively connected to the server, the final log when it is ready is`Forwarding from [::1]:3000 -> 3000` and you can continue with the steps below in another terminal. -6. Check your contexts with `kubectl config get-contexts` -7. Switch context `kubectl config use-context k3d-local` -8. Read [here](README.md) and do some deployments -9. Open Grafana on `localhost:3000` with `admin/sdkfh26!@bHasdZ2` login/password and check the default dashboard -10. `make stop_cluster` -11. `make delete_cluster` - -### Typical problems - -1. Not enough memory/CPU or cluster is slow - Recommended settings for Docker are (Docker -> Preferences -> Resources): - - 6 CPU - - 10Gb MEM - - 50-150Gb Disk -2. `NodeHasDiskPressure` errors, pods get evicted - Use `make docker_prune` to clean up all pods and volumes diff --git a/book/src/lib/k8s/REMOTE_RUN.md b/book/src/lib/k8s/REMOTE_RUN.md deleted file mode 100644 index 6a8fede4f..000000000 --- a/book/src/lib/k8s/REMOTE_RUN.md +++ /dev/null @@ -1,48 +0,0 @@ -## How to run the same environment deployment inside k8s - -
- -Managing k8s is challenging, so we've decided to separate `k8s` deployments here - [CRIB](https://github.com/smartcontractkit/crib) - -This documentation is outdated, and we are using it only internally to run our soak tests. For `v2` tests please check [this example](../crib.md) and read [CRIB docs](https://github.com/smartcontractkit/crib) -
- - -You can build a `Dockerfile` to run exactly the same environment interactions inside k8s in case you need to run long-running tests -Base image is [here](https://github.com/smartcontractkit/chainlink-testing-framework/blob/main/lib/k8s/Dockerfile.base) - -```Dockerfile -FROM .dkr.ecr.us-west-2.amazonaws.com/test-base-image:latest -COPY . . -RUN env GOOS=linux GOARCH=amd64 go build -o test ./examples/remote-test-runner/env.go -RUN chmod +x ./test -ENTRYPOINT ["./test"] -``` - -Build and upload it using the "latest" tag for the test-base-image - -```bash -build_test_image tag=someTag -``` - -or if you want to specify a test-base-image tag - -```bash -build_test_image tag=someTag base_tag=latest -``` - -Then run it - -```bash -# all environment variables with a prefix TEST_ would be provided for k8s job -export TEST_ENV_VAR=myTestVarForAJob -# your image to run as a k8s job -ACCOUNT=$(aws sts get-caller-identity | jq -r .Account) -export ENV_JOB_IMAGE="${ACCOUNT}.dkr.ecr.us-west-2.amazonaws.com/core-integration-tests:v1.1" -export DETACH_RUNNER=true # if you want the test job to run in the background after it has started -export CHAINLINK_ENV_USER=yourUser # user to run the tests -export CHAINLINK_USER_TEAM=yourTeam # team to run the tests for -# your example test file to run inside k8s -# if ENV_JOB_IMAGE is present it will create a job, wait until it finished and get logs -go run examples/remote-test-runner/env.go -``` diff --git a/book/src/lib/k8s/TUTORIAL.md b/book/src/lib/k8s/TUTORIAL.md deleted file mode 100644 index c9286dbf6..000000000 --- a/book/src/lib/k8s/TUTORIAL.md +++ /dev/null @@ -1,743 +0,0 @@ -# How to create environments - -
- -Managing k8s is challenging, so we've decided to separate `k8s` deployments here - [CRIB](https://github.com/smartcontractkit/crib) - -This documentation is outdated, and we are using it only internally to run our soak tests. For `v2` tests please check [this example](../crib.md) and read [CRIB docs](https://github.com/smartcontractkit/crib) -
- - -- [Getting started](#getting-started) -- [Connect to environment](#connect-to-environment) -- [Creating environments](#creating-environments) - - [Debugging a new integration environment](#debugging-a-new-integration-environment) - - [Creating a new deployment part in Helm](#creating-a-new-deployment-part-in-helm) - - [Creating a new deployment part in cdk8s](#creating-a-new-deployment-part-in-cdk8s) - - [Using multi-stage environment](#using-multi-stage-environment) -- [Modifying environments](#modifying-environments) - - [Modifying environment from code](#modifying-environment-from-code) - - [Modifying environment part from code](#modifying-environment-part-from-code) -- [Configuring](#configuring) - - [Environment variables](#environment-variables) - - [Environment config](#environment-config) -- [Utilities](#utilities) - - [Collecting logs](#collecting-logs) - - [Resources summary](#resources-summary) -- [Chaos](#chaos) -- [Coverage](#coverage) -- [Remote run](./REMOTE_RUN.md) - -## Getting started - -Read [here](KUBERNETES.md) about how to spin up a local cluster if you don't have one. - -Following examples will use hardcoded `chain.link` labels for the sake of satisfying validations. When using any of remote clusters you should -provide them with actual and valid values, for example using following convenience functions: -```go -nsLabels, err := GetRequiredChainLinkNamespaceLabels("my-product", "load") -require.NoError(t, err, "Error creating required chain.link labels for namespace") - -workloadPodLabels, err := GetRequiredChainLinkWorkloadAndPodLabels("my-product", "load") -require.NoError(t, err, "Error creating required chain.link labels for workloads and pods") -``` - -And then setting them in the `Environment` config: -```go -envConfig := &environment.Config{ - Labels: nsLabels, - WorkloadLabels: workloadPodLabels - PodLabels: workloadPodLabels - NamespacePrefix: "new-environment", -} -``` - -Now, let's create a simple environment by combining different deployment parts. - -Create `examples/simple/env.go` - -```golang -package main - -import ( - "fmt" - "github.com/smartcontractkit/chainlink-testing-framework/k8s/environment" - "github.com/smartcontractkit/chainlink-testing-framework/k8s/pkg" - "github.com/smartcontractkit/chainlink-testing-framework/k8s/pkg/helm/chainlink" - "github.com/smartcontractkit/chainlink-testing-framework/k8s/pkg/helm/ethereum" - "github.com/smartcontractkit/chainlink-testing-framework/k8s/pkg/helm/mockserver" -) - -func addHardcodedLabelsToEnv(env *environment.Config) { - env.Labels = []string{"chain.link/product=myProduct", "chain.link/team=my-team", "chain.link/cost-center=test-tooling-load-test"} - env.WorkloadLabels = map[string]string{"chain.link/product": "myProduct", "chain.link/team": "my-team", "chain.link/cost-center": "test-tooling-load-test"} - env.PodLabels = map[string]string{"chain.link/product": "myProduct", "chain.link/team": "my-team", "chain.link/cost-center": "test-tooling-load-test"} -} - -func main() { - env := &environment.Config{ - NamespacePrefix: "new-environment", - KeepConnection: false, - RemoveOnInterrupt: false, - } - - addHardcodedLabelsToEnv(env) - err := environment.New(env). - AddHelm(ethereum.New(nil)). - AddHelm(chainlink.New(0, nil)). - Run() - if err != nil { - panic(err) - } -} -``` - -Then run `go run examples/simple/env.go` - -Now you have your environment running, you can [connect](#connect-to-environment) to it later - -> [!NOTE] -> `chain.link/*` labels are used for internal reporting and cost allocation. They are strictly required and validated. You won't be able to create a new environment without them. -> In this tutorial we create almost all of them manually, but there are convenience functions to do it for you. -> You can read more about labels [here](./labels.md) - -## Connect to environment - -We've already created an environment [previously](#getting-started), now we can connect - -If you are planning to use environment locally not in tests and keep connection, modify `KeepConnection` in `environment.Config` we used - -``` - KeepConnection: true, -``` - -Add `ENV_NAMESPACE=${your_env_namespace}` var and run `go run examples/simple/env.go` again - -You can get the namespace name from logs on creation time - -# Creating environments - -## Debugging a new integration environment - -You can spin up environment and block on forwarder if you'd like to run some other code. Let's use convenience functions for creating `chain.link` labels. - -```golang -package main - -import ( - "github.com/smartcontractkit/chainlink-testing-framework/k8s/environment" - "github.com/smartcontractkit/chainlink-testing-framework/k8s/pkg/helm/chainlink" - "github.com/smartcontractkit/chainlink-testing-framework/k8s/pkg/helm/ethereum" -) - -func main() { - env := &environment.Config{ - NamespacePrefix: "new-environment", - KeepConnection: true, - RemoveOnInterrupt: true, - } - - addHardcodedLabelsToEnv(env) - err := environment.New(env). - AddHelm(ethereum.New(nil)). - AddHelm(chainlink.New(0, nil)). - Run() - if err != nil { - panic(err) - } -} -``` - -Send any signal to remove the namespace then, for example `Ctrl+C` `SIGINT` - -## Creating a new deployment part in Helm - -Let's add a new [deployment part](examples/deployment_part/sol.go), it should implement an interface - -```golang -// ConnectedChart interface to interact both with cdk8s apps and helm charts -type ConnectedChart interface { - // IsDeploymentNeeded - // true - we deploy/connect and expose environment data - // false - we are using external environment, but still exposing data - IsDeploymentNeeded() bool - // GetName name of the deployed part - GetName() string - // GetPath get Helm chart path, repo or local path - GetPath() string - // GetProps get code props if it's typed environment - GetProps() any - // GetValues get values.yml props as map, if it's Helm - GetValues() *map[string]any - // ExportData export deployment part data in the env - ExportData(e *Environment) error - // GetLabels get labels for component, it must return `chain.link/component` label - GetLabels() map[string]string -} -``` - -When creating new deployment part, you can use any public Helm chart or a local path in Helm props - -```golang -func New(props *Props) environment.ConnectedChart { - if props == nil { - props = defaultProps() - } - return Chart{ - HelmProps: &HelmProps{ - Name: "sol", - Path: "chainlink-qa/solana-validator", // ./local_path/chartdir will work too - Values: &props.Values, - }, - Props: props, - } -} - -func (m NewDeploymentPart) GetLabels() map[string]string { - return map[string]string{ - "chain.link/component": "new-deployment-part", - } -} -``` - -Now let's tie them together - -```golang -package main - -import ( - "github.com/smartcontractkit/chainlink-testing-framework/k8s/environment" - "github.com/smartcontractkit/chainlink-testing-framework/k8s/examples/deployment_part" - "github.com/smartcontractkit/chainlink-testing-framework/k8s/pkg/helm/chainlink" - "time" -) - -func main() { - env := &environment.Config{ - NamespacePrefix: "adding-new-deployment-part", - TTL: 3 * time.Hour, - KeepConnection: true, - RemoveOnInterrupt: true, - } - - addHardcodedLabelsToEnv(env) - e := environment.New(env). - AddHelm(deployment_part.New(nil)). - AddHelm(chainlink.New(0, map[string]any{ - "replicas": 5, - "env": map[string]any{ - "SOLANA_ENABLED": "true", - "EVM_ENABLED": "false", - "EVM_RPC_ENABLED": "false", - "CHAINLINK_DEV": "false", - "FEATURE_OFFCHAIN_REPORTING2": "true", - "feature_offchain_reporting": "false", - "P2P_NETWORKING_STACK": "V2", - "P2PV2_LISTEN_ADDRESSES": "0.0.0.0:6690", - "P2PV2_DELTA_DIAL": "5s", - "P2PV2_DELTA_RECONCILE": "5s", - "p2p_listen_port": "0", - }, - })) - if err := e.Run(); err != nil { - panic(err) - } -} -``` - -Then run it `examples/deployment_part/cmd/env.go` - -## Creating a new deployment part in cdk8s - -Let's add a new [deployment part](examples/deployment_part/sol.go), it should implement the same interface - -```golang -// ConnectedChart interface to interact both with cdk8s apps and helm charts -type ConnectedChart interface { - // IsDeploymentNeeded - // true - we deploy/connect and expose environment data - // false - we are using external environment, but still exposing data - IsDeploymentNeeded() bool - // GetName name of the deployed part - GetName() string - // GetPath get Helm chart path, repo or local path - GetPath() string - // GetProps get code props if it's typed environment - GetProps() any - // GetValues get values.yml props as map, if it's Helm - GetValues() *map[string]any - // ExportData export deployment part data in the env - ExportData(e *Environment) error - // GetLabels get labels for component, it must return `chain.link/component` label - GetLabels() map[string]string -} -``` - -Now let's tie them together - -```golang -package main - -import ( - "github.com/smartcontractkit/chainlink-testing-framework/k8s/environment" - "github.com/smartcontractkit/chainlink-testing-framework/k8s/examples/deployment_part_cdk8s" - "github.com/smartcontractkit/chainlink-testing-framework/k8s/pkg/helm/chainlink" - "github.com/smartcontractkit/chainlink-testing-framework/k8s/pkg/helm/ethereum" -) - -func main() { - env := &environment.Config{ - NamespacePrefix: "adding-new-deployment-part", - TTL: 3 * time.Hour, - KeepConnection: true, - RemoveOnInterrupt: true, - } - - addHardcodedLabelsToEnv(env) - e := environment.New(env). - AddChart(deployment_part_cdk8s.New(&deployment_part_cdk8s.Props{})). - AddHelm(ethereum.New(nil)). - AddHelm(chainlink.New(0, map[string]any{ - "replicas": 2, - })) - if err := e.Run(); err != nil { - panic(err) - } - e.Shutdown() -} -``` - -Then run it `examples/deployment_part_cdk8s/cmd/env.go` - -## Using multi-stage environment - -You can split [environment](examples/multistage/env.go) deployment in several parts if you need to first copy something into a pod or use connected clients first - -```golang -package main - -import ( - "fmt" - "github.com/smartcontractkit/chainlink-testing-framework/k8s/environment" - "github.com/smartcontractkit/chainlink-testing-framework/k8s/pkg/cdk8s/blockscout" - "github.com/smartcontractkit/chainlink-testing-framework/k8s/pkg/helm/chainlink" - "github.com/smartcontractkit/chainlink-testing-framework/k8s/pkg/helm/ethereum" - "github.com/smartcontractkit/chainlink-testing-framework/k8s/pkg/helm/mockserver" - mockservercfg "github.com/smartcontractkit/chainlink-testing-framework/k8s/pkg/helm/mockserver-cfg" -) - -func main() { - envConfig := &environment.Config{ - Labels: []string{"chain.link/product=myProduct", "chain.link/team=my-team", "chain.link/cost-center=test-tooling-load-test"}, - WorkloadLabels: map[string]string{"chain.link/product": "myProduct", "chain.link/team": "my-team", "chain.link/cost-center": "test-tooling-load-test"}, - PodLabels: map[string]string{"chain.link/product": "myProduct", "chain.link/team": "my-team", "chain.link/cost-center": "test-tooling-load-test"} - } - e := environment.New(envConfig) - err := e. - AddChart(blockscout.New(&blockscout.Props{})). // you can also add cdk8s charts if you like Go code - AddHelm(ethereum.New(nil)). - AddHelm(chainlink.New(0, nil)). - Run() - if err != nil { - panic(err) - } - // do some other stuff with deployed charts - pl, err := e.Client.ListPods(e.Cfg.Namespace, "app=chainlink-0") - if err != nil { - panic(err) - } - dstPath := fmt.Sprintf("%s/%s:/", e.Cfg.Namespace, pl.Items[0].Name) - if _, _, _, err = e.Client.CopyToPod(e.Cfg.Namespace, "./examples/multistage/someData.txt", dstPath, "node"); err != nil { - panic(err) - } - // deploy another part - err = e. - AddHelm(mockservercfg.New(nil)). - AddHelm(mockserver.New(nil)). - Run() - defer func() { - errr := e.Shutdown() - panic(errr) - }() - if err != nil { - panic(err) - } -} -``` - -# Modifying environments - -## Modifying environment from code - -In case you need to [modify](examples/modify_cdk8s/env.go) environment in tests you can always construct manifest again and apply it - -That's working for `cdk8s` components too - -```golang -package main - -import ( - "fmt" - "github.com/smartcontractkit/chainlink-testing-framework/k8s/environment" - "github.com/smartcontractkit/chainlink-testing-framework/k8s/pkg/cdk8s/blockscout" - "github.com/smartcontractkit/chainlink-testing-framework/k8s/pkg/helm/chainlink" - "github.com/smartcontractkit/chainlink-testing-framework/k8s/pkg/helm/ethereum" -) - -func main() { - modifiedEnvConfig := &environment.Config{ - NamespacePrefix: "modified-env", - Labels: []string{"envType=Modified", "chain.link/product=myProduct", "chain.link/team=my-team", "chain.link/cost-center=test-tooling-load-test"}, - WorkloadLabels: map[string]string{"chain.link/product": "myProduct", "chain.link/team": "my-team", "chain.link/cost-center": "test-tooling-load-test"}, - PodLabels: map[string]string{"chain.link/product": "myProduct", "chain.link/team": "my-team", "chain.link/cost-center": "test-tooling-load-test"} - } - e := environment.New(modifiedEnvConfig). - AddChart(blockscout.New(&blockscout.Props{ - WsURL: "ws://geth:8546", - HttpURL: "http://geth:8544", - })). - AddHelm(ethereum.New(nil)). - AddHelm(chainlink.New(0, map[string]any{ - "replicas": 1, - })) - err := e.Run() - if err != nil { - panic(err) - } - e.ClearCharts() - err = e. - AddChart(blockscout.New(&blockscout.Props{ - HttpURL: "http://geth:9000", - })). - AddHelm(ethereum.New(nil)). - AddHelm(chainlink.New(0, map[string]any{ - "replicas": 1, - })). - Run() - if err != nil { - panic(err) - } -} -``` - -## Modifying environment part from code - -We can [modify](examples/modify_helm/env.go) only a part of environment - -```golang -package main - -import ( - "fmt" - "github.com/smartcontractkit/chainlink-testing-framework/k8s/environment" - "github.com/smartcontractkit/chainlink-testing-framework/k8s/pkg/helm/chainlink" - "github.com/smartcontractkit/chainlink-testing-framework/k8s/pkg/helm/ethereum" - "github.com/smartcontractkit/chainlink-testing-framework/k8s/pkg/helm/mockserver" - mockservercfg "github.com/smartcontractkit/chainlink-testing-framework/k8s/pkg/helm/mockserver-cfg" -) - -func main() { - modifiedEnvConfig := &environment.Config{ - NamespacePrefix: "modified-env", - } - - addHardcodedLabelsToEnv(modifiedEnvConfig) - e := environment.New(modifiedEnvConfig). - AddHelm(mockservercfg.New(nil)). - AddHelm(mockserver.New(nil)). - AddHelm(ethereum.New(nil)). - AddHelm(chainlink.New(0, map[string]any{ - "replicas": 1, - })) - err := e.Run() - if err != nil { - panic(err) - } - e.Cfg.KeepConnection = true - e.Cfg.RemoveOnInterrupt = true - e, err = e. - ReplaceHelm("chainlink-0", chainlink.New(0, map[string]any{ - "replicas": 2, - })) - if err != nil { - panic(err) - } - err = e.Run() - if err != nil { - panic(err) - } -} -``` - -# Configuring - -## Environment variables - -List of environment variables available - -```golang -const ( - EnvVarNamespace = "ENV_NAMESPACE" - EnvVarNamespaceDescription = "Namespace name to connect to" - EnvVarNamespaceExample = "chainlink-test-epic" - - // deprecated (for now left for backwards compatibility) - EnvVarCLImage = "CHAINLINK_IMAGE" - EnvVarCLImageDescription = "Chainlink image repository" - EnvVarCLImageExample = "public.ecr.aws/chainlink/chainlink" - - // deprecated (for now left for backwards compatibility) - EnvVarCLTag = "CHAINLINK_VERSION" - EnvVarCLTagDescription = "Chainlink image tag" - EnvVarCLTagExample = "1.5.1-root" - - EnvVarUser = "CHAINLINK_ENV_USER" - EnvVarUserDescription = "Owner of an environment" - EnvVarUserExample = "Satoshi" - - EnvVarTeam = "CHAINLINK_USER_TEAM" - EnvVarTeamDescription = "Team to, which owner of the environment belongs to" - EnvVarTeamExample = "BIX, CCIP, BCM" - - EnvVarCLCommitSha = "CHAINLINK_COMMIT_SHA" - EnvVarCLCommitShaDescription = "The sha of the commit that you're running tests on. Mostly used for CI" - EnvVarCLCommitShaExample = "${{ github.sha }}" - - EnvVarTestTrigger = "TEST_TRIGGERED_BY" - EnvVarTestTriggerDescription = "How the test was triggered, either manual or CI." - EnvVarTestTriggerExample = "CI" - - EnvVarLogLevel = "TEST_LOG_LEVEL" - EnvVarLogLevelDescription = "Environment logging level" - EnvVarLogLevelExample = "info | debug | trace" - - EnvVarSlackKey = "SLACK_API_KEY" - EnvVarSlackKeyDescription = "The OAuth Slack API key to report tests results with" - EnvVarSlackKeyExample = "xoxb-example-key" - - EnvVarSlackChannel = "SLACK_CHANNEL" - EnvVarSlackChannelDescription = "The Slack code for the channel you want to send the notification to" - EnvVarSlackChannelExample = "C000000000" - - EnvVarSlackUser = "SLACK_USER" - EnvVarSlackUserDescription = "The Slack code for the user you want to notify" - EnvVarSlackUserExample = "U000000000" -) -``` - -### Environment config - -```golang -// Config is an environment common configuration, labels, annotations, connection types, readiness check, etc. -type Config struct { - // TTL is time to live for the environment, used with kyverno - TTL time.Duration - // NamespacePrefix is a static namespace prefix - NamespacePrefix string - // Namespace is full namespace name - Namespace string - // Labels is a set of labels applied to the namespace in a format of "key=value" - Labels []string - // PodLabels is a set of labels applied to every pod in the namespace - PodLabels map[string]string - // WorkloadLabels is a set of labels applied to every workload in the namespace - WorkloadLabels map[string]string - // PreventPodEviction if true sets a k8s annotation safe-to-evict=false to prevent pods from being evicted - // Note: This should only be used if your test is completely incapable of handling things like K8s rebalances without failing. - // If that is the case, it's worth the effort to make your test fault-tolerant soon. The alternative is expensive and infuriating. - PreventPodEviction bool - // Allow deployment to nodes with these tolerances - Tolerations []map[string]string - // Restrict deployment to only nodes matching a particular node role - NodeSelector map[string]string - // ReadyCheckData is settings for readiness probes checks for all deployment components - // checking that all pods are ready by default with 8 minutes timeout - // &client.ReadyCheckData{ - // ReadinessProbeCheckSelector: "", - // Timeout: 15 * time.Minute, - // } - ReadyCheckData *client.ReadyCheckData - // DryRun if true, app will just generate a manifest in local dir - DryRun bool - // InsideK8s used for long-running soak tests where you connect to env from the inside - InsideK8s bool - // SkipManifestUpdate will skip updating the manifest upon connecting to the environment. Should be true if you wish to update the manifest (e.g. upgrade pods) - SkipManifestUpdate bool - // KeepConnection keeps connection until interrupted with a signal, useful when prototyping and debugging a new env - KeepConnection bool - // RemoveOnInterrupt automatically removes an environment on interrupt - RemoveOnInterrupt bool - // UpdateWaitInterval an interval to wait for deployment update started - UpdateWaitInterval time.Duration - - // Remote Runner Specific Variables // - // JobImage an image to run environment as a job inside k8s - JobImage string - // Specify only if you want remote-runner to start with a specific name - RunnerName string - // Specify only if you want to mount reports from test run in remote runner - ReportPath string - // JobLogFunction a function that will be run on each log - JobLogFunction func(*Environment, string) - // Test the testing library current Test struct - Test *testing.T - // jobDeployed used to limit us to 1 remote runner deploy - jobDeployed bool - // detachRunner should we detach the remote runner after starting the test - detachRunner bool - // fundReturnFailed the status of a fund return - fundReturnFailed bool -} -``` - -# Utilities - -## Collecting logs - -You can collect the [logs](examples/dump/env.go) while running tests, or if you have created an enrionment [already](#connect-to-environment) - -```golang -package main - -import ( - "github.com/smartcontractkit/chainlink-testing-framework/k8s/environment" - "github.com/smartcontractkit/chainlink-testing-framework/k8s/pkg/helm/chainlink" - "github.com/smartcontractkit/chainlink-testing-framework/k8s/pkg/helm/ethereum" -) - -func main() { - env := &environment.Config{} - - addHardcodedLabelsToEnv(env) - e := environment.New(env). - AddHelm(ethereum.New(nil)). - AddHelm(chainlink.New(0, nil)) - if err := e.Run(); err != nil { - panic(err) - } - if err := e.DumpLogs("logs/mytest"); err != nil { - panic(err) - } -} -``` - -## Resources summary - -It can be useful to get current env [resources](examples/resources/env.go) summary for test reporting - -```golang -package main - -import ( - "fmt" - "github.com/rs/zerolog/log" - "github.com/smartcontractkit/chainlink-testing-framework/k8s/environment" - "github.com/smartcontractkit/chainlink-testing-framework/k8s/pkg" - "github.com/smartcontractkit/chainlink-testing-framework/k8s/pkg/helm/chainlink" - "github.com/smartcontractkit/chainlink-testing-framework/k8s/pkg/helm/ethereum" -) - -func main() { - env := &environment.Config{} - addHardcodedLabelsToEnv(env) - - e := environment.New(env). - AddHelm(ethereum.New(nil)). - AddHelm(chainlink.New(0, nil)) - err := e.Run() - if err != nil { - panic(err) - } - // default k8s selector - summ, err := e.ResourcesSummary("app in (chainlink-0, geth)") - if err != nil { - panic(err) - } - log.Warn().Interface("Resources", summ).Send() - e.Shutdown() -} -``` - -# Chaos - -Check our [tests](https://github.com/smartcontractkit/chainlink/blob/develop/integration-tests/chaos/chaos_test.go) to see how we using Chaosmesh - -# Coverage - -Build your target image with those 2 steps to allow automatic coverage discovery - -```Dockerfile -FROM ... - -# add those 2 steps to instrument the code -RUN curl -s https://api.github.com/repos/qiniu/goc/releases/latest | grep "browser_download_url.*-linux-amd64.tar.gz" | cut -d : -f 2,3 | tr -d \" | xargs -n 1 curl -L | tar -zx && chmod +x goc && mv goc /usr/local/bin -# -o my_service means service will be called "my_service" in goc coverage service -# --center http://goc:7777 means that on deploy, your instrumented service will automatically register to a local goc node inside your deployment (namespace) -RUN goc build -o my_service . --center http://goc:7777 - -CMD ["./my_service"] -``` - -Add `goc` to your deployment, check example with `dummy` service deployment: - -```golang -package main - -import ( - "time" - - "github.com/smartcontractkit/chainlink-testing-framework/k8s/environment" - goc "github.com/smartcontractkit/chainlink-testing-framework/k8s/pkg/cdk8s/goc" - dummy "github.com/smartcontractkit/chainlink-testing-framework/k8s/pkg/cdk8s/http_dummy" -) - -func main() { - envConfig := &environment.Config{} - addHardcodedLabelsToEnv(envConfig) - e := environment.New(envConfig). - AddChart(goc.New()). - AddChart(dummy.New()) - if err := e.Run(); err != nil { - panic(err) - } - // run your test logic here - time.Sleep(1 * time.Minute) - if err := e.SaveCoverage(); err != nil { - panic(err) - } - // clear the coverage, rerun the tests again if needed - if err := e.ClearCoverage(); err != nil { - panic(err) - } -} - -``` - -After tests are finished, coverage is collected for every service, check `cover` directory - -# TOML Config - -Keep in mind that configuring Chainlink image/version & Pyroscope via env vars is deprecated. The latter won't even work anymore. That means that this method should be avoided in new environments. Instead, use the TOML config method described below. - -```golang - AddHelm(chainlink.New(0, nil)) -``` - -It's recommended to use a TOML config file to configure Chainlink and Pyroscope: - -```golang - -// read the config file -config := testconfig.GetConfig("Load", "Automation") - -var overrideFn = func(_ interface{}, target interface{}) { - ctf_config.MustConfigOverrideChainlinkVersion(&config.ChainlinkImage, target) - ctf_config.MightConfigOverridePyroscopeKey(&config.Pyroscope, target) -} - -AddHelm(chainlink.NewWithOverride(0, map[string]interface{}{ - "replicas": 1, -}, &config, overrideFn)) -``` - -Using that will cause the override function to be executed on the default propos thus overriding the default values with the values from the config file. If `config.ChainlinkImage` is `nil` or it's missing either `Image` or `Version` code will panic. If Pyroscope is disabled or key is not set it will be ignored. diff --git a/book/src/lib/k8s/labels.md b/book/src/lib/k8s/labels.md deleted file mode 100644 index 0807bffee..000000000 --- a/book/src/lib/k8s/labels.md +++ /dev/null @@ -1,67 +0,0 @@ -# k8s `chain.link` Labels - -## Purpose -Resource labeling has been introduced to better associate Kubernetes (k8s) costs with products and teams. This document describes the labels used in the k8s cluster. - -## Required Labels -Labels should be applied to all resources in the k8s cluster at three levels: -- **Namespace** -- **Workload** -- **Pod** - -All three levels should include the following labels: -- `chain.link/team` - Name of the team that owns the resource. -- `chain.link/product` - Product that the resource belongs to. -- `chain.link/cost-center` - Product and framework name. - -Additionally, pods should include the following label: -- `chain.link/component` - Name of the component. - -### `chain.link/team` -This label represents the team responsible for the resource, but it might not be the team of the individual who created the resource. It should reflect the team the environment is **created for**. - -For example, if you are a member of the Test Tooling team, but someone from the BIX team requests load tests, the namespace should be labeled as: `chain.link/team: bix`. - -### `chain.link/product` -This label specifies the product the resource belongs to. Internally, some products may have alternative names (e.g., OCR instead of Data Feeds). To standardize data analysis, use the following names: - -``` -automation -bcm -ccip -data-feedsv1.0 -data-feedsv2.0 -data-feedsv3.0 -data-streamsv0.3 -data-streamsv1.0 -deco -functions -proof-of-reserve -scale -staking -vrf -``` - -For example: -- OCR version 1: `data-feedsv1.0` -- OCR version 2: `data-feedsv2.0` - -### `chain.link/cost-center` -This label serves as an umbrella for specific test or environment types and should rarely change. For load or soak tests using solutions provided by the Test Tooling team, use the convention: `test-tooling--test` - -For example: `test-tooling-load-test`. - -This allows easy distinction from load tests run using other tools. - -### `chain.link/component` -This label identifies different components within the same product. Examples include: -- `chainlink` - Chainlink node. -- `geth` - Go-Ethereum blockchain node. -- `test-runner` - Remote test runner. - -## Adding Labels to New Components -Adding a new component to an existing framework is discouraged. The recommended approach is to add the component to CRIB and make these labels part of the deployment templates. - -If you need to add a new component, refer to the following sections in the [k8s Tutorial](./TUTORIAL.md): -- **Creating a new deployment part in Helm** -- **Creating a new deployment part in cdk8s** \ No newline at end of file diff --git a/book/src/lib/k8s_new/environments.md b/book/src/lib/k8s_new/environments.md deleted file mode 100644 index 5ca754d16..000000000 --- a/book/src/lib/k8s_new/environments.md +++ /dev/null @@ -1,287 +0,0 @@ -# Kubernetes - Environments - -As mentioned earlier, `CTFv1` creates `k8s` environments programmatically from existing building blocks. These include: - -- `anvil` -- `blockscout` (cdk8s) -- `chainlink node` -- `geth` -- `goc` (cdk8s) -- `grafana` -- `influxdb` -- `kafka` -- `mock-adapter` -- `mockserver` -- `reorg controller` -- `schema registry` -- `solana validator` -- `starknet validator` -- `wiremock` - -Unless noted otherwise, all components are based on `Helm` charts. - -> [!NOTE] -> The process of creating new environments or modifying existing ones is explained in detail [here](../k8s/TUTORIAL.md). This document focuses on a practical example of creating a new `k8s` test environment with a basic setup. -> -> **It is highly recommended to read that tutorial before proceeding.** - ---- - -## Example: Basic Testing Environment - -We will create a simple testing environment consisting of: -- 6 `Chainlink nodes` -- 1 blockchain node (`go-ethereum`, aka `geth`) - ---- - -### Step 1: Create Chainlink Node TOML Config - -In real-world scenarios, you should dynamically generate or load Chainlink node configurations to suit your needs. For simplicity, we will use a hardcoded configuration: - -```go -func TestSimpleDONWithLinkContract(t *testing.T) { - tomlConfig := `[Feature] -FeedsManager = true -LogPoller = true -UICSAKeys = true - -[Database] -MaxIdleConns = 20 -MaxOpenConns = 40 -MigrateOnStartup = true - -[Log] -Level = "debug" -JSONConsole = true - -[Log.File] -MaxSize = "0b" - -[WebServer] -AllowOrigins = "*" -HTTPWriteTimeout = "3m0s" -HTTPPort = 6688 -SecureCookies = false -SessionTimeout = "999h0m0s" - -[WebServer.RateLimit] -Authenticated = 2000 -Unauthenticated = 1000 - -[WebServer.TLS] -HTTPSPort = 0 - -[OCR] -Enabled = true - -[P2P] - -[P2P.V2] -ListenAddresses = ["0.0.0.0:6690"] - -[[EVM]] -ChainID = "1337" -AutoCreateKey = true -FinalityDepth = 1 -MinContractPayment = "0" - -[EVM.GasEstimator] -PriceMax = "200 gwei" -LimitDefault = 6000000 -FeeCapDefault = "200 gwei" - -[[EVM.Nodes]] -Name = "Simulated Geth-0" -WSURL = "ws://geth:8546" -HTTPURL = "http://geth:8544"` -``` - -This configuration enables the log poller and OCRv2 features while connecting to an EVM chain with `ChainID` `1337`. It uses the following RPC URLs: -- WebSocket: `ws://geth:8546` -- HTTP: `http://geth:8544` - -These URLs correspond to the default ports for `geth` and match the `go-ethereum` service name in the `k8s` cluster. - ---- - -### Step 2: Define the Chainlink Deployment - -To define the Chainlink deployment, we configure the image, version, and other parameters such as replicas and database settings. Here's the detailed implementation: - -```go -chainlinkImageCfg := &ctf_config.ChainlinkImageConfig{ - Image: ptr.Ptr("public.ecr.aws/chainlink/chainlink"), - Version: ptr.Ptr("2.19.0"), -} - -var overrideFn = func(_ interface{}, target interface{}) { - ctf_config.MustConfigOverrideChainlinkVersion(chainlinkImageCfg, target) -} - -cd := chainlink.NewWithOverride(0, map[string]any{ - "replicas": 6, // Number of Chainlink nodes - "toml": tomlConfig, // TOML configuration defined earlier - "db": map[string]any{ - "stateful": true, // Use stateful databases for tests - }, -}, chainlinkImageCfg, overrideFn) -``` - -**Key Details:** -- **Image and Version:** These are hardcoded here for simplicity but should ideally be configurable for different environments. -- **Replicas:** We specify 6 Chainlink nodes to simulate a multi-node setup. -- **Database Configuration:** The database is stateful to allow for persistence during soak tests. -- **Override Function:** This ensures that the specified image and version are applied to all Chainlink node deployments. - ---- - -### Step 3: Label Resources - -To track costs effectively, add required `chain.link` labels to all `k8s` resources: - -```go -productName := "data-feedsv1.0" -nsLabels, err := environment.GetRequiredChainLinkNamespaceLabels(productName, "soak") -if err != nil { - t.Fatal("Error creating namespace labels", err) -} - -workloadPodLabels, err := environment.GetRequiredChainLinkWorkloadAndPodLabels(productName, "soak") -if err != nil { - t.Fatal("Error creating workload and pod labels", err) -} -``` - -Set the following environment variables: -- `CHAINLINK_ENV_USER`: Name of the person running the test. -- `CHAINLINK_USER_TEAM`: Name of the team the test is for. - ---- - -### Step 4: Create Environment Config - -```go -baseEnvironmentConfig := &environment.Config{ - TTL: time.Hour * 2, - NamespacePrefix: "my-namespace-prefix", - Test: t, - PreventPodEviction: true, - Labels: nsLabels, - WorkloadLabels: workloadPodLabels, - PodLabels: workloadPodLabels, -} -``` - -**Key Fields:** -- **`TTL`**: Time-to-live for the namespace (auto-removal after this time). -- **`NamespacePrefix`**: Ensures unique namespace names. -- **`PreventPodEviction`**: Prevents pods from being evicted or restarted. - ---- - -### Step 5: Define Blockchain Network - -To set up the blockchain network, we use predefined properties for a simulated EVM network. Here's the detailed implementation: - -```go -nodeNetwork := blockchain.SimulatedEVMNetwork - -ethProps := ðereum.Props{ - NetworkName: nodeNetwork.Name, // Name of the network - Simulated: nodeNetwork.Simulated, // Indicates that the network is simulated - WsURLs: nodeNetwork.URLs, // WebSocket URLs for the network - HttpURLs: nodeNetwork.HTTPURLs, // HTTP URLs for the network -} -``` - -**Details:** -- **Simulated Network:** Represents a private, ephemeral blockchain used for testing. -- **Dynamic Selection:** In real scenarios, use helper functions to dynamically select networks (public, private, or simulated) based on test requirements. -- **Custom URLs:** The `ethereum` chart requires explicit settings for the network name and URLs. - ---- - -### Step 6: Build the Environment - -```go -testEnv := environment.New(baseEnvironmentConfig). - AddHelm(ethereum.New(ethProps)). // Blockchain node - AddHelm(cd) // Chainlink nodes - -err = testEnv.Run() -if err != nil { - t.Fatal("Error running environment", err) -} -``` - ---- - -### Step 7: Create Blockchain Client - -```go -if !testEnv.Cfg.InsideK8s { - wsURLs := testEnv.URLs[blockchain.SimulatedEVMNetwork.Name] - httpURLs := testEnv.URLs[blockchain.SimulatedEVMNetwork.Name+"_http"] - if len(wsURLs) == 0 || len(httpURLs) == 0 { - t.Fatal("Forwarded Geth URLs should not be empty") - } - nodeNetwork.URLs = wsURLs - nodeNetwork.HTTPURLs = httpURLs -} - -sethClient, err := seth.NewClientBuilder(). - WithRpcUrl(nodeNetwork.URLs[0]). - WithPrivateKeys([]string{nodeNetwork.PrivateKeys[0]}). - Build() -if err != nil { - t.Fatal("Error creating Seth client", err) -} -``` - -**Details:** -- **Local vs. Cluster Environment**: When running tests outside the k8s cluster, the service URLs (`ws://geth:8546`, `http://geth:8544`) are not directly accessible. Port forwarding ensures local access to these services. -- **Automatic Port Forwarding**: The `Environment` object manages forwarding for key services, including Geth in simulated mode, making these forwarded URLs available in the `URLs` map. -- **Dynamic Rewriting**: URLs are dynamically rewritten to switch between in-cluster and local connectivity. - ---- - -### Step 8: Deploy LINK Contract - -```go -linkTokenAbi, err := link_token_interface.LinkTokenMetaData.GetAbi() -if err != nil { - t.Fatal("Error getting LinkToken ABI", err) -} - -linkDeploymentData, err := sethClient.DeployContract(sethClient.NewTXOpts(), "LinkToken", *linkTokenAbi, common.FromHex(link_token_interface.LinkTokenMetaData.Bin)) -if err != nil { - t.Fatal("Error deploying LinkToken contract", err) -} - -linkToken, err := link_token_interface.NewLinkToken(linkDeploymentData.Address, sethClient.Client) -if err != nil { - t.Fatal("Error creating LinkToken contract instance", err) -} - -totalSupply, err := linkToken.TotalSupply(sethClient.NewCallOpts()) -if err != nil { - t.Fatal("Error getting total supply of LinkToken", err) -} -if totalSupply.Cmp(big.NewInt(0)) <= 0 { - t.Fatal("Total supply of LinkToken should be greater than 0") -} -``` - -**Details:** -- **Deploy Contract:** Deploys the LINK token contract to the simulated blockchain. -- **Verify Deployment:** Ensures the total supply is greater than zero as a sanity check. - ---- - -### Next Steps - -Learn how to run long-duration tests using a `remote runner` in the [next chapter](./remote_runner.md). - -> [!NOTE] -> This example can be found [here](https://github.com/smartcontractkit/chainlink-testing-framework/tree/main/lib/k8s/examples/link/link_test.go). \ No newline at end of file diff --git a/book/src/lib/k8s_new/overview.md b/book/src/lib/k8s_new/overview.md deleted file mode 100644 index 2a069d34c..000000000 --- a/book/src/lib/k8s_new/overview.md +++ /dev/null @@ -1,29 +0,0 @@ -# Kubernetes - -> [!WARNING] -> It is highly recommended to use [CRIB](https://github.com/smartcontractkit/crib) for `k8s` deployments. -> Avoid running long tests that are impractical to execute locally or through CI pipelines. -> -> **Proceed at your own risk.** - ---- - -## Overview - -The `CTFv1` tool builds `k8s` environments **programmatically** using either `Helm` or `cdk8s` charts. This approach introduces significant complexity to the deployment process. - -To manage long-running tests, `CTFv1` utilizes a `remote runner`, which is essentially a Docker container containing the test logic. This container is deployed as a `cdk8s`-based chart, creating a `k8s` resource of type `job` that runs the test in a detached manner. This setup requires custom logic to integrate with the test framework. - ---- - -## What We’ll Cover - -1. Creating a simplified `k8s` environment. -2. Adding a basic test that: - - Deploys a smart contract. - - Supports the `remote runner` capability. -3. Building a Docker image for the test and configuring the required environment variables. - ---- - -Are you ready to get started? diff --git a/book/src/lib/k8s_new/remote_runner.md b/book/src/lib/k8s_new/remote_runner.md deleted file mode 100644 index 25cc40fea..000000000 --- a/book/src/lib/k8s_new/remote_runner.md +++ /dev/null @@ -1,250 +0,0 @@ -# Kubernetes - Using Remote Runner - -In this chapter, we explain how to run a test in `k8s` and the changes required in the test logic to support it. - ---- - -## Overview - -The general process of running tests with a `remote runner` involves: - -1. Creating a `k8s` environment from a local machine (either your local machine or a CI runner). - - The environment launches a `remote runner` using the `ENV_JOB_IMAGE` environment variable. -2. The `remote runner` re-executes the same test code from the beginning. - - It detects that the environment is already deployed and skips redeploying it. -3. After the `remote runner` completes its test execution, control returns to the local test execution. - - The local test exits early to prevent duplicate execution. -4. If running in `detached mode`, control returns to the local test as soon as the remote test starts. - - The local test exits immediately. - - The `remote runner` continues running in `k8s` until the test completes. - -Following diagram explains it in a visual way: -```mermaid -sequenceDiagram - actor User as User - participant LocalTest as Local Test - participant K8sEnv as Kubernetes Environment - participant RemoteRunner as Remote Runner - - User->>LocalTest: Start test execution - LocalTest->>K8sEnv: Create environment - K8sEnv-->>LocalTest: Environment created - LocalTest->>K8sEnv: Start remote runner job - K8sEnv-->>RemoteRunner: Deploy remote runner - - alt DETACHED_MODE=true - RemoteRunner-->>K8sEnv: Begin test logic execution - LocalTest-->>User: Exit after remote runner starts - Note right of LocalTest: Detaches after
remote runner starts - else DETACHED_MODE=false - RemoteRunner-->>K8sEnv: Begin test logic execution - RemoteRunner->>K8sEnv: Complete test logic execution - K8sEnv-->>LocalTest: Notify test completion - LocalTest-->>User: Exit after test completion - end - - Note right of RemoteRunner: Executes the test
logic independently -``` - -Although this may seem complex, the necessary changes to the test logic ensure that tests execute correctly without duplications. In the following steps, we explain where and why you should add conditionals and early exits to prevent unwanted re-execution. - -> [!NOTE] -> We are developing a new `k8s` test runner that eliminates the need for `k8s`-specific logic. This will allow tests to run seamlessly both locally and remotely. Documentation for this is available [here](../../k8s-test-runner/k8s-test-runner.md). - ---- - -## Requirements - -The `remote runner` requires a Docker image containing your test code. There are multiple ways to build this image, some of which are automated in our repositories. For this documentation, we will build it from scratch. - -> [!NOTE] -> The CTF repository builds a base testing image for each release using [this action](https://github.com/smartcontractkit/chainlink-testing-framework/actions/workflows/k8s-publish-test-base-image.yaml). This base image includes `kubectl`, `helm`, and other dependencies. Use it as a base image for your final test image. You only need to copy your compiled Go tests and set the entrypoint to execute them. An example from the Chainlink repository can be found [here](https://github.com/smartcontractkit/chainlink/actions/workflows/on-demand-ocr-soak-test.yml). - ---- - -## Step 1: Build a Docker Image with Your Tests - -Define a `Dockerfile`: - -```dockerfile -# Base image for all k8s test runs -FROM golang:1.23-bullseye - -ARG GOARCH -ARG GOOS -ARG BASE_URL -ARG HELM_VERSION -ARG HOME -ARG KUBE_VERSION -ARG NODE_VERSION - -# Compile Go binary targeting linux/amd64, used by k8s runners -ENV GOOS="linux" -ENV GOARCH="amd64" -ENV BASE_URL="https://get.helm.sh" -ENV HELM_VERSION="3.10.3" -ENV KUBE_VERSION="v1.25.5" -ENV NODE_VERSION=18 - -# Install dependencies -RUN apt-get update && apt-get install -y \ - ca-certificates wget curl git gnupg zip && \ - mkdir -p /etc/apt/keyrings && \ - curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg && \ - echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_VERSION.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list && \ - apt-get update && apt-get install -y nodejs && \ - curl -LO https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl && \ - chmod +x ./kubectl && mv ./kubectl /usr/local/bin && \ - ARCH=$(uname -m | sed 's/x86_64/amd64/;s/aarch64/arm64/') && \ - wget ${BASE_URL}/helm-v${HELM_VERSION}-linux-${ARCH}.tar.gz -O - | tar -xz && \ - mv linux-${ARCH}/helm /usr/bin/helm && chmod +x /usr/bin/helm && rm -rf linux-${ARCH} && \ - npm install -g yarn && apt-get clean && \ - helm repo add chainlink-qa https://raw.githubusercontent.com/smartcontractkit/qa-charts/gh-pages/ && \ - helm repo add bitnami https://charts.bitnami.com/bitnami && helm repo update - -# Install AWS CLI v2 -RUN ARCH=$(uname -m | sed 's/x86_64/x86_64/;s/aarch64/aarch64/') && \ - curl https://awscli.amazonaws.com/awscli-exe-linux-${ARCH}.zip -o "awscliv2.zip" && \ - unzip awscliv2.zip && ./aws/install && rm -rf awscliv2.zip - -COPY lib/ testdir/ - -# Compile Go tests -WORKDIR /go/testdir/k8s/examples/link -RUN go test -c . -o link - -# Entrypoint to run tests -ENTRYPOINT ["./link"] -``` - -**Installed Dependencies:** -- `kubectl` (to interact with `k8s`) -- `nodejs` -- `helm` (for environment setup) -- `AWS CLI v2` (if interacting with AWS `k8s` clusters) - -> [!NOTE] -> If using local Helm charts instead of published ones, set `LOCAL_CHARTS=true`. Local here means onces stored in the Docker image -> in the `lib/charts` folder. - ---- - -## Step 2: Build the Image - -Build the Docker image from the root directory of the CTF repository: - -```bash -docker build -f lib/k8s/examples/link/Dockerfile \ - --platform=linux/amd64 \ - -t link-test:latest . -``` - -> [!NOTE] -> The `--platform=linux/amd64` parameter ensures compatibility with k8s runners. - ---- - -## Step 3: Test the Image - -Before modifying the test logic for `remote runner` compatibility, test the image locally. Ensure you have access to a `k8s` cluster (local or remote). Configure `kubectl` to use the cluster and authenticate if necessary. - -Run the test image: - -```bash -docker run \ - --rm \ - -v ~/.aws:/root/.aws:ro \ - -v ~/.kube/config:/root/.kube/config:ro \ - -e AWS_PROFILE= \ - -e KUBECONFIG=/root/.kube/config \ - link-test:latest -``` - -This mounts the local `.aws` directory and `kubectl` configuration to the container, allowing it to access the cluster. Verify the test completes successfully. - ---- - -## Step 4: Make the Test `Remote Runner`-Compatible - -To adapt the test for `remote runner` execution, you need to divide the test logic into: - -1. **Local Execution Logic**: Responsible for setting up the environment and initiating the `remote runner`. -2. **Remote Execution Logic**: Handles the actual test operations, such as deploying contracts or generating workload. - -### Key Adjustments - -- **Check for Remote Execution**: Use the `testEnv.WillUseRemoteRunner()` function to determine if the test will run in the `remote runner`. If it will, ensure any non-idempotent operations, like test logic execution, are skipped in the local context. -- **Prevent Test Logic Duplication**: Exit the local test execution after initiating the remote runner to avoid running the test logic both locally and remotely. - -### Updated Example - -Here is how you can make these changes: - -```go -err = testEnv.Run() -if err != nil { - t.Fatal("Error running environment: ", err) -} - -if testEnv.WillUseRemoteRunner() { - log.Info().Msg("Stopping local execution as test will continue in the remote runner") - return // Exit early to allow the remote runner to take over -} - -// Additional test logic (if applicable) runs only in the remote runner -``` - -### Why These Changes Are Necessary - -- **Environment Duplication**: Ensures that test logic is executed only once, within the `remote runner`, and not both locally and remotely. - ---- - -## Step 5: Rebuild the image -Rebuild the image to include `remote runner`-related changes. - -## Step 6: Push Image to Registry (Optional) - -If using a remote cluster, push the image to a registry like AWS ECR: - -```bash -aws ecr get-login-password --region | docker login \ - --username AWS --password-stdin .dkr.ecr..amazonaws.com - -docker tag link-test:latest \ - .dkr.ecr..amazonaws.com//link-remote-runner-test:latest - -docker push .dkr.ecr..amazonaws.com//link-remote-runner-test:latest -``` - ---- - -## Step 7: Run with `Remote Runner` - -Run the test in `detached mode` by setting these environment variables: -- `DETACH_RUNNER=true` -- `ENV_JOB_IMAGE=` (one we created in step 5) - -Command: - -```bash -docker run \ - --rm \ - -v ~/.aws:/root/.aws:ro \ - -v ~/.kube/config:/root/.kube/config:ro \ - -e DETACH_RUNNER=true \ - -e ENV_JOB_IMAGE= \ - -e AWS_PROFILE= \ - -e KUBECONFIG=/root/.kube/config \ - -``` - -> [!NOTE] -> You may also need to pass secrets to your test. Refer to the [Test Secrets Documentation](./test_secrets.md) for guidance on securely managing and injecting secrets into your tests. - -The local test detaches after starting the remote runner. Logs from the remote runner can be checked for test progress. - ---- - -You can find the complete example [here](https://github.com/smartcontractkit/chainlink-testing-framework/tree/main/lib/k8s/examples/link). - diff --git a/book/src/lib/k8s_new/test_secrets.md b/book/src/lib/k8s_new/test_secrets.md deleted file mode 100644 index 82ae1b4d3..000000000 --- a/book/src/lib/k8s_new/test_secrets.md +++ /dev/null @@ -1,36 +0,0 @@ -# Kubernetes - Test Secrets - -We all have our secrets, don't we? It's the same case with tests... and since some of our repositories are public, we need to take special precautions to protect them. - -> [!WARNING] -> Before continuing, you should read the [test secrets section of the CTF configuration documentation](../config/config.md). - -## Overview - -In general, your `remote runner` will need access to the same secrets as your local test. Fortunately, these secrets are forwarded automatically and securely as long as their names have the prefix `E2E_TEST_`. - -To make a secret available to the `remote runner`, simply pass it to the `docker run` command: - -```bash -docker run \ - --rm \ - -v ~/.aws:/root/.aws:ro \ - -v ~/.kube/config:/root/.kube/config:ro \ - -e DETACH_RUNNER=true \ - -e E2E_TEST_MY_SECRET=my-secret \ - -e ENV_JOB_NAME="" \ - -e AWS_PROFILE= \ - -e KUBECONFIG=/root/.kube/config \ - -``` - -The secret will then be available to the `remote runner` during its execution. - ---- - -## Important Considerations - -> [!WARNING] -> **Do not use this method of passing secrets in CI environments.** Exposing secrets in this way can compromise their security. -> -> When running `k8s` tests in CI pipelines, use dedicated actions or reusable workflows designed to handle secrets securely. \ No newline at end of file diff --git a/book/src/lib/logging.md b/book/src/lib/logging.md deleted file mode 100644 index 8acf67bbd..000000000 --- a/book/src/lib/logging.md +++ /dev/null @@ -1,23 +0,0 @@ -# Logging - -This small library was created to address two issues: -* mixed up logging for parallel tests, when using vanilla loggers -* conformity with logging interface required by `testcontainers-go` (a Docker container library) - -It uses `"github.com/rs/zerolog"` for the logger. - -## Configuration -There's only one configuration option: the log level. You can set it via `TEST_LOG_LEVEL` environment variable to: -* `trace` -* `debug` -* `info` (default) -* `warn` -* `error` - -## How to use -The main way to get a Logger instance is to call `logging.GetTestLogger(*testing.T)`. `testing.T` instance can be `nil`. - -When using it together with `testcontainers-go`, which is a library we use to interact with Docker containers you should -use `GetTestContainersGoTestLogger(*testing.T)` instead. - -And that's all there is to it :-) \ No newline at end of file diff --git a/book/src/lib/wasp/how-to/run_included_tests.md b/book/src/lib/wasp/how-to/run_included_tests.md deleted file mode 100644 index c8d06ae17..000000000 --- a/book/src/lib/wasp/how-to/run_included_tests.md +++ /dev/null @@ -1 +0,0 @@ -# Try it out quickly diff --git a/infra/chaosmesh-playground/README.md b/infra/chaosmesh-playground/README.md deleted file mode 100644 index bde625a52..000000000 --- a/infra/chaosmesh-playground/README.md +++ /dev/null @@ -1,26 +0,0 @@ -## ChaosMesh Playground - -This deployment is used to debug various [ChaosMesh](https://chaos-mesh.org/) with [Kind](https://kind.sigs.k8s.io/) - -Install [DevBox](https://www.jetify.com/devbox) and run your environment -``` -devbox run up -``` - -Check the services -``` -devbox shell -k9s -``` -Apply experiments (inside devbox shell) - -If you running it from any other shell or using `Go` don't forget to apply `kubectl config set-context kind-cm-playground` before! -``` -kubectl apply -f manifests/latency.yaml -``` -Debug `ChaosMesh` using `k9s`, check daemon logs. - -Remove the environment -``` -devbox run down -``` \ No newline at end of file diff --git a/infra/chaosmesh-playground/chaos-mesh-crds.yaml b/infra/chaosmesh-playground/chaos-mesh-crds.yaml deleted file mode 100644 index 20b4ee8d7..000000000 --- a/infra/chaosmesh-playground/chaos-mesh-crds.yaml +++ /dev/null @@ -1,50617 +0,0 @@ ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.13.0 - name: awschaos.chaos-mesh.org -spec: - group: chaos-mesh.org - names: - kind: AWSChaos - listKind: AWSChaosList - plural: awschaos - singular: awschaos - scope: Namespaced - versions: - - additionalPrinterColumns: - - jsonPath: .spec.action - name: action - type: string - - jsonPath: .spec.duration - name: duration - type: string - name: v1alpha1 - schema: - openAPIV3Schema: - description: AWSChaos is the Schema for the awschaos API - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - description: AWSChaosSpec is the content of the specification for an AWSChaos - properties: - action: - description: 'Action defines the specific aws chaos action. Supported - action: ec2-stop / ec2-restart / detach-volume Default action: ec2-stop' - 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. Needed in - detach-volume. - type: string - duration: - description: Duration represents the duration of the chaos action. - type: string - ec2Instance: - description: Ec2Instance indicates the ID of the ec2 instance. - type: string - endpoint: - description: Endpoint indicates the endpoint of the aws server. Just - used it in test now. - type: string - remoteCluster: - description: RemoteCluster represents the remote cluster where the - chaos will be deployed - type: string - secretName: - description: SecretName defines the name of kubernetes secret. - type: string - volumeID: - description: EbsVolume indicates the ID of the EBS volume. Needed - in detach-volume. - type: string - required: - - action - - awsRegion - - ec2Instance - type: object - status: - description: AWSChaosStatus represents the status of an AWSChaos - properties: - conditions: - description: Conditions represents the current global condition of - the chaos - items: - properties: - reason: - type: string - status: - type: string - type: - type: string - required: - - status - - type - type: object - type: array - experiment: - description: Experiment records the last experiment state. - properties: - containerRecords: - description: Records are used to track the running status - items: - properties: - events: - description: Events are the essential details about the - injections and recoveries - items: - properties: - message: - description: Message is the detail message, e.g. the - reason why we failed to inject the chaos - type: string - operation: - description: Operation represents the operation we - are doing, when we crate this event - type: string - timestamp: - description: Timestamp is time when we create this - event - format: date-time - type: string - type: - description: Type means the stage of this event - type: string - required: - - operation - - timestamp - - type - type: object - type: array - id: - type: string - injectedCount: - description: InjectedCount is a counter to record the sum - of successful injections - type: integer - phase: - type: string - recoveredCount: - description: RecoveredCount is a counter to record the sum - of successful recoveries - type: integer - selectorKey: - type: string - required: - - id - - injectedCount - - phase - - recoveredCount - - selectorKey - type: object - type: array - desiredPhase: - enum: - - Run - - Stop - type: string - type: object - required: - - experiment - type: object - required: - - spec - type: object - served: true - storage: true - subresources: {} - ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.13.0 - name: azurechaos.chaos-mesh.org -spec: - group: chaos-mesh.org - names: - kind: AzureChaos - listKind: AzureChaosList - plural: azurechaos - singular: azurechaos - scope: Namespaced - versions: - - additionalPrinterColumns: - - jsonPath: .spec.action - name: action - type: string - - jsonPath: .spec.duration - name: duration - type: string - name: v1alpha1 - schema: - openAPIV3Schema: - description: AzureChaos is the Schema for the azurechaos API - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - description: AzureChaosSpec is the content of the specification for an - AzureChaos - properties: - action: - description: 'Action defines the specific azure chaos action. Supported - action: vm-stop / vm-restart / disk-detach Default action: vm-stop' - enum: - - vm-stop - - vm-restart - - disk-detach - type: string - diskName: - description: DiskName indicates the name of the disk. Needed in disk-detach. - type: string - duration: - description: Duration represents the duration of the chaos action. - type: string - lun: - description: LUN indicates the Logical Unit Number of the data disk. - Needed in disk-detach. - type: integer - remoteCluster: - description: RemoteCluster represents the remote cluster where the - chaos will be deployed - type: string - resourceGroupName: - description: ResourceGroupName defines the name of ResourceGroup - type: string - secretName: - description: SecretName defines the name of kubernetes secret. It - is used for Azure credentials. - type: string - subscriptionID: - description: SubscriptionID defines the id of Azure subscription. - type: string - vmName: - description: VMName defines the name of Virtual Machine - type: string - required: - - action - - resourceGroupName - - subscriptionID - - vmName - type: object - status: - description: AzureChaosStatus represents the status of an AzureChaos - properties: - conditions: - description: Conditions represents the current global condition of - the chaos - items: - properties: - reason: - type: string - status: - type: string - type: - type: string - required: - - status - - type - type: object - type: array - experiment: - description: Experiment records the last experiment state. - properties: - containerRecords: - description: Records are used to track the running status - items: - properties: - events: - description: Events are the essential details about the - injections and recoveries - items: - properties: - message: - description: Message is the detail message, e.g. the - reason why we failed to inject the chaos - type: string - operation: - description: Operation represents the operation we - are doing, when we crate this event - type: string - timestamp: - description: Timestamp is time when we create this - event - format: date-time - type: string - type: - description: Type means the stage of this event - type: string - required: - - operation - - timestamp - - type - type: object - type: array - id: - type: string - injectedCount: - description: InjectedCount is a counter to record the sum - of successful injections - type: integer - phase: - type: string - recoveredCount: - description: RecoveredCount is a counter to record the sum - of successful recoveries - type: integer - selectorKey: - type: string - required: - - id - - injectedCount - - phase - - recoveredCount - - selectorKey - type: object - type: array - desiredPhase: - enum: - - Run - - Stop - type: string - type: object - required: - - experiment - type: object - required: - - spec - type: object - served: true - storage: true - subresources: {} - ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.13.0 - name: blockchaos.chaos-mesh.org -spec: - group: chaos-mesh.org - names: - kind: BlockChaos - listKind: BlockChaosList - plural: blockchaos - singular: blockchaos - scope: Namespaced - versions: - - additionalPrinterColumns: - - jsonPath: .spec.action - name: action - type: string - - jsonPath: .spec.duration - name: duration - type: string - name: v1alpha1 - schema: - openAPIV3Schema: - description: BlockChaos is the Schema for the blockchaos API - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - description: BlockChaosSpec is the content of the specification for a - BlockChaos - properties: - action: - description: 'Action defines the specific block chaos action. Supported - action: delay' - enum: - - delay - type: string - containerNames: - description: ContainerNames indicates list of the name of affected - container. If not set, the first container will be injected - items: - type: string - type: array - delay: - description: Delay defines the delay distribution. - properties: - correlation: - type: string - jitter: - type: string - latency: - description: Latency defines the latency of every io request. - type: string - type: object - duration: - description: Duration represents the duration of the chaos action. - type: string - mode: - description: 'Mode defines the mode to run chaos action. Supported - mode: one / all / fixed / fixed-percent / random-max-percent' - enum: - - one - - all - - fixed - - fixed-percent - - random-max-percent - type: string - remoteCluster: - description: RemoteCluster represents the remote cluster where the - chaos will be deployed - type: string - selector: - description: Selector is used to select pods that are used to inject - chaos action. - properties: - annotationSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be used to - select objects. A selector based on annotations. - type: object - expressionSelectors: - description: a slice of label selector expressions that can be - used to select objects. A list of selectors based on set-based - label expressions. - items: - description: A label selector requirement is a selector that - contains values, a key, and an operator that relates the key - and values. - properties: - key: - description: key is the label key that the selector applies - to. - type: string - operator: - description: operator represents a key's relationship to - a set of values. Valid operators are In, NotIn, Exists - and DoesNotExist. - type: string - values: - description: values is an array of string values. If the - operator is In or NotIn, the values array must be non-empty. - If the operator is Exists or DoesNotExist, the values - array must be empty. This array is replaced during a strategic - merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - fieldSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be used to - select objects. A selector based on fields. - type: object - labelSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be used to - select objects. A selector based on labels. - type: object - namespaces: - description: Namespaces is a set of namespace to which objects - belong. - items: - type: string - type: array - nodeSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be used to - select nodes. Selector which must match a node's labels, and - objects must belong to these selected nodes. - type: object - nodes: - description: Nodes is a set of node name and objects must belong - to these nodes. - items: - type: string - type: array - podPhaseSelectors: - description: 'PodPhaseSelectors is a set of condition of a pod - at the current time. supported value: Pending / Running / Succeeded - / Failed / Unknown' - items: - type: string - type: array - pods: - additionalProperties: - items: - type: string - type: array - description: Pods is a map of string keys and a set values that - used to select pods. The key defines the namespace which pods - belong, and the each values is a set of pod names. - type: object - type: object - value: - description: Value is required when the mode is set to `FixedMode` - / `FixedPercentMode` / `RandomMaxPercentMode`. If `FixedMode`, provide - an integer of pods to do chaos action. If `FixedPercentMode`, provide - a number from 0-100 to specify the percent of pods the server can - do chaos action. IF `RandomMaxPercentMode`, provide a number from - 0-100 to specify the max percent of pods to do chaos action - type: string - volumeName: - type: string - required: - - action - - mode - - selector - - volumeName - type: object - status: - description: BlockChaosStatus represents the status of a BlockChaos - properties: - conditions: - description: Conditions represents the current global condition of - the chaos - items: - properties: - reason: - type: string - status: - type: string - type: - type: string - required: - - status - - type - type: object - type: array - experiment: - description: Experiment records the last experiment state. - properties: - containerRecords: - description: Records are used to track the running status - items: - properties: - events: - description: Events are the essential details about the - injections and recoveries - items: - properties: - message: - description: Message is the detail message, e.g. the - reason why we failed to inject the chaos - type: string - operation: - description: Operation represents the operation we - are doing, when we crate this event - type: string - timestamp: - description: Timestamp is time when we create this - event - format: date-time - type: string - type: - description: Type means the stage of this event - type: string - required: - - operation - - timestamp - - type - type: object - type: array - id: - type: string - injectedCount: - description: InjectedCount is a counter to record the sum - of successful injections - type: integer - phase: - type: string - recoveredCount: - description: RecoveredCount is a counter to record the sum - of successful recoveries - type: integer - selectorKey: - type: string - required: - - id - - injectedCount - - phase - - recoveredCount - - selectorKey - type: object - type: array - desiredPhase: - enum: - - Run - - Stop - type: string - type: object - ids: - additionalProperties: - type: integer - description: InjectionIds always specifies the number of injected - chaos action - type: object - required: - - experiment - type: object - required: - - spec - type: object - served: true - storage: true - subresources: {} - ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.13.0 - name: dnschaos.chaos-mesh.org -spec: - group: chaos-mesh.org - names: - kind: DNSChaos - listKind: DNSChaosList - plural: dnschaos - singular: dnschaos - scope: Namespaced - versions: - - additionalPrinterColumns: - - jsonPath: .spec.action - name: action - type: string - - jsonPath: .spec.duration - name: duration - type: string - name: v1alpha1 - schema: - openAPIV3Schema: - description: DNSChaos is the Schema for the networkchaos API - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - description: Spec defines the behavior of a pod chaos experiment - properties: - action: - description: 'Action defines the specific DNS chaos action. Supported - action: error, random Default action: error' - enum: - - error - - random - type: string - containerNames: - description: ContainerNames indicates list of the name of affected - container. If not set, the first container will be injected - items: - type: string - type: array - duration: - description: Duration represents the duration of the chaos action - type: string - mode: - description: 'Mode defines the mode to run chaos action. Supported - mode: one / all / fixed / fixed-percent / random-max-percent' - enum: - - one - - all - - fixed - - fixed-percent - - random-max-percent - type: string - patterns: - description: 'Choose which domain names to take effect, support the - placeholder ? and wildcard *, or the Specified domain name. Note: - 1. The wildcard * must be at the end of the string. For example, - chaos-*.org is invalid. 2. if the patterns is empty, will take effect - on all the domain names. For example: The value is ["google.com", - "github.*", "chaos-mes?.org"], will take effect on "google.com", - "github.com" and "chaos-mesh.org"' - items: - type: string - type: array - remoteCluster: - description: RemoteCluster represents the remote cluster where the - chaos will be deployed - type: string - selector: - description: Selector is used to select pods that are used to inject - chaos action. - properties: - annotationSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be used to - select objects. A selector based on annotations. - type: object - expressionSelectors: - description: a slice of label selector expressions that can be - used to select objects. A list of selectors based on set-based - label expressions. - items: - description: A label selector requirement is a selector that - contains values, a key, and an operator that relates the key - and values. - properties: - key: - description: key is the label key that the selector applies - to. - type: string - operator: - description: operator represents a key's relationship to - a set of values. Valid operators are In, NotIn, Exists - and DoesNotExist. - type: string - values: - description: values is an array of string values. If the - operator is In or NotIn, the values array must be non-empty. - If the operator is Exists or DoesNotExist, the values - array must be empty. This array is replaced during a strategic - merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - fieldSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be used to - select objects. A selector based on fields. - type: object - labelSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be used to - select objects. A selector based on labels. - type: object - namespaces: - description: Namespaces is a set of namespace to which objects - belong. - items: - type: string - type: array - nodeSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be used to - select nodes. Selector which must match a node's labels, and - objects must belong to these selected nodes. - type: object - nodes: - description: Nodes is a set of node name and objects must belong - to these nodes. - items: - type: string - type: array - podPhaseSelectors: - description: 'PodPhaseSelectors is a set of condition of a pod - at the current time. supported value: Pending / Running / Succeeded - / Failed / Unknown' - items: - type: string - type: array - pods: - additionalProperties: - items: - type: string - type: array - description: Pods is a map of string keys and a set values that - used to select pods. The key defines the namespace which pods - belong, and the each values is a set of pod names. - type: object - type: object - value: - description: Value is required when the mode is set to `FixedMode` - / `FixedPercentMode` / `RandomMaxPercentMode`. If `FixedMode`, provide - an integer of pods to do chaos action. If `FixedPercentMode`, provide - a number from 0-100 to specify the percent of pods the server can - do chaos action. IF `RandomMaxPercentMode`, provide a number from - 0-100 to specify the max percent of pods to do chaos action - type: string - required: - - action - - mode - - selector - type: object - status: - description: Most recently observed status of the chaos experiment about - pods - properties: - conditions: - description: Conditions represents the current global condition of - the chaos - items: - properties: - reason: - type: string - status: - type: string - type: - type: string - required: - - status - - type - type: object - type: array - experiment: - description: Experiment records the last experiment state. - properties: - containerRecords: - description: Records are used to track the running status - items: - properties: - events: - description: Events are the essential details about the - injections and recoveries - items: - properties: - message: - description: Message is the detail message, e.g. the - reason why we failed to inject the chaos - type: string - operation: - description: Operation represents the operation we - are doing, when we crate this event - type: string - timestamp: - description: Timestamp is time when we create this - event - format: date-time - type: string - type: - description: Type means the stage of this event - type: string - required: - - operation - - timestamp - - type - type: object - type: array - id: - type: string - injectedCount: - description: InjectedCount is a counter to record the sum - of successful injections - type: integer - phase: - type: string - recoveredCount: - description: RecoveredCount is a counter to record the sum - of successful recoveries - type: integer - selectorKey: - type: string - required: - - id - - injectedCount - - phase - - recoveredCount - - selectorKey - type: object - type: array - desiredPhase: - enum: - - Run - - Stop - type: string - type: object - required: - - experiment - type: object - required: - - spec - type: object - served: true - storage: true - subresources: {} - ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.13.0 - name: gcpchaos.chaos-mesh.org -spec: - group: chaos-mesh.org - names: - kind: GCPChaos - listKind: GCPChaosList - plural: gcpchaos - singular: gcpchaos - scope: Namespaced - versions: - - additionalPrinterColumns: - - jsonPath: .spec.action - name: action - type: string - - jsonPath: .spec.duration - name: duration - type: string - name: v1alpha1 - schema: - openAPIV3Schema: - description: GCPChaos is the Schema for the gcpchaos API - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - description: GCPChaosSpec is the content of the specification for a GCPChaos - properties: - action: - description: 'Action defines the specific gcp chaos action. Supported - action: node-stop / node-reset / disk-loss Default action: node-stop' - enum: - - node-stop - - node-reset - - disk-loss - type: string - deviceNames: - description: The device name of disks to detach. Needed in disk-loss. - items: - type: string - type: array - duration: - description: Duration represents the duration of the chaos action. - type: string - instance: - description: Instance defines the name of the instance - type: string - project: - description: Project defines the ID of gcp project. - type: string - remoteCluster: - description: RemoteCluster represents the remote cluster where the - chaos will be deployed - type: string - secretName: - description: SecretName defines the name of kubernetes secret. It - is used for GCP credentials. - type: string - zone: - description: Zone defines the zone of gcp project. - type: string - required: - - action - - instance - - project - - zone - type: object - status: - description: GCPChaosStatus represents the status of a GCPChaos - properties: - attachedDiskStrings: - description: The attached disk info strings. Needed in disk-loss. - items: - type: string - type: array - conditions: - description: Conditions represents the current global condition of - the chaos - items: - properties: - reason: - type: string - status: - type: string - type: - type: string - required: - - status - - type - type: object - type: array - experiment: - description: Experiment records the last experiment state. - properties: - containerRecords: - description: Records are used to track the running status - items: - properties: - events: - description: Events are the essential details about the - injections and recoveries - items: - properties: - message: - description: Message is the detail message, e.g. the - reason why we failed to inject the chaos - type: string - operation: - description: Operation represents the operation we - are doing, when we crate this event - type: string - timestamp: - description: Timestamp is time when we create this - event - format: date-time - type: string - type: - description: Type means the stage of this event - type: string - required: - - operation - - timestamp - - type - type: object - type: array - id: - type: string - injectedCount: - description: InjectedCount is a counter to record the sum - of successful injections - type: integer - phase: - type: string - recoveredCount: - description: RecoveredCount is a counter to record the sum - of successful recoveries - type: integer - selectorKey: - type: string - required: - - id - - injectedCount - - phase - - recoveredCount - - selectorKey - type: object - type: array - desiredPhase: - enum: - - Run - - Stop - type: string - type: object - required: - - experiment - type: object - required: - - spec - type: object - served: true - storage: true - subresources: {} - ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.13.0 - name: httpchaos.chaos-mesh.org -spec: - group: chaos-mesh.org - names: - kind: HTTPChaos - listKind: HTTPChaosList - plural: httpchaos - singular: httpchaos - scope: Namespaced - versions: - - additionalPrinterColumns: - - jsonPath: .spec.duration - name: duration - type: string - name: v1alpha1 - schema: - openAPIV3Schema: - description: HTTPChaos is the Schema for the HTTPchaos API - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - properties: - abort: - description: Abort is a rule to abort a http session. - type: boolean - code: - description: Code is a rule to select target by http status code in - response. - format: int32 - type: integer - delay: - description: Delay represents the delay of the target request/response. - A duration string is a possibly unsigned sequence of decimal numbers, - each with optional fraction and a unit suffix, such as "300ms", - "2h45m". Valid time units are "ns", "us" (or "µs"), "ms", "s", "m", - "h". - type: string - duration: - description: Duration represents the duration of the chaos action. - type: string - method: - description: Method is a rule to select target by http method in request. - type: string - mode: - description: 'Mode defines the mode to run chaos action. Supported - mode: one / all / fixed / fixed-percent / random-max-percent' - enum: - - one - - all - - fixed - - fixed-percent - - random-max-percent - type: string - patch: - description: Patch is a rule to patch some contents in target. - properties: - body: - description: Body is a rule to patch message body of target. - properties: - type: - description: Type represents the patch type, only support - `JSON` as [merge patch json](https://tools.ietf.org/html/rfc7396) - currently. - type: string - value: - description: Value is the patch contents. - type: string - required: - - type - - value - type: object - headers: - description: 'Headers is a rule to append http headers of target. - For example: `[["Set-Cookie", ""], ["Set-Cookie", - ""]]`.' - items: - items: - type: string - type: array - type: array - queries: - description: 'Queries is a rule to append uri queries of target(Request - only). For example: `[["foo", "bar"], ["foo", "unknown"]]`.' - items: - items: - type: string - type: array - type: array - type: object - path: - description: Path is a rule to select target by uri path in http request. - type: string - port: - description: Port represents the target port to be proxy of. - format: int32 - type: integer - remoteCluster: - description: RemoteCluster represents the remote cluster where the - chaos will be deployed - type: string - replace: - description: Replace is a rule to replace some contents in target. - properties: - body: - description: Body is a rule to replace http message body in target. - format: byte - type: string - code: - description: Code is a rule to replace http status code in response. - format: int32 - type: integer - headers: - additionalProperties: - type: string - description: Headers is a rule to replace http headers of target. - The key-value pairs represent header name and header value pairs. - type: object - method: - description: Method is a rule to replace http method in request. - type: string - path: - description: Path is rule to to replace uri path in http request. - type: string - queries: - additionalProperties: - type: string - description: 'Queries is a rule to replace uri queries in http - request. For example, with value `{ "foo": "unknown" }`, the - `/?foo=bar` will be altered to `/?foo=unknown`,' - type: object - type: object - request_headers: - additionalProperties: - type: string - description: RequestHeaders is a rule to select target by http headers - in request. The key-value pairs represent header name and header - value pairs. - type: object - response_headers: - additionalProperties: - type: string - description: ResponseHeaders is a rule to select target by http headers - in response. The key-value pairs represent header name and header - value pairs. - type: object - selector: - description: Selector is used to select pods that are used to inject - chaos action. - properties: - annotationSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be used to - select objects. A selector based on annotations. - type: object - expressionSelectors: - description: a slice of label selector expressions that can be - used to select objects. A list of selectors based on set-based - label expressions. - items: - description: A label selector requirement is a selector that - contains values, a key, and an operator that relates the key - and values. - properties: - key: - description: key is the label key that the selector applies - to. - type: string - operator: - description: operator represents a key's relationship to - a set of values. Valid operators are In, NotIn, Exists - and DoesNotExist. - type: string - values: - description: values is an array of string values. If the - operator is In or NotIn, the values array must be non-empty. - If the operator is Exists or DoesNotExist, the values - array must be empty. This array is replaced during a strategic - merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - fieldSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be used to - select objects. A selector based on fields. - type: object - labelSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be used to - select objects. A selector based on labels. - type: object - namespaces: - description: Namespaces is a set of namespace to which objects - belong. - items: - type: string - type: array - nodeSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be used to - select nodes. Selector which must match a node's labels, and - objects must belong to these selected nodes. - type: object - nodes: - description: Nodes is a set of node name and objects must belong - to these nodes. - items: - type: string - type: array - podPhaseSelectors: - description: 'PodPhaseSelectors is a set of condition of a pod - at the current time. supported value: Pending / Running / Succeeded - / Failed / Unknown' - items: - type: string - type: array - pods: - additionalProperties: - items: - type: string - type: array - description: Pods is a map of string keys and a set values that - used to select pods. The key defines the namespace which pods - belong, and the each values is a set of pod names. - type: object - type: object - target: - description: Target is the object to be selected and injected. - enum: - - Request - - Response - type: string - tls: - description: TLS is the tls config, will override PodHttpChaos if - there are multiple HTTPChaos experiments are applied - properties: - caName: - description: CAName represents the data name of ca file in secret, - `ca.crt` for example - type: string - certName: - description: CertName represents the data name of cert file in - secret, `tls.crt` for example - type: string - keyName: - description: KeyName represents the data name of key file in secret, - `tls.key` for example - type: string - secretName: - description: SecretName represents the name of required secret - resource - type: string - secretNamespace: - description: SecretNamespace represents the namespace of required - secret resource - type: string - required: - - certName - - keyName - - secretName - - secretNamespace - type: object - value: - description: Value is required when the mode is set to `FixedMode` - / `FixedPercentMode` / `RandomMaxPercentMode`. If `FixedMode`, provide - an integer of pods to do chaos action. If `FixedPercentMode`, provide - a number from 0-100 to specify the percent of pods the server can - do chaos action. IF `RandomMaxPercentMode`, provide a number from - 0-100 to specify the max percent of pods to do chaos action - type: string - required: - - mode - - selector - - target - type: object - status: - properties: - conditions: - description: Conditions represents the current global condition of - the chaos - items: - properties: - reason: - type: string - status: - type: string - type: - type: string - required: - - status - - type - type: object - type: array - experiment: - description: Experiment records the last experiment state. - properties: - containerRecords: - description: Records are used to track the running status - items: - properties: - events: - description: Events are the essential details about the - injections and recoveries - items: - properties: - message: - description: Message is the detail message, e.g. the - reason why we failed to inject the chaos - type: string - operation: - description: Operation represents the operation we - are doing, when we crate this event - type: string - timestamp: - description: Timestamp is time when we create this - event - format: date-time - type: string - type: - description: Type means the stage of this event - type: string - required: - - operation - - timestamp - - type - type: object - type: array - id: - type: string - injectedCount: - description: InjectedCount is a counter to record the sum - of successful injections - type: integer - phase: - type: string - recoveredCount: - description: RecoveredCount is a counter to record the sum - of successful recoveries - type: integer - selectorKey: - type: string - required: - - id - - injectedCount - - phase - - recoveredCount - - selectorKey - type: object - type: array - desiredPhase: - enum: - - Run - - Stop - type: string - type: object - instances: - additionalProperties: - format: int64 - type: integer - description: Instances always specifies podhttpchaos generation or - empty - type: object - required: - - experiment - type: object - type: object - served: true - storage: true - subresources: {} - ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.13.0 - name: iochaos.chaos-mesh.org -spec: - group: chaos-mesh.org - names: - kind: IOChaos - listKind: IOChaosList - plural: iochaos - singular: iochaos - scope: Namespaced - versions: - - additionalPrinterColumns: - - jsonPath: .spec.action - name: action - type: string - - jsonPath: .spec.duration - name: duration - type: string - name: v1alpha1 - schema: - openAPIV3Schema: - description: IOChaos is the Schema for the iochaos API - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - description: IOChaosSpec defines the desired state of IOChaos - properties: - action: - description: 'Action defines the specific pod chaos action. Supported - action: latency / fault / attrOverride / mistake' - enum: - - latency - - fault - - attrOverride - - mistake - type: string - attr: - description: Attr defines the overrided attribution - properties: - atime: - description: Timespec represents a time - properties: - nsec: - format: int64 - type: integer - sec: - format: int64 - type: integer - required: - - nsec - - sec - type: object - blocks: - format: int64 - type: integer - ctime: - description: Timespec represents a time - properties: - nsec: - format: int64 - type: integer - sec: - format: int64 - type: integer - required: - - nsec - - sec - type: object - gid: - format: int32 - type: integer - ino: - format: int64 - type: integer - kind: - description: FileType represents type of file - type: string - mtime: - description: Timespec represents a time - properties: - nsec: - format: int64 - type: integer - sec: - format: int64 - type: integer - required: - - nsec - - sec - type: object - nlink: - format: int32 - type: integer - perm: - type: integer - rdev: - format: int32 - type: integer - size: - format: int64 - type: integer - uid: - format: int32 - type: integer - type: object - containerNames: - description: ContainerNames indicates list of the name of affected - container. If not set, the first container will be injected - items: - type: string - type: array - delay: - description: Delay defines the value of I/O chaos action delay. A - delay string is a possibly signed sequence of decimal numbers, each - with optional fraction and a unit suffix, such as "300ms". Valid - time units are "ns", "us" (or "µs"), "ms", "s", "m", "h". - type: string - duration: - description: Duration represents the duration of the chaos action. - It is required when the action is `PodFailureAction`. A duration - string is a possibly signed sequence of decimal numbers, each with - optional fraction and a unit suffix, such as "300ms", "-1.5h" or - "2h45m". Valid time units are "ns", "us" (or "µs"), "ms", "s", "m", - "h". - type: string - errno: - description: 'Errno defines the error code that returned by I/O action. - refer to: https://www-numi.fnal.gov/offline_software/srt_public_context/WebDocs/Errors/unix_system_errors.html' - format: int32 - type: integer - methods: - description: 'Methods defines the I/O methods for injecting I/O chaos - action. default: all I/O methods.' - items: - type: string - type: array - mistake: - description: Mistake defines what types of incorrectness are injected - to IO operations - properties: - filling: - description: Filling determines what is filled in the mistake - data. - enum: - - zero - - random - type: string - maxLength: - description: Max length of each wrong data segment in bytes - format: int64 - minimum: 1 - type: integer - maxOccurrences: - description: There will be [1, MaxOccurrences] segments of wrong - data. - format: int64 - minimum: 1 - type: integer - type: object - mode: - description: 'Mode defines the mode to run chaos action. Supported - mode: one / all / fixed / fixed-percent / random-max-percent' - enum: - - one - - all - - fixed - - fixed-percent - - random-max-percent - type: string - path: - description: Path defines the path of files for injecting I/O chaos - action. - type: string - percent: - default: 100 - description: 'Percent defines the percentage of injection errors and - provides a number from 0-100. default: 100.' - type: integer - remoteCluster: - description: RemoteCluster represents the remote cluster where the - chaos will be deployed - type: string - selector: - description: Selector is used to select pods that are used to inject - chaos action. - properties: - annotationSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be used to - select objects. A selector based on annotations. - type: object - expressionSelectors: - description: a slice of label selector expressions that can be - used to select objects. A list of selectors based on set-based - label expressions. - items: - description: A label selector requirement is a selector that - contains values, a key, and an operator that relates the key - and values. - properties: - key: - description: key is the label key that the selector applies - to. - type: string - operator: - description: operator represents a key's relationship to - a set of values. Valid operators are In, NotIn, Exists - and DoesNotExist. - type: string - values: - description: values is an array of string values. If the - operator is In or NotIn, the values array must be non-empty. - If the operator is Exists or DoesNotExist, the values - array must be empty. This array is replaced during a strategic - merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - fieldSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be used to - select objects. A selector based on fields. - type: object - labelSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be used to - select objects. A selector based on labels. - type: object - namespaces: - description: Namespaces is a set of namespace to which objects - belong. - items: - type: string - type: array - nodeSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be used to - select nodes. Selector which must match a node's labels, and - objects must belong to these selected nodes. - type: object - nodes: - description: Nodes is a set of node name and objects must belong - to these nodes. - items: - type: string - type: array - podPhaseSelectors: - description: 'PodPhaseSelectors is a set of condition of a pod - at the current time. supported value: Pending / Running / Succeeded - / Failed / Unknown' - items: - type: string - type: array - pods: - additionalProperties: - items: - type: string - type: array - description: Pods is a map of string keys and a set values that - used to select pods. The key defines the namespace which pods - belong, and the each values is a set of pod names. - type: object - type: object - value: - description: Value is required when the mode is set to `FixedMode` - / `FixedPercentMode` / `RandomMaxPercentMode`. If `FixedMode`, provide - an integer of pods to do chaos action. If `FixedPercentMode`, provide - a number from 0-100 to specify the percent of pods the server can - do chaos action. IF `RandomMaxPercentMode`, provide a number from - 0-100 to specify the max percent of pods to do chaos action - type: string - volumePath: - description: VolumePath represents the mount path of injected volume - type: string - required: - - action - - mode - - selector - - volumePath - type: object - status: - description: IOChaosStatus defines the observed state of IOChaos - properties: - conditions: - description: Conditions represents the current global condition of - the chaos - items: - properties: - reason: - type: string - status: - type: string - type: - type: string - required: - - status - - type - type: object - type: array - experiment: - description: Experiment records the last experiment state. - properties: - containerRecords: - description: Records are used to track the running status - items: - properties: - events: - description: Events are the essential details about the - injections and recoveries - items: - properties: - message: - description: Message is the detail message, e.g. the - reason why we failed to inject the chaos - type: string - operation: - description: Operation represents the operation we - are doing, when we crate this event - type: string - timestamp: - description: Timestamp is time when we create this - event - format: date-time - type: string - type: - description: Type means the stage of this event - type: string - required: - - operation - - timestamp - - type - type: object - type: array - id: - type: string - injectedCount: - description: InjectedCount is a counter to record the sum - of successful injections - type: integer - phase: - type: string - recoveredCount: - description: RecoveredCount is a counter to record the sum - of successful recoveries - type: integer - selectorKey: - type: string - required: - - id - - injectedCount - - phase - - recoveredCount - - selectorKey - type: object - type: array - desiredPhase: - enum: - - Run - - Stop - type: string - type: object - instances: - additionalProperties: - format: int64 - type: integer - description: Instances always specifies podiochaos generation or empty - type: object - required: - - experiment - type: object - type: object - served: true - storage: true - subresources: {} - ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.13.0 - name: jvmchaos.chaos-mesh.org -spec: - group: chaos-mesh.org - names: - kind: JVMChaos - listKind: JVMChaosList - plural: jvmchaos - singular: jvmchaos - scope: Namespaced - versions: - - additionalPrinterColumns: - - jsonPath: .spec.action - name: action - type: string - - jsonPath: .spec.duration - name: duration - type: string - name: v1alpha1 - schema: - openAPIV3Schema: - description: JVMChaos is the Schema for the jvmchaos API - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - description: JVMChaosSpec defines the desired state of JVMChaos - properties: - action: - description: 'Action defines the specific jvm chaos action. Supported - action: latency;return;exception;stress;gc;ruleData' - enum: - - latency - - return - - exception - - stress - - gc - - ruleData - - mysql - type: string - class: - description: Java class - type: string - containerNames: - description: ContainerNames indicates list of the name of affected - container. If not set, the first container will be injected - items: - type: string - type: array - cpuCount: - description: the CPU core number needs to use, only set it when action - is stress - type: integer - database: - description: the match database default value is "", means match all - database - type: string - duration: - description: Duration represents the duration of the chaos action - type: string - exception: - description: the exception which needs to throw for action `exception` - or the exception message needs to throw in action `mysql` - type: string - latency: - description: the latency duration for action 'latency', unit ms or - the latency duration in action `mysql` - type: integer - memType: - description: the memory type needs to locate, only set it when action - is stress, the value can be 'stack' or 'heap' - type: string - method: - description: the method in Java class - type: string - mode: - description: 'Mode defines the mode to run chaos action. Supported - mode: one / all / fixed / fixed-percent / random-max-percent' - enum: - - one - - all - - fixed - - fixed-percent - - random-max-percent - type: string - mysqlConnectorVersion: - description: the version of mysql-connector-java, only support 5.X.X(set - to "5") and 8.X.X(set to "8") now - type: string - name: - description: byteman rule name, should be unique, and will generate - one if not set - type: string - pid: - description: the pid of Java process which needs to attach - type: integer - port: - description: the port of agent server, default 9277 - format: int32 - type: integer - remoteCluster: - description: RemoteCluster represents the remote cluster where the - chaos will be deployed - type: string - ruleData: - description: the byteman rule's data for action 'ruleData' - type: string - selector: - description: Selector is used to select pods that are used to inject - chaos action. - properties: - annotationSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be used to - select objects. A selector based on annotations. - type: object - expressionSelectors: - description: a slice of label selector expressions that can be - used to select objects. A list of selectors based on set-based - label expressions. - items: - description: A label selector requirement is a selector that - contains values, a key, and an operator that relates the key - and values. - properties: - key: - description: key is the label key that the selector applies - to. - type: string - operator: - description: operator represents a key's relationship to - a set of values. Valid operators are In, NotIn, Exists - and DoesNotExist. - type: string - values: - description: values is an array of string values. If the - operator is In or NotIn, the values array must be non-empty. - If the operator is Exists or DoesNotExist, the values - array must be empty. This array is replaced during a strategic - merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - fieldSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be used to - select objects. A selector based on fields. - type: object - labelSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be used to - select objects. A selector based on labels. - type: object - namespaces: - description: Namespaces is a set of namespace to which objects - belong. - items: - type: string - type: array - nodeSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be used to - select nodes. Selector which must match a node's labels, and - objects must belong to these selected nodes. - type: object - nodes: - description: Nodes is a set of node name and objects must belong - to these nodes. - items: - type: string - type: array - podPhaseSelectors: - description: 'PodPhaseSelectors is a set of condition of a pod - at the current time. supported value: Pending / Running / Succeeded - / Failed / Unknown' - items: - type: string - type: array - pods: - additionalProperties: - items: - type: string - type: array - description: Pods is a map of string keys and a set values that - used to select pods. The key defines the namespace which pods - belong, and the each values is a set of pod names. - type: object - type: object - sqlType: - description: the match sql type default value is "", means match all - SQL type. The value can be 'select', 'insert', 'update', 'delete', - 'replace'. - type: string - table: - description: the match table default value is "", means match all - table - type: string - value: - description: Value is required when the mode is set to `FixedMode` - / `FixedPercentMode` / `RandomMaxPercentMode`. If `FixedMode`, provide - an integer of pods to do chaos action. If `FixedPercentMode`, provide - a number from 0-100 to specify the percent of pods the server can - do chaos action. IF `RandomMaxPercentMode`, provide a number from - 0-100 to specify the max percent of pods to do chaos action - type: string - required: - - action - - mode - - selector - type: object - status: - description: JVMChaosStatus defines the observed state of JVMChaos - properties: - conditions: - description: Conditions represents the current global condition of - the chaos - items: - properties: - reason: - type: string - status: - type: string - type: - type: string - required: - - status - - type - type: object - type: array - experiment: - description: Experiment records the last experiment state. - properties: - containerRecords: - description: Records are used to track the running status - items: - properties: - events: - description: Events are the essential details about the - injections and recoveries - items: - properties: - message: - description: Message is the detail message, e.g. the - reason why we failed to inject the chaos - type: string - operation: - description: Operation represents the operation we - are doing, when we crate this event - type: string - timestamp: - description: Timestamp is time when we create this - event - format: date-time - type: string - type: - description: Type means the stage of this event - type: string - required: - - operation - - timestamp - - type - type: object - type: array - id: - type: string - injectedCount: - description: InjectedCount is a counter to record the sum - of successful injections - type: integer - phase: - type: string - recoveredCount: - description: RecoveredCount is a counter to record the sum - of successful recoveries - type: integer - selectorKey: - type: string - required: - - id - - injectedCount - - phase - - recoveredCount - - selectorKey - type: object - type: array - desiredPhase: - enum: - - Run - - Stop - type: string - type: object - required: - - experiment - type: object - type: object - served: true - storage: true - subresources: {} - ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.13.0 - name: kernelchaos.chaos-mesh.org -spec: - group: chaos-mesh.org - names: - kind: KernelChaos - listKind: KernelChaosList - plural: kernelchaos - singular: kernelchaos - scope: Namespaced - versions: - - additionalPrinterColumns: - - jsonPath: .spec.duration - name: duration - type: string - name: v1alpha1 - schema: - openAPIV3Schema: - description: KernelChaos is the Schema for the kernelchaos API - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - description: Spec defines the behavior of a kernel chaos experiment - properties: - containerNames: - description: ContainerNames indicates list of the name of affected - container. If not set, the first container will be injected - items: - type: string - type: array - duration: - description: Duration represents the duration of the chaos action - type: string - failKernRequest: - description: FailKernRequest defines the request of kernel injection - properties: - callchain: - description: 'Callchain indicate a special call chain, such as: - ext4_mount -> mount_subtree -> ... -> should_failslab With an - optional set of predicates and an optional set of parameters, - which used with predicates. You can read call chan and predicate - examples from https://github.com/chaos-mesh/bpfki/tree/develop/examples - to learn more. If no special call chain, just keep Callchain - empty, which means it will fail at any call chain with slab - alloc (eg: kmalloc).' - items: - description: Frame defines the function signature and predicate - in function's body - properties: - funcname: - description: Funcname can be find from kernel source or - `/proc/kallsyms`, such as `ext4_mount` - type: string - parameters: - description: Parameters is used with predicate, for example, - if you want to inject slab error in `d_alloc_parallel(struct - dentry *parent, const struct qstr *name)` with a special - name `bananas`, you need to set it to `struct dentry *parent, - const struct qstr *name` otherwise omit it. - type: string - predicate: - description: Predicate will access the arguments of this - Frame, example with Parameters's, you can set it to `STRNCMP(name->name, - "bananas", 8)` to make inject only with it, or omit it - to inject for all d_alloc_parallel call chain. - type: string - type: object - type: array - failtype: - description: 'FailType indicates what to fail, can be set to ''0'' - / ''1'' / ''2'' If `0`, indicates slab to fail (should_failslab) - If `1`, indicates alloc_page to fail (should_fail_alloc_page) - If `2`, indicates bio to fail (should_fail_bio) You can read: - 1. https://www.kernel.org/doc/html/latest/fault-injection/fault-injection.html - 2. http://github.com/iovisor/bcc/blob/master/tools/inject_example.txt - to learn more' - format: int32 - maximum: 2 - minimum: 0 - type: integer - headers: - description: 'Headers indicates the appropriate kernel headers - you need. Eg: "linux/mmzone.h", "linux/blkdev.h" and so on' - items: - type: string - type: array - probability: - description: Probability indicates the fails with probability. - If you want 1%, please set this field with 1. - format: int32 - maximum: 100 - minimum: 0 - type: integer - times: - description: Times indicates the max times of fails. - format: int32 - minimum: 0 - type: integer - required: - - failtype - type: object - mode: - description: 'Mode defines the mode to run chaos action. Supported - mode: one / all / fixed / fixed-percent / random-max-percent' - enum: - - one - - all - - fixed - - fixed-percent - - random-max-percent - type: string - remoteCluster: - description: RemoteCluster represents the remote cluster where the - chaos will be deployed - type: string - selector: - description: Selector is used to select pods that are used to inject - chaos action. - properties: - annotationSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be used to - select objects. A selector based on annotations. - type: object - expressionSelectors: - description: a slice of label selector expressions that can be - used to select objects. A list of selectors based on set-based - label expressions. - items: - description: A label selector requirement is a selector that - contains values, a key, and an operator that relates the key - and values. - properties: - key: - description: key is the label key that the selector applies - to. - type: string - operator: - description: operator represents a key's relationship to - a set of values. Valid operators are In, NotIn, Exists - and DoesNotExist. - type: string - values: - description: values is an array of string values. If the - operator is In or NotIn, the values array must be non-empty. - If the operator is Exists or DoesNotExist, the values - array must be empty. This array is replaced during a strategic - merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - fieldSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be used to - select objects. A selector based on fields. - type: object - labelSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be used to - select objects. A selector based on labels. - type: object - namespaces: - description: Namespaces is a set of namespace to which objects - belong. - items: - type: string - type: array - nodeSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be used to - select nodes. Selector which must match a node's labels, and - objects must belong to these selected nodes. - type: object - nodes: - description: Nodes is a set of node name and objects must belong - to these nodes. - items: - type: string - type: array - podPhaseSelectors: - description: 'PodPhaseSelectors is a set of condition of a pod - at the current time. supported value: Pending / Running / Succeeded - / Failed / Unknown' - items: - type: string - type: array - pods: - additionalProperties: - items: - type: string - type: array - description: Pods is a map of string keys and a set values that - used to select pods. The key defines the namespace which pods - belong, and the each values is a set of pod names. - type: object - type: object - value: - description: Value is required when the mode is set to `FixedMode` - / `FixedPercentMode` / `RandomMaxPercentMode`. If `FixedMode`, provide - an integer of pods to do chaos action. If `FixedPercentMode`, provide - a number from 0-100 to specify the percent of pods the server can - do chaos action. IF `RandomMaxPercentMode`, provide a number from - 0-100 to specify the max percent of pods to do chaos action - type: string - required: - - failKernRequest - - mode - - selector - type: object - status: - description: Most recently observed status of the kernel chaos experiment - properties: - conditions: - description: Conditions represents the current global condition of - the chaos - items: - properties: - reason: - type: string - status: - type: string - type: - type: string - required: - - status - - type - type: object - type: array - experiment: - description: Experiment records the last experiment state. - properties: - containerRecords: - description: Records are used to track the running status - items: - properties: - events: - description: Events are the essential details about the - injections and recoveries - items: - properties: - message: - description: Message is the detail message, e.g. the - reason why we failed to inject the chaos - type: string - operation: - description: Operation represents the operation we - are doing, when we crate this event - type: string - timestamp: - description: Timestamp is time when we create this - event - format: date-time - type: string - type: - description: Type means the stage of this event - type: string - required: - - operation - - timestamp - - type - type: object - type: array - id: - type: string - injectedCount: - description: InjectedCount is a counter to record the sum - of successful injections - type: integer - phase: - type: string - recoveredCount: - description: RecoveredCount is a counter to record the sum - of successful recoveries - type: integer - selectorKey: - type: string - required: - - id - - injectedCount - - phase - - recoveredCount - - selectorKey - type: object - type: array - desiredPhase: - enum: - - Run - - Stop - type: string - type: object - required: - - experiment - type: object - required: - - spec - type: object - served: true - storage: true - subresources: {} - ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.13.0 - name: networkchaos.chaos-mesh.org -spec: - group: chaos-mesh.org - names: - kind: NetworkChaos - listKind: NetworkChaosList - plural: networkchaos - singular: networkchaos - scope: Namespaced - versions: - - additionalPrinterColumns: - - jsonPath: .spec.action - name: action - type: string - - jsonPath: .spec.duration - name: duration - type: string - name: v1alpha1 - schema: - openAPIV3Schema: - description: NetworkChaos is the Schema for the networkchaos API - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - description: Spec defines the behavior of a pod chaos experiment - properties: - action: - description: 'Action defines the specific network chaos action. Supported - action: partition, netem, delay, loss, duplicate, corrupt Default - action: delay' - enum: - - netem - - delay - - loss - - duplicate - - corrupt - - partition - - bandwidth - type: string - bandwidth: - description: Bandwidth represents the detail about bandwidth control - action - properties: - buffer: - description: Buffer is the maximum amount of bytes that tokens - can be available for instantaneously. - format: int32 - minimum: 1 - type: integer - limit: - description: Limit is the number of bytes that can be queued waiting - for tokens to become available. - format: int32 - minimum: 1 - type: integer - minburst: - description: Minburst specifies the size of the peakrate bucket. - For perfect accuracy, should be set to the MTU of the interface. If - a peakrate is needed, but some burstiness is acceptable, this - size can be raised. A 3000 byte minburst allows around 3mbit/s - of peakrate, given 1000 byte packets. - format: int32 - minimum: 0 - type: integer - peakrate: - description: Peakrate is the maximum depletion rate of the bucket. - The peakrate does not need to be set, it is only necessary if - perfect millisecond timescale shaping is required. - format: int64 - minimum: 0 - type: integer - rate: - description: Rate is the speed knob. Allows bit, kbit, mbit, gbit, - tbit, bps, kbps, mbps, gbps, tbps unit. bps means bytes per - second. - type: string - required: - - buffer - - limit - - rate - type: object - corrupt: - description: Corrupt represents the detail about corrupt action - properties: - correlation: - type: string - corrupt: - type: string - required: - - corrupt - type: object - delay: - description: Delay represents the detail about delay action - properties: - correlation: - type: string - jitter: - type: string - latency: - type: string - reorder: - description: ReorderSpec defines details of packet reorder. - properties: - correlation: - type: string - gap: - type: integer - reorder: - type: string - required: - - gap - - reorder - type: object - required: - - latency - type: object - device: - description: Device represents the network device to be affected. - type: string - direction: - default: to - description: Direction represents the direction, this applies on netem - and network partition action - enum: - - to - - from - - both - type: string - duplicate: - description: DuplicateSpec represents the detail about loss action - properties: - correlation: - type: string - duplicate: - type: string - required: - - duplicate - type: object - duration: - description: Duration represents the duration of the chaos action - type: string - externalTargets: - description: ExternalTargets represents network targets outside k8s - items: - type: string - type: array - loss: - description: Loss represents the detail about loss action - properties: - correlation: - type: string - loss: - type: string - required: - - loss - type: object - mode: - description: 'Mode defines the mode to run chaos action. Supported - mode: one / all / fixed / fixed-percent / random-max-percent' - enum: - - one - - all - - fixed - - fixed-percent - - random-max-percent - type: string - rate: - description: Rate represents the detail about rate control action - properties: - rate: - description: Rate is the speed knob. Allows bit, kbit, mbit, gbit, - tbit, bps, kbps, mbps, gbps, tbps unit. bps means bytes per - second. - type: string - required: - - rate - type: object - remoteCluster: - description: RemoteCluster represents the remote cluster where the - chaos will be deployed - type: string - selector: - description: Selector is used to select pods that are used to inject - chaos action. - properties: - annotationSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be used to - select objects. A selector based on annotations. - type: object - expressionSelectors: - description: a slice of label selector expressions that can be - used to select objects. A list of selectors based on set-based - label expressions. - items: - description: A label selector requirement is a selector that - contains values, a key, and an operator that relates the key - and values. - properties: - key: - description: key is the label key that the selector applies - to. - type: string - operator: - description: operator represents a key's relationship to - a set of values. Valid operators are In, NotIn, Exists - and DoesNotExist. - type: string - values: - description: values is an array of string values. If the - operator is In or NotIn, the values array must be non-empty. - If the operator is Exists or DoesNotExist, the values - array must be empty. This array is replaced during a strategic - merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - fieldSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be used to - select objects. A selector based on fields. - type: object - labelSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be used to - select objects. A selector based on labels. - type: object - namespaces: - description: Namespaces is a set of namespace to which objects - belong. - items: - type: string - type: array - nodeSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be used to - select nodes. Selector which must match a node's labels, and - objects must belong to these selected nodes. - type: object - nodes: - description: Nodes is a set of node name and objects must belong - to these nodes. - items: - type: string - type: array - podPhaseSelectors: - description: 'PodPhaseSelectors is a set of condition of a pod - at the current time. supported value: Pending / Running / Succeeded - / Failed / Unknown' - items: - type: string - type: array - pods: - additionalProperties: - items: - type: string - type: array - description: Pods is a map of string keys and a set values that - used to select pods. The key defines the namespace which pods - belong, and the each values is a set of pod names. - type: object - type: object - target: - description: Target represents network target, this applies on netem - and network partition action - properties: - mode: - description: 'Mode defines the mode to run chaos action. Supported - mode: one / all / fixed / fixed-percent / random-max-percent' - enum: - - one - - all - - fixed - - fixed-percent - - random-max-percent - type: string - selector: - description: Selector is used to select pods that are used to - inject chaos action. - properties: - annotationSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be used - to select objects. A selector based on annotations. - type: object - expressionSelectors: - description: a slice of label selector expressions that can - be used to select objects. A list of selectors based on - set-based label expressions. - items: - description: A label selector requirement is a selector - that contains values, a key, and an operator that relates - the key and values. - properties: - key: - description: key is the label key that the selector - applies to. - type: string - operator: - description: operator represents a key's relationship - to a set of values. Valid operators are In, NotIn, - Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. If - the operator is In or NotIn, the values array must - be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. This array is replaced - during a strategic merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - fieldSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be used - to select objects. A selector based on fields. - type: object - labelSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be used - to select objects. A selector based on labels. - type: object - namespaces: - description: Namespaces is a set of namespace to which objects - belong. - items: - type: string - type: array - nodeSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be used - to select nodes. Selector which must match a node's labels, - and objects must belong to these selected nodes. - type: object - nodes: - description: Nodes is a set of node name and objects must - belong to these nodes. - items: - type: string - type: array - podPhaseSelectors: - description: 'PodPhaseSelectors is a set of condition of a - pod at the current time. supported value: Pending / Running - / Succeeded / Failed / Unknown' - items: - type: string - type: array - pods: - additionalProperties: - items: - type: string - type: array - description: Pods is a map of string keys and a set values - that used to select pods. The key defines the namespace - which pods belong, and the each values is a set of pod names. - type: object - type: object - value: - description: Value is required when the mode is set to `FixedMode` - / `FixedPercentMode` / `RandomMaxPercentMode`. If `FixedMode`, - provide an integer of pods to do chaos action. If `FixedPercentMode`, - provide a number from 0-100 to specify the percent of pods the - server can do chaos action. IF `RandomMaxPercentMode`, provide - a number from 0-100 to specify the max percent of pods to do - chaos action - type: string - required: - - mode - - selector - type: object - targetDevice: - description: TargetDevice represents the network device to be affected - in target scope. - type: string - value: - description: Value is required when the mode is set to `FixedMode` - / `FixedPercentMode` / `RandomMaxPercentMode`. If `FixedMode`, provide - an integer of pods to do chaos action. If `FixedPercentMode`, provide - a number from 0-100 to specify the percent of pods the server can - do chaos action. IF `RandomMaxPercentMode`, provide a number from - 0-100 to specify the max percent of pods to do chaos action - type: string - required: - - action - - mode - - selector - type: object - status: - description: Most recently observed status of the chaos experiment about - pods - properties: - conditions: - description: Conditions represents the current global condition of - the chaos - items: - properties: - reason: - type: string - status: - type: string - type: - type: string - required: - - status - - type - type: object - type: array - experiment: - description: Experiment records the last experiment state. - properties: - containerRecords: - description: Records are used to track the running status - items: - properties: - events: - description: Events are the essential details about the - injections and recoveries - items: - properties: - message: - description: Message is the detail message, e.g. the - reason why we failed to inject the chaos - type: string - operation: - description: Operation represents the operation we - are doing, when we crate this event - type: string - timestamp: - description: Timestamp is time when we create this - event - format: date-time - type: string - type: - description: Type means the stage of this event - type: string - required: - - operation - - timestamp - - type - type: object - type: array - id: - type: string - injectedCount: - description: InjectedCount is a counter to record the sum - of successful injections - type: integer - phase: - type: string - recoveredCount: - description: RecoveredCount is a counter to record the sum - of successful recoveries - type: integer - selectorKey: - type: string - required: - - id - - injectedCount - - phase - - recoveredCount - - selectorKey - type: object - type: array - desiredPhase: - enum: - - Run - - Stop - type: string - type: object - instances: - additionalProperties: - format: int64 - type: integer - description: Instances always specifies podnetworkchaos generation - or empty - type: object - required: - - experiment - type: object - required: - - spec - type: object - served: true - storage: true - subresources: {} - ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.13.0 - name: physicalmachinechaos.chaos-mesh.org -spec: - group: chaos-mesh.org - names: - kind: PhysicalMachineChaos - listKind: PhysicalMachineChaosList - plural: physicalmachinechaos - singular: physicalmachinechaos - scope: Namespaced - versions: - - additionalPrinterColumns: - - jsonPath: .spec.action - name: action - type: string - - jsonPath: .spec.duration - name: duration - type: string - name: v1alpha1 - schema: - openAPIV3Schema: - description: PhysicalMachineChaos is the Schema for the physical machine chaos - API - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - description: Spec defines the behavior of a physical machine chaos experiment - properties: - action: - description: the subAction, generate automatically - enum: - - stress-cpu - - stress-mem - - disk-read-payload - - disk-write-payload - - disk-fill - - network-corrupt - - network-duplicate - - network-loss - - network-delay - - network-partition - - network-dns - - network-bandwidth - - network-flood - - network-down - - process - - jvm-exception - - jvm-gc - - jvm-latency - - jvm-return - - jvm-stress - - jvm-rule-data - - jvm-mysql - - clock - - redis-expiration - - redis-penetration - - redis-cacheLimit - - redis-restart - - redis-stop - - kafka-fill - - kafka-flood - - kafka-io - - file-create - - file-modify - - file-delete - - file-rename - - file-append - - file-replace - - vm - - user_defined - type: string - address: - description: 'DEPRECATED: Use Selector instead. Only one of Address - and Selector could be specified.' - items: - type: string - type: array - clock: - properties: - clock-ids-slice: - description: the identifier of the particular clock on which to - act. More clock description in linux kernel can be found in - man page of clock_getres, clock_gettime, clock_settime. Muti - clock ids should be split with "," - type: string - pid: - description: the pid of target program. - type: integer - time-offset: - description: specifies the length of time offset. - type: string - type: object - disk-fill: - properties: - fill-by-fallocate: - description: fill disk by fallocate - type: boolean - path: - description: specifies the location to fill data in. if path not - provided, payload will read/write from/into a temp file, temp - file will be deleted after writing - type: string - size: - description: 'specifies how many units of data will write into - the file path. support unit: c=1, w=2, b=512, kB=1000, K=1024, - MB=1000*1000, M=1024*1024, GB=1000*1000*1000, G=1024*1024*1024 - BYTES. example : 1M | 512kB' - type: string - type: object - disk-read-payload: - properties: - path: - description: specifies the location to fill data in. if path not - provided, payload will read/write from/into a temp file, temp - file will be deleted after writing - type: string - payload-process-num: - description: specifies the number of process work on writing, - default 1, only 1-255 is valid value - type: integer - size: - description: 'specifies how many units of data will write into - the file path. support unit: c=1, w=2, b=512, kB=1000, K=1024, - MB=1000*1000, M=1024*1024, GB=1000*1000*1000, G=1024*1024*1024 - BYTES. example : 1M | 512kB' - type: string - type: object - disk-write-payload: - properties: - path: - description: specifies the location to fill data in. if path not - provided, payload will read/write from/into a temp file, temp - file will be deleted after writing - type: string - payload-process-num: - description: specifies the number of process work on writing, - default 1, only 1-255 is valid value - type: integer - size: - description: 'specifies how many units of data will write into - the file path. support unit: c=1, w=2, b=512, kB=1000, K=1024, - MB=1000*1000, M=1024*1024, GB=1000*1000*1000, G=1024*1024*1024 - BYTES. example : 1M | 512kB' - type: string - type: object - duration: - description: Duration represents the duration of the chaos action - type: string - file-append: - properties: - count: - description: Count is the number of times to append the data. - type: integer - data: - description: Data is the data for append. - type: string - file-name: - description: FileName is the name of the file to be created, modified, - deleted, renamed, or appended. - type: string - type: object - file-create: - properties: - dir-name: - description: DirName is the directory name to create or delete. - type: string - file-name: - description: FileName is the name of the file to be created, modified, - deleted, renamed, or appended. - type: string - type: object - file-delete: - properties: - dir-name: - description: DirName is the directory name to create or delete. - type: string - file-name: - description: FileName is the name of the file to be created, modified, - deleted, renamed, or appended. - type: string - type: object - file-modify: - properties: - file-name: - description: FileName is the name of the file to be created, modified, - deleted, renamed, or appended. - type: string - privilege: - description: Privilege is the file privilege to be set. - format: int32 - type: integer - type: object - file-rename: - properties: - dest-file: - description: DestFile is the name to be renamed. - type: string - source-file: - description: SourceFile is the name need to be renamed. - type: string - type: object - file-replace: - properties: - dest-string: - description: DestStr is the destination string of the file. - type: string - file-name: - description: FileName is the name of the file to be created, modified, - deleted, renamed, or appended. - type: string - line: - description: Line is the line number of the file to be replaced. - type: integer - origin-string: - description: OriginStr is the origin string of the file. - type: string - type: object - http-abort: - properties: - code: - description: Code is a rule to select target by http status code - in response - type: string - method: - description: HTTP method - type: string - path: - description: Match path of Uri with wildcard matches - type: string - port: - description: The TCP port that the target service listens on - format: int32 - type: integer - proxy_ports: - description: Composed with one of the port of HTTP connection, - we will only attack HTTP connection with port inside proxy_ports - items: - type: integer - type: array - target: - description: 'HTTP target: Request or Response' - type: string - required: - - proxy_ports - - target - type: object - http-config: - properties: - file_path: - description: The config file path - type: string - type: object - http-delay: - properties: - code: - description: Code is a rule to select target by http status code - in response - type: string - delay: - description: Delay represents the delay of the target request/response - type: string - method: - description: HTTP method - type: string - path: - description: Match path of Uri with wildcard matches - type: string - port: - description: The TCP port that the target service listens on - format: int32 - type: integer - proxy_ports: - description: Composed with one of the port of HTTP connection, - we will only attack HTTP connection with port inside proxy_ports - items: - type: integer - type: array - target: - description: 'HTTP target: Request or Response' - type: string - required: - - delay - - proxy_ports - - target - type: object - http-request: - description: used for HTTP request, now only support GET - properties: - count: - description: The number of requests to send - type: integer - enable-conn-pool: - description: Enable connection pool - type: boolean - url: - description: Request to send" - type: string - type: object - jvm-exception: - properties: - class: - description: Java class - type: string - exception: - description: the exception which needs to throw for action `exception` - type: string - method: - description: the method in Java class - type: string - pid: - description: the pid of Java process which needs to attach - type: integer - port: - description: the port of agent server, default 9277 - format: int32 - type: integer - type: object - jvm-gc: - properties: - pid: - description: the pid of Java process which needs to attach - type: integer - port: - description: the port of agent server, default 9277 - format: int32 - type: integer - type: object - jvm-latency: - properties: - class: - description: Java class - type: string - latency: - description: the latency duration for action 'latency', unit ms - type: integer - method: - description: the method in Java class - type: string - pid: - description: the pid of Java process which needs to attach - type: integer - port: - description: the port of agent server, default 9277 - format: int32 - type: integer - type: object - jvm-mysql: - properties: - database: - description: the match database default value is "", means match - all database - type: string - exception: - description: The exception which needs to throw for action `exception` - or the exception message needs to throw in action `mysql` - type: string - latency: - description: The latency duration for action 'latency' or the - latency duration in action `mysql` - type: integer - mysqlConnectorVersion: - description: the version of mysql-connector-java, only support - 5.X.X(set to "5") and 8.X.X(set to "8") now - type: string - pid: - description: the pid of Java process which needs to attach - type: integer - port: - description: the port of agent server, default 9277 - format: int32 - type: integer - sqlType: - description: the match sql type default value is "", means match - all SQL type. The value can be 'select', 'insert', 'update', - 'delete', 'replace'. - type: string - table: - description: the match table default value is "", means match - all table - type: string - type: object - jvm-return: - properties: - class: - description: Java class - type: string - method: - description: the method in Java class - type: string - pid: - description: the pid of Java process which needs to attach - type: integer - port: - description: the port of agent server, default 9277 - format: int32 - type: integer - value: - description: the return value for action 'return' - type: string - type: object - jvm-rule-data: - properties: - pid: - description: the pid of Java process which needs to attach - type: integer - port: - description: the port of agent server, default 9277 - format: int32 - type: integer - rule-data: - description: RuleData used to save the rule file's data, will - use it when recover - type: string - type: object - jvm-stress: - properties: - cpu-count: - description: the CPU core number need to use, only set it when - action is stress - type: integer - mem-type: - description: the memory type need to locate, only set it when - action is stress, the value can be 'stack' or 'heap' - type: string - pid: - description: the pid of Java process which needs to attach - type: integer - port: - description: the port of agent server, default 9277 - format: int32 - type: integer - type: object - kafka-fill: - properties: - host: - description: The host of kafka server - type: string - maxBytes: - description: The max bytes to fill - format: int64 - type: integer - messageSize: - description: The size of each message - type: integer - password: - description: The password of kafka client - type: string - port: - description: The port of kafka server - type: integer - reloadCommand: - description: The command to reload kafka config - type: string - topic: - description: The topic to attack - type: string - username: - description: The username of kafka client - type: string - type: object - kafka-flood: - properties: - host: - description: The host of kafka server - type: string - messageSize: - description: The size of each message - type: integer - password: - description: The password of kafka client - type: string - port: - description: The port of kafka server - type: integer - threads: - description: The number of worker threads - type: integer - topic: - description: The topic to attack - type: string - username: - description: The username of kafka client - type: string - type: object - kafka-io: - properties: - configFile: - description: The path of server config - type: string - nonReadable: - description: Make kafka cluster non-readable - type: boolean - nonWritable: - description: Make kafka cluster non-writable - type: boolean - topic: - description: The topic to attack - type: string - type: object - mode: - description: 'Mode defines the mode to run chaos action. Supported - mode: one / all / fixed / fixed-percent / random-max-percent' - enum: - - one - - all - - fixed - - fixed-percent - - random-max-percent - type: string - network-bandwidth: - properties: - buffer: - format: int32 - minimum: 1 - type: integer - device: - type: string - hostname: - type: string - ip-address: - type: string - limit: - format: int32 - minimum: 1 - type: integer - minburst: - format: int32 - type: integer - peakrate: - format: int64 - type: integer - rate: - type: string - required: - - buffer - - limit - - rate - type: object - network-corrupt: - properties: - correlation: - description: correlation is percentage (10 is 10%) - type: string - device: - description: the network interface to impact - type: string - egress-port: - description: only impact egress traffic to these destination ports, - use a ',' to separate or to indicate the range, such as 80, - 8001:8010. it can only be used in conjunction with -p tcp or - -p udp - type: string - hostname: - description: only impact traffic to these hostnames - type: string - ip-address: - description: only impact egress traffic to these IP addresses - type: string - ip-protocol: - description: 'only impact traffic using this IP protocol, supported: - tcp, udp, icmp, all' - type: string - percent: - description: percentage of packets to corrupt (10 is 10%) - type: string - source-port: - description: only impact egress traffic from these source ports, - use a ',' to separate or to indicate the range, such as 80, - 8001:8010. it can only be used in conjunction with -p tcp or - -p udp - type: string - type: object - network-delay: - properties: - accept-tcp-flags: - description: only the packet which match the tcp flag can be accepted, - others will be dropped. only set when the IPProtocol is tcp, - used for partition. - type: string - correlation: - description: correlation is percentage (10 is 10%) - type: string - device: - description: the network interface to impact - type: string - egress-port: - description: only impact egress traffic to these destination ports, - use a ',' to separate or to indicate the range, such as 80, - 8001:8010. it can only be used in conjunction with -p tcp or - -p udp - type: string - hostname: - description: only impact traffic to these hostnames - type: string - ip-address: - description: only impact egress traffic to these IP addresses - type: string - ip-protocol: - description: 'only impact traffic using this IP protocol, supported: - tcp, udp, icmp, all' - type: string - jitter: - description: 'jitter time, time units: ns, us (or µs), ms, s, - m, h.' - type: string - latency: - description: 'delay egress time, time units: ns, us (or µs), ms, - s, m, h.' - type: string - source-port: - description: only impact egress traffic from these source ports, - use a ',' to separate or to indicate the range, such as 80, - 8001:8010. it can only be used in conjunction with -p tcp or - -p udp - type: string - type: object - network-dns: - properties: - dns-domain-name: - description: map this host to specified IP - type: string - dns-ip: - description: map specified host to this IP address - type: string - dns-server: - description: update the DNS server in /etc/resolv.conf with this - value - type: string - type: object - network-down: - properties: - device: - description: The network interface to impact - type: string - duration: - description: 'NIC down time, time units: ns, us (or µs), ms, s, - m, h.' - type: string - type: object - network-duplicate: - properties: - correlation: - description: correlation is percentage (10 is 10%) - type: string - device: - description: the network interface to impact - type: string - egress-port: - description: only impact egress traffic to these destination ports, - use a ',' to separate or to indicate the range, such as 80, - 8001:8010. it can only be used in conjunction with -p tcp or - -p udp - type: string - hostname: - description: only impact traffic to these hostnames - type: string - ip-address: - description: only impact egress traffic to these IP addresses - type: string - ip-protocol: - description: 'only impact traffic using this IP protocol, supported: - tcp, udp, icmp, all' - type: string - percent: - description: percentage of packets to duplicate (10 is 10%) - type: string - source-port: - description: only impact egress traffic from these source ports, - use a ',' to separate or to indicate the range, such as 80, - 8001:8010. it can only be used in conjunction with -p tcp or - -p udp - type: string - type: object - network-flood: - properties: - duration: - description: The number of seconds to run the iperf test - type: string - ip-address: - description: Generate traffic to this IP address - type: string - parallel: - description: The number of iperf parallel client threads to run - format: int32 - type: integer - port: - description: Generate traffic to this port on the IP address - type: string - rate: - description: The speed of network traffic, allows bps, kbps, mbps, - gbps, tbps unit. bps means bytes per second - type: string - required: - - duration - - rate - type: object - network-loss: - properties: - correlation: - description: correlation is percentage (10 is 10%) - type: string - device: - description: the network interface to impact - type: string - egress-port: - description: only impact egress traffic to these destination ports, - use a ',' to separate or to indicate the range, such as 80, - 8001:8010. it can only be used in conjunction with -p tcp or - -p udp - type: string - hostname: - description: only impact traffic to these hostnames - type: string - ip-address: - description: only impact egress traffic to these IP addresses - type: string - ip-protocol: - description: 'only impact traffic using this IP protocol, supported: - tcp, udp, icmp, all' - type: string - percent: - description: percentage of packets to loss (10 is 10%) - type: string - source-port: - description: only impact egress traffic from these source ports, - use a ',' to separate or to indicate the range, such as 80, - 8001:8010. it can only be used in conjunction with -p tcp or - -p udp - type: string - type: object - network-partition: - properties: - accept-tcp-flags: - description: only the packet which match the tcp flag can be accepted, - others will be dropped. only set when the IPProtocol is tcp, - used for partition. - type: string - device: - description: the network interface to impact - type: string - direction: - description: specifies the partition direction, values can be - 'from', 'to'. 'from' means packets coming from the 'IPAddress' - or 'Hostname' and going to your server, 'to' means packets originating - from your server and going to the 'IPAddress' or 'Hostname'. - type: string - hostname: - description: only impact traffic to these hostnames - type: string - ip-address: - description: only impact egress traffic to these IP addresses - type: string - ip-protocol: - description: only impact egress traffic to these IP addresses - type: string - type: object - process: - properties: - process: - description: the process name or the process ID - type: string - recoverCmd: - description: the command to be run when recovering experiment - type: string - signal: - description: the signal number to send - type: integer - type: object - redis-cacheLimit: - properties: - addr: - description: The adress of Redis server - type: string - cacheSize: - description: The size of `maxmemory` - type: string - password: - description: The password of Redis server - type: string - percent: - description: Specifies maxmemory as a percentage of the original - value - type: string - type: object - redis-expiration: - properties: - addr: - description: The adress of Redis server - type: string - expiration: - description: The expiration of the keys - type: string - key: - description: The keys to be expired - type: string - option: - description: Additional options for `expiration` - type: string - password: - description: The password of Redis server - type: string - type: object - redis-penetration: - properties: - addr: - description: The adress of Redis server - type: string - password: - description: The password of Redis server - type: string - requestNum: - description: The number of requests to be sent - type: integer - type: object - redis-restart: - properties: - addr: - description: The adress of Redis server - type: string - conf: - description: The path of Sentinel conf - type: string - flushConfig: - description: The control flag determines whether to flush config - type: boolean - password: - description: The password of Redis server - type: string - redisPath: - description: The path of `redis-server` command-line tool - type: boolean - type: object - redis-stop: - properties: - addr: - description: The adress of Redis server - type: string - conf: - description: The path of Sentinel conf - type: string - flushConfig: - description: The control flag determines whether to flush config - type: boolean - password: - description: The password of Redis server - type: string - redisPath: - description: The path of `redis-server` command-line tool - type: boolean - type: object - remoteCluster: - description: RemoteCluster represents the remote cluster where the - chaos will be deployed - type: string - selector: - description: Selector is used to select physical machines that are - used to inject chaos action. - properties: - annotationSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be used to - select objects. A selector based on annotations. - type: object - expressionSelectors: - description: a slice of label selector expressions that can be - used to select objects. A list of selectors based on set-based - label expressions. - items: - description: A label selector requirement is a selector that - contains values, a key, and an operator that relates the key - and values. - properties: - key: - description: key is the label key that the selector applies - to. - type: string - operator: - description: operator represents a key's relationship to - a set of values. Valid operators are In, NotIn, Exists - and DoesNotExist. - type: string - values: - description: values is an array of string values. If the - operator is In or NotIn, the values array must be non-empty. - If the operator is Exists or DoesNotExist, the values - array must be empty. This array is replaced during a strategic - merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - fieldSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be used to - select objects. A selector based on fields. - type: object - labelSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be used to - select objects. A selector based on labels. - type: object - namespaces: - description: Namespaces is a set of namespace to which objects - belong. - items: - type: string - type: array - physicalMachines: - additionalProperties: - items: - type: string - type: array - description: PhysicalMachines is a map of string keys and a set - values that used to select physical machines. The key defines - the namespace which physical machine belong, and each value - is a set of physical machine names. - type: object - type: object - stress-cpu: - properties: - load: - description: specifies P percent loading per CPU worker. 0 is - effectively a sleep (no load) and 100 is full loading. - type: integer - options: - description: extend stress-ng options - items: - type: string - type: array - workers: - description: specifies N workers to apply the stressor. - type: integer - type: object - stress-mem: - properties: - options: - description: extend stress-ng options - items: - type: string - type: array - size: - description: 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 - type: object - uid: - description: the experiment ID - type: string - user_defined: - properties: - attackCmd: - description: The command to be executed when attack - type: string - recoverCmd: - description: The command to be executed when recover - type: string - type: object - value: - description: Value is required when the mode is set to `FixedMode` - / `FixedPercentMode` / `RandomMaxPercentMode`. If `FixedMode`, provide - an integer of physical machines to do chaos action. If `FixedPercentMode`, - provide a number from 0-100 to specify the percent of physical machines - the server can do chaos action. IF `RandomMaxPercentMode`, provide - a number from 0-100 to specify the max percent of pods to do chaos - action - type: string - vm: - properties: - vm-name: - description: The name of the VM to be injected - type: string - type: object - required: - - action - - mode - type: object - status: - description: Most recently observed status of the chaos experiment - properties: - conditions: - description: Conditions represents the current global condition of - the chaos - items: - properties: - reason: - type: string - status: - type: string - type: - type: string - required: - - status - - type - type: object - type: array - experiment: - description: Experiment records the last experiment state. - properties: - containerRecords: - description: Records are used to track the running status - items: - properties: - events: - description: Events are the essential details about the - injections and recoveries - items: - properties: - message: - description: Message is the detail message, e.g. the - reason why we failed to inject the chaos - type: string - operation: - description: Operation represents the operation we - are doing, when we crate this event - type: string - timestamp: - description: Timestamp is time when we create this - event - format: date-time - type: string - type: - description: Type means the stage of this event - type: string - required: - - operation - - timestamp - - type - type: object - type: array - id: - type: string - injectedCount: - description: InjectedCount is a counter to record the sum - of successful injections - type: integer - phase: - type: string - recoveredCount: - description: RecoveredCount is a counter to record the sum - of successful recoveries - type: integer - selectorKey: - type: string - required: - - id - - injectedCount - - phase - - recoveredCount - - selectorKey - type: object - type: array - desiredPhase: - enum: - - Run - - Stop - type: string - type: object - required: - - experiment - type: object - required: - - spec - type: object - served: true - storage: true - subresources: {} - ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.13.0 - name: physicalmachines.chaos-mesh.org -spec: - group: chaos-mesh.org - names: - kind: PhysicalMachine - listKind: PhysicalMachineList - plural: physicalmachines - singular: physicalmachine - scope: Namespaced - versions: - - name: v1alpha1 - schema: - openAPIV3Schema: - description: PhysicalMachine is the Schema for the physical machine API - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - description: Spec defines the behavior of a physical machine - properties: - address: - description: Address represents the address of the physical machine - type: string - required: - - address - type: object - required: - - spec - type: object - served: true - storage: true - ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.13.0 - name: podchaos.chaos-mesh.org -spec: - group: chaos-mesh.org - names: - kind: PodChaos - listKind: PodChaosList - plural: podchaos - singular: podchaos - scope: Namespaced - versions: - - name: v1alpha1 - schema: - openAPIV3Schema: - description: PodChaos is the control script`s spec. - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - description: Spec defines the behavior of a pod chaos experiment - properties: - action: - description: 'Action defines the specific pod chaos action. Supported - action: pod-kill / pod-failure / container-kill Default action: - pod-kill' - enum: - - pod-kill - - pod-failure - - container-kill - type: string - containerNames: - description: ContainerNames indicates list of the name of affected - container. If not set, the first container will be injected - items: - type: string - type: array - duration: - description: Duration represents the duration of the chaos action. - It is required when the action is `PodFailureAction`. A duration - string is a possibly signed sequence of decimal numbers, each with - optional fraction and a unit suffix, such as "300ms", "-1.5h" or - "2h45m". Valid time units are "ns", "us" (or "µs"), "ms", "s", "m", - "h". - type: string - gracePeriod: - description: GracePeriod is used in pod-kill action. It represents - the duration in seconds before the pod should be deleted. Value - must be non-negative integer. The default value is zero that indicates - delete immediately. - format: int64 - minimum: 0 - type: integer - mode: - description: 'Mode defines the mode to run chaos action. Supported - mode: one / all / fixed / fixed-percent / random-max-percent' - enum: - - one - - all - - fixed - - fixed-percent - - random-max-percent - type: string - remoteCluster: - description: RemoteCluster represents the remote cluster where the - chaos will be deployed - type: string - selector: - description: Selector is used to select pods that are used to inject - chaos action. - properties: - annotationSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be used to - select objects. A selector based on annotations. - type: object - expressionSelectors: - description: a slice of label selector expressions that can be - used to select objects. A list of selectors based on set-based - label expressions. - items: - description: A label selector requirement is a selector that - contains values, a key, and an operator that relates the key - and values. - properties: - key: - description: key is the label key that the selector applies - to. - type: string - operator: - description: operator represents a key's relationship to - a set of values. Valid operators are In, NotIn, Exists - and DoesNotExist. - type: string - values: - description: values is an array of string values. If the - operator is In or NotIn, the values array must be non-empty. - If the operator is Exists or DoesNotExist, the values - array must be empty. This array is replaced during a strategic - merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - fieldSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be used to - select objects. A selector based on fields. - type: object - labelSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be used to - select objects. A selector based on labels. - type: object - namespaces: - description: Namespaces is a set of namespace to which objects - belong. - items: - type: string - type: array - nodeSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be used to - select nodes. Selector which must match a node's labels, and - objects must belong to these selected nodes. - type: object - nodes: - description: Nodes is a set of node name and objects must belong - to these nodes. - items: - type: string - type: array - podPhaseSelectors: - description: 'PodPhaseSelectors is a set of condition of a pod - at the current time. supported value: Pending / Running / Succeeded - / Failed / Unknown' - items: - type: string - type: array - pods: - additionalProperties: - items: - type: string - type: array - description: Pods is a map of string keys and a set values that - used to select pods. The key defines the namespace which pods - belong, and the each values is a set of pod names. - type: object - type: object - value: - description: Value is required when the mode is set to `FixedMode` - / `FixedPercentMode` / `RandomMaxPercentMode`. If `FixedMode`, provide - an integer of pods to do chaos action. If `FixedPercentMode`, provide - a number from 0-100 to specify the percent of pods the server can - do chaos action. IF `RandomMaxPercentMode`, provide a number from - 0-100 to specify the max percent of pods to do chaos action - type: string - required: - - action - - mode - - selector - type: object - status: - description: Most recently observed status of the chaos experiment about - pods - properties: - conditions: - description: Conditions represents the current global condition of - the chaos - items: - properties: - reason: - type: string - status: - type: string - type: - type: string - required: - - status - - type - type: object - type: array - experiment: - description: Experiment records the last experiment state. - properties: - containerRecords: - description: Records are used to track the running status - items: - properties: - events: - description: Events are the essential details about the - injections and recoveries - items: - properties: - message: - description: Message is the detail message, e.g. the - reason why we failed to inject the chaos - type: string - operation: - description: Operation represents the operation we - are doing, when we crate this event - type: string - timestamp: - description: Timestamp is time when we create this - event - format: date-time - type: string - type: - description: Type means the stage of this event - type: string - required: - - operation - - timestamp - - type - type: object - type: array - id: - type: string - injectedCount: - description: InjectedCount is a counter to record the sum - of successful injections - type: integer - phase: - type: string - recoveredCount: - description: RecoveredCount is a counter to record the sum - of successful recoveries - type: integer - selectorKey: - type: string - required: - - id - - injectedCount - - phase - - recoveredCount - - selectorKey - type: object - type: array - desiredPhase: - enum: - - Run - - Stop - type: string - type: object - required: - - experiment - type: object - required: - - spec - type: object - served: true - storage: true - ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.13.0 - name: podhttpchaos.chaos-mesh.org -spec: - group: chaos-mesh.org - names: - kind: PodHttpChaos - listKind: PodHttpChaosList - plural: podhttpchaos - singular: podhttpchaos - scope: Namespaced - versions: - - name: v1alpha1 - schema: - openAPIV3Schema: - description: PodHttpChaos is the Schema for the podhttpchaos API - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - description: PodHttpChaosSpec defines the desired state of PodHttpChaos. - properties: - rules: - description: Rules are a list of injection rule for http request. - items: - description: PodHttpChaosRule defines the injection rule for http. - properties: - actions: - description: Actions contains rules to inject target. - properties: - abort: - description: Abort is a rule to abort a http session. - type: boolean - delay: - description: Delay represents the delay of the target request/response. - A duration string is a possibly unsigned sequence of decimal - numbers, each with optional fraction and a unit suffix, - such as "300ms", "2h45m". Valid time units are "ns", "us" - (or "µs"), "ms", "s", "m", "h". - type: string - patch: - description: Patch is a rule to patch some contents in target. - properties: - body: - description: Body is a rule to patch message body of - target. - properties: - type: - description: Type represents the patch type, only - support `JSON` as [merge patch json](https://tools.ietf.org/html/rfc7396) - currently. - type: string - value: - description: Value is the patch contents. - type: string - required: - - type - - value - type: object - headers: - description: 'Headers is a rule to append http headers - of target. For example: `[["Set-Cookie", ""], - ["Set-Cookie", ""]]`.' - items: - items: - type: string - type: array - type: array - queries: - description: 'Queries is a rule to append uri queries - of target(Request only). For example: `[["foo", "bar"], - ["foo", "unknown"]]`.' - items: - items: - type: string - type: array - type: array - type: object - replace: - description: Replace is a rule to replace some contents - in target. - properties: - body: - description: Body is a rule to replace http message - body in target. - format: byte - type: string - code: - description: Code is a rule to replace http status code - in response. - format: int32 - type: integer - headers: - additionalProperties: - type: string - description: Headers is a rule to replace http headers - of target. The key-value pairs represent header name - and header value pairs. - type: object - method: - description: Method is a rule to replace http method - in request. - type: string - path: - description: Path is rule to to replace uri path in - http request. - type: string - queries: - additionalProperties: - type: string - description: 'Queries is a rule to replace uri queries - in http request. For example, with value `{ "foo": - "unknown" }`, the `/?foo=bar` will be altered to `/?foo=unknown`,' - type: object - type: object - type: object - port: - description: Port represents the target port to be proxy of. - format: int32 - type: integer - selector: - description: Selector contains the rules to select target. - properties: - code: - description: Code is a rule to select target by http status - code in response. - format: int32 - type: integer - method: - description: Method is a rule to select target by http method - in request. - type: string - path: - description: Path is a rule to select target by uri path - in http request. - type: string - port: - description: Port is a rule to select server listening on - specific port. - format: int32 - type: integer - request_headers: - additionalProperties: - type: string - description: RequestHeaders is a rule to select target by - http headers in request. The key-value pairs represent - header name and header value pairs. - type: object - response_headers: - additionalProperties: - type: string - description: ResponseHeaders is a rule to select target - by http headers in response. The key-value pairs represent - header name and header value pairs. - type: object - type: object - source: - description: Source represents the source of current rules - type: string - target: - description: Target is the object to be selected and injected, - . - type: string - required: - - actions - - port - - selector - - target - type: object - type: array - tls: - description: TLS is the tls config, will be override if there are - multiple HTTPChaos experiments are applied - properties: - caName: - description: CAName represents the data name of ca file in secret, - `ca.crt` for example - type: string - certName: - description: CertName represents the data name of cert file in - secret, `tls.crt` for example - type: string - keyName: - description: KeyName represents the data name of key file in secret, - `tls.key` for example - type: string - secretName: - description: SecretName represents the name of required secret - resource - type: string - secretNamespace: - description: SecretNamespace represents the namespace of required - secret resource - type: string - required: - - certName - - keyName - - secretName - - secretNamespace - type: object - type: object - status: - description: PodHttpChaosStatus defines the actual state of PodHttpChaos. - properties: - failedMessage: - type: string - observedGeneration: - format: int64 - type: integer - pid: - description: Pid represents a running tproxy process id. - format: int64 - type: integer - startTime: - description: StartTime represents the start time of a tproxy process. - format: int64 - type: integer - type: object - type: object - served: true - storage: true - subresources: - status: {} - ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.13.0 - name: podiochaos.chaos-mesh.org -spec: - group: chaos-mesh.org - names: - kind: PodIOChaos - listKind: PodIOChaosList - plural: podiochaos - singular: podiochaos - scope: Namespaced - versions: - - name: v1alpha1 - schema: - openAPIV3Schema: - description: PodIOChaos is the Schema for the podiochaos API - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - description: PodIOChaosSpec defines the desired state of IOChaos - properties: - actions: - description: Actions are a list of IOChaos actions - items: - description: IOChaosAction defines a possible action of IOChaos - properties: - atime: - description: Timespec represents a time - properties: - nsec: - format: int64 - type: integer - sec: - format: int64 - type: integer - required: - - nsec - - sec - type: object - blocks: - format: int64 - type: integer - ctime: - description: Timespec represents a time - properties: - nsec: - format: int64 - type: integer - sec: - format: int64 - type: integer - required: - - nsec - - sec - type: object - faults: - description: Faults represents the fault to inject - items: - description: IoFault represents the fault to inject and their - weight - properties: - errno: - format: int32 - type: integer - weight: - format: int32 - type: integer - required: - - errno - - weight - type: object - type: array - gid: - format: int32 - type: integer - ino: - format: int64 - type: integer - kind: - description: FileType represents type of file - type: string - latency: - description: Latency represents the latency to inject - type: string - methods: - description: Methods represents the method that the action will - inject in - items: - type: string - type: array - mistake: - description: MistakeSpec represents the mistake to inject - properties: - filling: - description: Filling determines what is filled in the mistake - data. - enum: - - zero - - random - type: string - maxLength: - description: Max length of each wrong data segment in bytes - format: int64 - minimum: 1 - type: integer - maxOccurrences: - description: There will be [1, MaxOccurrences] segments - of wrong data. - format: int64 - minimum: 1 - type: integer - type: object - mtime: - description: Timespec represents a time - properties: - nsec: - format: int64 - type: integer - sec: - format: int64 - type: integer - required: - - nsec - - sec - type: object - nlink: - format: int32 - type: integer - path: - description: Path represents a glob of injecting path - type: string - percent: - description: Percent represents the percent probability of injecting - this action - type: integer - perm: - type: integer - rdev: - format: int32 - type: integer - size: - format: int64 - type: integer - source: - description: Source represents the source of current rules - type: string - type: - description: IOChaosType represents the type of IOChaos Action - type: string - uid: - format: int32 - type: integer - required: - - path - - percent - - type - type: object - type: array - container: - description: 'TODO: support multiple different container to inject - in one pod' - type: string - volumeMountPath: - description: 'VolumeMountPath represents the target mount path It - must be a root of mount path now. TODO: search the mount parent - of any path automatically. TODO: support multiple different volume - mount path in one pod' - type: string - required: - - volumeMountPath - type: object - status: - properties: - failedMessage: - type: string - observedGeneration: - format: int64 - type: integer - pid: - description: Pid represents a running toda process id - format: int64 - type: integer - startTime: - description: StartTime represents the start time of a toda process - format: int64 - type: integer - type: object - type: object - served: true - storage: true - subresources: - status: {} - ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.13.0 - name: podnetworkchaos.chaos-mesh.org -spec: - group: chaos-mesh.org - names: - kind: PodNetworkChaos - listKind: PodNetworkChaosList - plural: podnetworkchaos - singular: podnetworkchaos - scope: Namespaced - versions: - - name: v1alpha1 - schema: - openAPIV3Schema: - description: PodNetworkChaos is the Schema for the PodNetworkChaos API - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - description: Spec defines the behavior of a pod chaos experiment - properties: - ipsets: - description: The ipset on the pod - items: - description: RawIPSet represents an ipset on specific pod - properties: - cidrAndPorts: - description: The contents of ipset. Only available when IPSetType - is NetPortIPSet. - items: - description: CidrAndPort represents CIDR and port pair - properties: - cidr: - type: string - port: - maximum: 65535 - minimum: 1 - type: integer - required: - - cidr - - port - type: object - type: array - cidrs: - description: The contents of ipset. Only available when IPSetType - is NetIPSet. - items: - type: string - type: array - ipsetType: - description: IPSetType represents the type of IP set - type: string - name: - description: The name of ipset - type: string - setNames: - description: The contents of ipset. Only available when IPSetType - is SetIPSet. - items: - type: string - type: array - source: - type: string - required: - - ipsetType - - name - - source - type: object - type: array - iptables: - description: The iptables rules on the pod - items: - description: RawIptables represents the iptables rules on specific - pod - properties: - device: - description: Device represents the network device to be affected. - type: string - direction: - description: The block direction of this iptables rule - type: string - ipsets: - description: The name of related ipset - items: - type: string - nullable: true - type: array - name: - description: The name of iptables chain - type: string - source: - type: string - required: - - direction - - name - - source - type: object - type: array - tcs: - description: The tc rules on the pod - items: - description: RawTrafficControl represents the traffic control chaos - on specific pod - properties: - bandwidth: - description: Bandwidth represents the detail about bandwidth - control action - properties: - buffer: - description: Buffer is the maximum amount of bytes that - tokens can be available for instantaneously. - format: int32 - minimum: 1 - type: integer - limit: - description: Limit is the number of bytes that can be queued - waiting for tokens to become available. - format: int32 - minimum: 1 - type: integer - minburst: - description: Minburst specifies the size of the peakrate - bucket. For perfect accuracy, should be set to the MTU - of the interface. If a peakrate is needed, but some burstiness - is acceptable, this size can be raised. A 3000 byte minburst - allows around 3mbit/s of peakrate, given 1000 byte packets. - format: int32 - minimum: 0 - type: integer - peakrate: - description: Peakrate is the maximum depletion rate of the - bucket. The peakrate does not need to be set, it is only - necessary if perfect millisecond timescale shaping is - required. - format: int64 - minimum: 0 - type: integer - rate: - description: Rate is the speed knob. Allows bit, kbit, mbit, - gbit, tbit, bps, kbps, mbps, gbps, tbps unit. bps means - bytes per second. - type: string - required: - - buffer - - limit - - rate - type: object - corrupt: - description: Corrupt represents the detail about corrupt action - properties: - correlation: - type: string - corrupt: - type: string - required: - - corrupt - type: object - delay: - description: Delay represents the detail about delay action - properties: - correlation: - type: string - jitter: - type: string - latency: - type: string - reorder: - description: ReorderSpec defines details of packet reorder. - properties: - correlation: - type: string - gap: - type: integer - reorder: - type: string - required: - - gap - - reorder - type: object - required: - - latency - type: object - device: - description: Device represents the network device to be affected. - type: string - duplicate: - description: DuplicateSpec represents the detail about loss - action - properties: - correlation: - type: string - duplicate: - type: string - required: - - duplicate - type: object - ipset: - description: The name of target ipset - type: string - loss: - description: Loss represents the detail about loss action - properties: - correlation: - type: string - loss: - type: string - required: - - loss - type: object - rate: - description: Rate represents the detail about rate control action - properties: - rate: - description: Rate is the speed knob. Allows bit, kbit, mbit, - gbit, tbit, bps, kbps, mbps, gbps, tbps unit. bps means - bytes per second. - type: string - required: - - rate - type: object - source: - description: The name and namespace of the source network chaos - type: string - type: - description: The type of traffic control - type: string - required: - - source - - type - type: object - type: array - type: object - status: - description: Most recently observed status of the chaos experiment about - pods - properties: - failedMessage: - type: string - observedGeneration: - format: int64 - type: integer - type: object - required: - - spec - type: object - served: true - storage: true - subresources: - status: {} - ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.13.0 - name: remoteclusters.chaos-mesh.org -spec: - group: chaos-mesh.org - names: - kind: RemoteCluster - listKind: RemoteClusterList - plural: remoteclusters - singular: remotecluster - scope: Cluster - versions: - - name: v1alpha1 - schema: - openAPIV3Schema: - description: RemoteCluster defines a remote cluster - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - description: RemoteClusterSpec defines the specification of a remote cluster - properties: - configOverride: - type: object - x-kubernetes-preserve-unknown-fields: true - kubeConfig: - description: RemoteClusterKubeConfig refers to a secret by which we'll - use to connect remote cluster - properties: - secretRef: - description: RemoteClusterSecretRef refers to a secret in any - namespaces - properties: - key: - type: string - name: - type: string - namespace: - type: string - required: - - key - - name - - namespace - type: object - required: - - secretRef - type: object - namespace: - type: string - version: - type: string - required: - - kubeConfig - - namespace - - version - type: object - status: - properties: - conditions: - description: Conditions represents the current condition of the remote - cluster - items: - properties: - reason: - type: string - status: - type: string - type: - type: string - required: - - status - - type - type: object - type: array - currentVersion: - type: string - observedGeneration: - format: int64 - type: integer - required: - - currentVersion - type: object - type: object - served: true - storage: true - subresources: - status: {} - ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.13.0 - name: schedules.chaos-mesh.org -spec: - group: chaos-mesh.org - names: - kind: Schedule - listKind: ScheduleList - plural: schedules - singular: schedule - scope: Namespaced - versions: - - name: v1alpha1 - schema: - openAPIV3Schema: - description: Schedule is the cronly schedule object - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - description: ScheduleSpec is the specification of a schedule object - properties: - awsChaos: - description: AWSChaosSpec is the content of the specification for - an AWSChaos - properties: - action: - description: 'Action defines the specific aws chaos action. Supported - action: ec2-stop / ec2-restart / detach-volume Default action: - ec2-stop' - 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. Needed - in detach-volume. - type: string - duration: - description: Duration represents the duration of the chaos action. - type: string - ec2Instance: - description: Ec2Instance indicates the ID of the ec2 instance. - type: string - endpoint: - description: Endpoint indicates the endpoint of the aws server. - Just used it in test now. - type: string - remoteCluster: - description: RemoteCluster represents the remote cluster where - the chaos will be deployed - type: string - secretName: - description: SecretName defines the name of kubernetes secret. - type: string - volumeID: - description: EbsVolume indicates the ID of the EBS volume. Needed - in detach-volume. - type: string - required: - - action - - awsRegion - - ec2Instance - type: object - azureChaos: - description: AzureChaosSpec is the content of the specification for - an AzureChaos - properties: - action: - description: 'Action defines the specific azure chaos action. - Supported action: vm-stop / vm-restart / disk-detach Default - action: vm-stop' - enum: - - vm-stop - - vm-restart - - disk-detach - type: string - diskName: - description: DiskName indicates the name of the disk. Needed in - disk-detach. - type: string - duration: - description: Duration represents the duration of the chaos action. - type: string - lun: - description: LUN indicates the Logical Unit Number of the data - disk. Needed in disk-detach. - type: integer - remoteCluster: - description: RemoteCluster represents the remote cluster where - the chaos will be deployed - type: string - resourceGroupName: - description: ResourceGroupName defines the name of ResourceGroup - type: string - secretName: - description: SecretName defines the name of kubernetes secret. - It is used for Azure credentials. - type: string - subscriptionID: - description: SubscriptionID defines the id of Azure subscription. - type: string - vmName: - description: VMName defines the name of Virtual Machine - type: string - required: - - action - - resourceGroupName - - subscriptionID - - vmName - type: object - blockChaos: - description: BlockChaosSpec is the content of the specification for - a BlockChaos - properties: - action: - description: 'Action defines the specific block chaos action. - Supported action: delay' - enum: - - delay - type: string - containerNames: - description: ContainerNames indicates list of the name of affected - container. If not set, the first container will be injected - items: - type: string - type: array - delay: - description: Delay defines the delay distribution. - properties: - correlation: - type: string - jitter: - type: string - latency: - description: Latency defines the latency of every io request. - type: string - type: object - duration: - description: Duration represents the duration of the chaos action. - type: string - mode: - description: 'Mode defines the mode to run chaos action. Supported - mode: one / all / fixed / fixed-percent / random-max-percent' - enum: - - one - - all - - fixed - - fixed-percent - - random-max-percent - type: string - remoteCluster: - description: RemoteCluster represents the remote cluster where - the chaos will be deployed - type: string - selector: - description: Selector is used to select pods that are used to - inject chaos action. - properties: - annotationSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be used - to select objects. A selector based on annotations. - type: object - expressionSelectors: - description: a slice of label selector expressions that can - be used to select objects. A list of selectors based on - set-based label expressions. - items: - description: A label selector requirement is a selector - that contains values, a key, and an operator that relates - the key and values. - properties: - key: - description: key is the label key that the selector - applies to. - type: string - operator: - description: operator represents a key's relationship - to a set of values. Valid operators are In, NotIn, - Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. If - the operator is In or NotIn, the values array must - be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. This array is replaced - during a strategic merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - fieldSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be used - to select objects. A selector based on fields. - type: object - labelSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be used - to select objects. A selector based on labels. - type: object - namespaces: - description: Namespaces is a set of namespace to which objects - belong. - items: - type: string - type: array - nodeSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be used - to select nodes. Selector which must match a node's labels, - and objects must belong to these selected nodes. - type: object - nodes: - description: Nodes is a set of node name and objects must - belong to these nodes. - items: - type: string - type: array - podPhaseSelectors: - description: 'PodPhaseSelectors is a set of condition of a - pod at the current time. supported value: Pending / Running - / Succeeded / Failed / Unknown' - items: - type: string - type: array - pods: - additionalProperties: - items: - type: string - type: array - description: Pods is a map of string keys and a set values - that used to select pods. The key defines the namespace - which pods belong, and the each values is a set of pod names. - type: object - type: object - value: - description: Value is required when the mode is set to `FixedMode` - / `FixedPercentMode` / `RandomMaxPercentMode`. If `FixedMode`, - provide an integer of pods to do chaos action. If `FixedPercentMode`, - provide a number from 0-100 to specify the percent of pods the - server can do chaos action. IF `RandomMaxPercentMode`, provide - a number from 0-100 to specify the max percent of pods to do - chaos action - type: string - volumeName: - type: string - required: - - action - - mode - - selector - - volumeName - type: object - concurrencyPolicy: - default: Forbid - enum: - - Forbid - - Allow - type: string - dnsChaos: - description: DNSChaosSpec defines the desired state of DNSChaos - properties: - action: - description: 'Action defines the specific DNS chaos action. Supported - action: error, random Default action: error' - enum: - - error - - random - type: string - containerNames: - description: ContainerNames indicates list of the name of affected - container. If not set, the first container will be injected - items: - type: string - type: array - duration: - description: Duration represents the duration of the chaos action - type: string - mode: - description: 'Mode defines the mode to run chaos action. Supported - mode: one / all / fixed / fixed-percent / random-max-percent' - enum: - - one - - all - - fixed - - fixed-percent - - random-max-percent - type: string - patterns: - description: 'Choose which domain names to take effect, support - the placeholder ? and wildcard *, or the Specified domain name. - Note: 1. The wildcard * must be at the end of the string. For - example, chaos-*.org is invalid. 2. if the patterns is empty, - will take effect on all the domain names. For example: The value - is ["google.com", "github.*", "chaos-mes?.org"], will take effect - on "google.com", "github.com" and "chaos-mesh.org"' - items: - type: string - type: array - remoteCluster: - description: RemoteCluster represents the remote cluster where - the chaos will be deployed - type: string - selector: - description: Selector is used to select pods that are used to - inject chaos action. - properties: - annotationSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be used - to select objects. A selector based on annotations. - type: object - expressionSelectors: - description: a slice of label selector expressions that can - be used to select objects. A list of selectors based on - set-based label expressions. - items: - description: A label selector requirement is a selector - that contains values, a key, and an operator that relates - the key and values. - properties: - key: - description: key is the label key that the selector - applies to. - type: string - operator: - description: operator represents a key's relationship - to a set of values. Valid operators are In, NotIn, - Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. If - the operator is In or NotIn, the values array must - be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. This array is replaced - during a strategic merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - fieldSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be used - to select objects. A selector based on fields. - type: object - labelSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be used - to select objects. A selector based on labels. - type: object - namespaces: - description: Namespaces is a set of namespace to which objects - belong. - items: - type: string - type: array - nodeSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be used - to select nodes. Selector which must match a node's labels, - and objects must belong to these selected nodes. - type: object - nodes: - description: Nodes is a set of node name and objects must - belong to these nodes. - items: - type: string - type: array - podPhaseSelectors: - description: 'PodPhaseSelectors is a set of condition of a - pod at the current time. supported value: Pending / Running - / Succeeded / Failed / Unknown' - items: - type: string - type: array - pods: - additionalProperties: - items: - type: string - type: array - description: Pods is a map of string keys and a set values - that used to select pods. The key defines the namespace - which pods belong, and the each values is a set of pod names. - type: object - type: object - value: - description: Value is required when the mode is set to `FixedMode` - / `FixedPercentMode` / `RandomMaxPercentMode`. If `FixedMode`, - provide an integer of pods to do chaos action. If `FixedPercentMode`, - provide a number from 0-100 to specify the percent of pods the - server can do chaos action. IF `RandomMaxPercentMode`, provide - a number from 0-100 to specify the max percent of pods to do - chaos action - type: string - required: - - action - - mode - - selector - type: object - gcpChaos: - description: GCPChaosSpec is the content of the specification for - a GCPChaos - properties: - action: - description: 'Action defines the specific gcp chaos action. Supported - action: node-stop / node-reset / disk-loss Default action: node-stop' - enum: - - node-stop - - node-reset - - disk-loss - type: string - deviceNames: - description: The device name of disks to detach. Needed in disk-loss. - items: - type: string - type: array - duration: - description: Duration represents the duration of the chaos action. - type: string - instance: - description: Instance defines the name of the instance - type: string - project: - description: Project defines the ID of gcp project. - type: string - remoteCluster: - description: RemoteCluster represents the remote cluster where - the chaos will be deployed - type: string - secretName: - description: SecretName defines the name of kubernetes secret. - It is used for GCP credentials. - type: string - zone: - description: Zone defines the zone of gcp project. - type: string - required: - - action - - instance - - project - - zone - type: object - historyLimit: - minimum: 1 - type: integer - httpChaos: - properties: - abort: - description: Abort is a rule to abort a http session. - type: boolean - code: - description: Code is a rule to select target by http status code - in response. - format: int32 - type: integer - delay: - description: Delay represents the delay of the target request/response. - A duration string is a possibly unsigned sequence of decimal - numbers, each with optional fraction and a unit suffix, such - as "300ms", "2h45m". Valid time units are "ns", "us" (or "µs"), - "ms", "s", "m", "h". - type: string - duration: - description: Duration represents the duration of the chaos action. - type: string - method: - description: Method is a rule to select target by http method - in request. - type: string - mode: - description: 'Mode defines the mode to run chaos action. Supported - mode: one / all / fixed / fixed-percent / random-max-percent' - enum: - - one - - all - - fixed - - fixed-percent - - random-max-percent - type: string - patch: - description: Patch is a rule to patch some contents in target. - properties: - body: - description: Body is a rule to patch message body of target. - properties: - type: - description: Type represents the patch type, only support - `JSON` as [merge patch json](https://tools.ietf.org/html/rfc7396) - currently. - type: string - value: - description: Value is the patch contents. - type: string - required: - - type - - value - type: object - headers: - description: 'Headers is a rule to append http headers of - target. For example: `[["Set-Cookie", ""], ["Set-Cookie", - ""]]`.' - items: - items: - type: string - type: array - type: array - queries: - description: 'Queries is a rule to append uri queries of target(Request - only). For example: `[["foo", "bar"], ["foo", "unknown"]]`.' - items: - items: - type: string - type: array - type: array - type: object - path: - description: Path is a rule to select target by uri path in http - request. - type: string - port: - description: Port represents the target port to be proxy of. - format: int32 - type: integer - remoteCluster: - description: RemoteCluster represents the remote cluster where - the chaos will be deployed - type: string - replace: - description: Replace is a rule to replace some contents in target. - properties: - body: - description: Body is a rule to replace http message body in - target. - format: byte - type: string - code: - description: Code is a rule to replace http status code in - response. - format: int32 - type: integer - headers: - additionalProperties: - type: string - description: Headers is a rule to replace http headers of - target. The key-value pairs represent header name and header - value pairs. - type: object - method: - description: Method is a rule to replace http method in request. - type: string - path: - description: Path is rule to to replace uri path in http request. - type: string - queries: - additionalProperties: - type: string - description: 'Queries is a rule to replace uri queries in - http request. For example, with value `{ "foo": "unknown" - }`, the `/?foo=bar` will be altered to `/?foo=unknown`,' - type: object - type: object - request_headers: - additionalProperties: - type: string - description: RequestHeaders is a rule to select target by http - headers in request. The key-value pairs represent header name - and header value pairs. - type: object - response_headers: - additionalProperties: - type: string - description: ResponseHeaders is a rule to select target by http - headers in response. The key-value pairs represent header name - and header value pairs. - type: object - selector: - description: Selector is used to select pods that are used to - inject chaos action. - properties: - annotationSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be used - to select objects. A selector based on annotations. - type: object - expressionSelectors: - description: a slice of label selector expressions that can - be used to select objects. A list of selectors based on - set-based label expressions. - items: - description: A label selector requirement is a selector - that contains values, a key, and an operator that relates - the key and values. - properties: - key: - description: key is the label key that the selector - applies to. - type: string - operator: - description: operator represents a key's relationship - to a set of values. Valid operators are In, NotIn, - Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. If - the operator is In or NotIn, the values array must - be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. This array is replaced - during a strategic merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - fieldSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be used - to select objects. A selector based on fields. - type: object - labelSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be used - to select objects. A selector based on labels. - type: object - namespaces: - description: Namespaces is a set of namespace to which objects - belong. - items: - type: string - type: array - nodeSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be used - to select nodes. Selector which must match a node's labels, - and objects must belong to these selected nodes. - type: object - nodes: - description: Nodes is a set of node name and objects must - belong to these nodes. - items: - type: string - type: array - podPhaseSelectors: - description: 'PodPhaseSelectors is a set of condition of a - pod at the current time. supported value: Pending / Running - / Succeeded / Failed / Unknown' - items: - type: string - type: array - pods: - additionalProperties: - items: - type: string - type: array - description: Pods is a map of string keys and a set values - that used to select pods. The key defines the namespace - which pods belong, and the each values is a set of pod names. - type: object - type: object - target: - description: Target is the object to be selected and injected. - enum: - - Request - - Response - type: string - tls: - description: TLS is the tls config, will override PodHttpChaos - if there are multiple HTTPChaos experiments are applied - properties: - caName: - description: CAName represents the data name of ca file in - secret, `ca.crt` for example - type: string - certName: - description: CertName represents the data name of cert file - in secret, `tls.crt` for example - type: string - keyName: - description: KeyName represents the data name of key file - in secret, `tls.key` for example - type: string - secretName: - description: SecretName represents the name of required secret - resource - type: string - secretNamespace: - description: SecretNamespace represents the namespace of required - secret resource - type: string - required: - - certName - - keyName - - secretName - - secretNamespace - type: object - value: - description: Value is required when the mode is set to `FixedMode` - / `FixedPercentMode` / `RandomMaxPercentMode`. If `FixedMode`, - provide an integer of pods to do chaos action. If `FixedPercentMode`, - provide a number from 0-100 to specify the percent of pods the - server can do chaos action. IF `RandomMaxPercentMode`, provide - a number from 0-100 to specify the max percent of pods to do - chaos action - type: string - required: - - mode - - selector - - target - type: object - ioChaos: - description: IOChaosSpec defines the desired state of IOChaos - properties: - action: - description: 'Action defines the specific pod chaos action. Supported - action: latency / fault / attrOverride / mistake' - enum: - - latency - - fault - - attrOverride - - mistake - type: string - attr: - description: Attr defines the overrided attribution - properties: - atime: - description: Timespec represents a time - properties: - nsec: - format: int64 - type: integer - sec: - format: int64 - type: integer - required: - - nsec - - sec - type: object - blocks: - format: int64 - type: integer - ctime: - description: Timespec represents a time - properties: - nsec: - format: int64 - type: integer - sec: - format: int64 - type: integer - required: - - nsec - - sec - type: object - gid: - format: int32 - type: integer - ino: - format: int64 - type: integer - kind: - description: FileType represents type of file - type: string - mtime: - description: Timespec represents a time - properties: - nsec: - format: int64 - type: integer - sec: - format: int64 - type: integer - required: - - nsec - - sec - type: object - nlink: - format: int32 - type: integer - perm: - type: integer - rdev: - format: int32 - type: integer - size: - format: int64 - type: integer - uid: - format: int32 - type: integer - type: object - containerNames: - description: ContainerNames indicates list of the name of affected - container. If not set, the first container will be injected - items: - type: string - type: array - delay: - description: Delay defines the value of I/O chaos action delay. - A delay string is a possibly signed sequence of decimal numbers, - each with optional fraction and a unit suffix, such as "300ms". - Valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h". - type: string - duration: - description: Duration represents the duration of the chaos action. - It is required when the action is `PodFailureAction`. A duration - string is a possibly signed sequence of decimal numbers, each - with optional fraction and a unit suffix, such as "300ms", "-1.5h" - or "2h45m". Valid time units are "ns", "us" (or "µs"), "ms", - "s", "m", "h". - type: string - errno: - description: 'Errno defines the error code that returned by I/O - action. refer to: https://www-numi.fnal.gov/offline_software/srt_public_context/WebDocs/Errors/unix_system_errors.html' - format: int32 - type: integer - methods: - description: 'Methods defines the I/O methods for injecting I/O - chaos action. default: all I/O methods.' - items: - type: string - type: array - mistake: - description: Mistake defines what types of incorrectness are injected - to IO operations - properties: - filling: - description: Filling determines what is filled in the mistake - data. - enum: - - zero - - random - type: string - maxLength: - description: Max length of each wrong data segment in bytes - format: int64 - minimum: 1 - type: integer - maxOccurrences: - description: There will be [1, MaxOccurrences] segments of - wrong data. - format: int64 - minimum: 1 - type: integer - type: object - mode: - description: 'Mode defines the mode to run chaos action. Supported - mode: one / all / fixed / fixed-percent / random-max-percent' - enum: - - one - - all - - fixed - - fixed-percent - - random-max-percent - type: string - path: - description: Path defines the path of files for injecting I/O - chaos action. - type: string - percent: - default: 100 - description: 'Percent defines the percentage of injection errors - and provides a number from 0-100. default: 100.' - type: integer - remoteCluster: - description: RemoteCluster represents the remote cluster where - the chaos will be deployed - type: string - selector: - description: Selector is used to select pods that are used to - inject chaos action. - properties: - annotationSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be used - to select objects. A selector based on annotations. - type: object - expressionSelectors: - description: a slice of label selector expressions that can - be used to select objects. A list of selectors based on - set-based label expressions. - items: - description: A label selector requirement is a selector - that contains values, a key, and an operator that relates - the key and values. - properties: - key: - description: key is the label key that the selector - applies to. - type: string - operator: - description: operator represents a key's relationship - to a set of values. Valid operators are In, NotIn, - Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. If - the operator is In or NotIn, the values array must - be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. This array is replaced - during a strategic merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - fieldSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be used - to select objects. A selector based on fields. - type: object - labelSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be used - to select objects. A selector based on labels. - type: object - namespaces: - description: Namespaces is a set of namespace to which objects - belong. - items: - type: string - type: array - nodeSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be used - to select nodes. Selector which must match a node's labels, - and objects must belong to these selected nodes. - type: object - nodes: - description: Nodes is a set of node name and objects must - belong to these nodes. - items: - type: string - type: array - podPhaseSelectors: - description: 'PodPhaseSelectors is a set of condition of a - pod at the current time. supported value: Pending / Running - / Succeeded / Failed / Unknown' - items: - type: string - type: array - pods: - additionalProperties: - items: - type: string - type: array - description: Pods is a map of string keys and a set values - that used to select pods. The key defines the namespace - which pods belong, and the each values is a set of pod names. - type: object - type: object - value: - description: Value is required when the mode is set to `FixedMode` - / `FixedPercentMode` / `RandomMaxPercentMode`. If `FixedMode`, - provide an integer of pods to do chaos action. If `FixedPercentMode`, - provide a number from 0-100 to specify the percent of pods the - server can do chaos action. IF `RandomMaxPercentMode`, provide - a number from 0-100 to specify the max percent of pods to do - chaos action - type: string - volumePath: - description: VolumePath represents the mount path of injected - volume - type: string - required: - - action - - mode - - selector - - volumePath - type: object - jvmChaos: - description: JVMChaosSpec defines the desired state of JVMChaos - properties: - action: - description: 'Action defines the specific jvm chaos action. Supported - action: latency;return;exception;stress;gc;ruleData' - enum: - - latency - - return - - exception - - stress - - gc - - ruleData - - mysql - type: string - class: - description: Java class - type: string - containerNames: - description: ContainerNames indicates list of the name of affected - container. If not set, the first container will be injected - items: - type: string - type: array - cpuCount: - description: the CPU core number needs to use, only set it when - action is stress - type: integer - database: - description: the match database default value is "", means match - all database - type: string - duration: - description: Duration represents the duration of the chaos action - type: string - exception: - description: the exception which needs to throw for action `exception` - or the exception message needs to throw in action `mysql` - type: string - latency: - description: the latency duration for action 'latency', unit ms - or the latency duration in action `mysql` - type: integer - memType: - description: the memory type needs to locate, only set it when - action is stress, the value can be 'stack' or 'heap' - type: string - method: - description: the method in Java class - type: string - mode: - description: 'Mode defines the mode to run chaos action. Supported - mode: one / all / fixed / fixed-percent / random-max-percent' - enum: - - one - - all - - fixed - - fixed-percent - - random-max-percent - type: string - mysqlConnectorVersion: - description: the version of mysql-connector-java, only support - 5.X.X(set to "5") and 8.X.X(set to "8") now - type: string - name: - description: byteman rule name, should be unique, and will generate - one if not set - type: string - pid: - description: the pid of Java process which needs to attach - type: integer - port: - description: the port of agent server, default 9277 - format: int32 - type: integer - remoteCluster: - description: RemoteCluster represents the remote cluster where - the chaos will be deployed - type: string - ruleData: - description: the byteman rule's data for action 'ruleData' - type: string - selector: - description: Selector is used to select pods that are used to - inject chaos action. - properties: - annotationSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be used - to select objects. A selector based on annotations. - type: object - expressionSelectors: - description: a slice of label selector expressions that can - be used to select objects. A list of selectors based on - set-based label expressions. - items: - description: A label selector requirement is a selector - that contains values, a key, and an operator that relates - the key and values. - properties: - key: - description: key is the label key that the selector - applies to. - type: string - operator: - description: operator represents a key's relationship - to a set of values. Valid operators are In, NotIn, - Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. If - the operator is In or NotIn, the values array must - be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. This array is replaced - during a strategic merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - fieldSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be used - to select objects. A selector based on fields. - type: object - labelSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be used - to select objects. A selector based on labels. - type: object - namespaces: - description: Namespaces is a set of namespace to which objects - belong. - items: - type: string - type: array - nodeSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be used - to select nodes. Selector which must match a node's labels, - and objects must belong to these selected nodes. - type: object - nodes: - description: Nodes is a set of node name and objects must - belong to these nodes. - items: - type: string - type: array - podPhaseSelectors: - description: 'PodPhaseSelectors is a set of condition of a - pod at the current time. supported value: Pending / Running - / Succeeded / Failed / Unknown' - items: - type: string - type: array - pods: - additionalProperties: - items: - type: string - type: array - description: Pods is a map of string keys and a set values - that used to select pods. The key defines the namespace - which pods belong, and the each values is a set of pod names. - type: object - type: object - sqlType: - description: the match sql type default value is "", means match - all SQL type. The value can be 'select', 'insert', 'update', - 'delete', 'replace'. - type: string - table: - description: the match table default value is "", means match - all table - type: string - value: - description: Value is required when the mode is set to `FixedMode` - / `FixedPercentMode` / `RandomMaxPercentMode`. If `FixedMode`, - provide an integer of pods to do chaos action. If `FixedPercentMode`, - provide a number from 0-100 to specify the percent of pods the - server can do chaos action. IF `RandomMaxPercentMode`, provide - a number from 0-100 to specify the max percent of pods to do - chaos action - type: string - required: - - action - - mode - - selector - type: object - kernelChaos: - description: KernelChaosSpec defines the desired state of KernelChaos - properties: - containerNames: - description: ContainerNames indicates list of the name of affected - container. If not set, the first container will be injected - items: - type: string - type: array - duration: - description: Duration represents the duration of the chaos action - type: string - failKernRequest: - description: FailKernRequest defines the request of kernel injection - properties: - callchain: - description: 'Callchain indicate a special call chain, such - as: ext4_mount -> mount_subtree -> ... -> should_failslab - With an optional set of predicates and an optional set of - parameters, which used with predicates. You can read call - chan and predicate examples from https://github.com/chaos-mesh/bpfki/tree/develop/examples - to learn more. If no special call chain, just keep Callchain - empty, which means it will fail at any call chain with slab - alloc (eg: kmalloc).' - items: - description: Frame defines the function signature and predicate - in function's body - properties: - funcname: - description: Funcname can be find from kernel source - or `/proc/kallsyms`, such as `ext4_mount` - type: string - parameters: - description: Parameters is used with predicate, for - example, if you want to inject slab error in `d_alloc_parallel(struct - dentry *parent, const struct qstr *name)` with a special - name `bananas`, you need to set it to `struct dentry - *parent, const struct qstr *name` otherwise omit it. - type: string - predicate: - description: Predicate will access the arguments of - this Frame, example with Parameters's, you can set - it to `STRNCMP(name->name, "bananas", 8)` to make - inject only with it, or omit it to inject for all - d_alloc_parallel call chain. - type: string - type: object - type: array - failtype: - description: 'FailType indicates what to fail, can be set - to ''0'' / ''1'' / ''2'' If `0`, indicates slab to fail - (should_failslab) If `1`, indicates alloc_page to fail (should_fail_alloc_page) - If `2`, indicates bio to fail (should_fail_bio) You can - read: 1. https://www.kernel.org/doc/html/latest/fault-injection/fault-injection.html - 2. http://github.com/iovisor/bcc/blob/master/tools/inject_example.txt - to learn more' - format: int32 - maximum: 2 - minimum: 0 - type: integer - headers: - description: 'Headers indicates the appropriate kernel headers - you need. Eg: "linux/mmzone.h", "linux/blkdev.h" and so - on' - items: - type: string - type: array - probability: - description: Probability indicates the fails with probability. - If you want 1%, please set this field with 1. - format: int32 - maximum: 100 - minimum: 0 - type: integer - times: - description: Times indicates the max times of fails. - format: int32 - minimum: 0 - type: integer - required: - - failtype - type: object - mode: - description: 'Mode defines the mode to run chaos action. Supported - mode: one / all / fixed / fixed-percent / random-max-percent' - enum: - - one - - all - - fixed - - fixed-percent - - random-max-percent - type: string - remoteCluster: - description: RemoteCluster represents the remote cluster where - the chaos will be deployed - type: string - selector: - description: Selector is used to select pods that are used to - inject chaos action. - properties: - annotationSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be used - to select objects. A selector based on annotations. - type: object - expressionSelectors: - description: a slice of label selector expressions that can - be used to select objects. A list of selectors based on - set-based label expressions. - items: - description: A label selector requirement is a selector - that contains values, a key, and an operator that relates - the key and values. - properties: - key: - description: key is the label key that the selector - applies to. - type: string - operator: - description: operator represents a key's relationship - to a set of values. Valid operators are In, NotIn, - Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. If - the operator is In or NotIn, the values array must - be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. This array is replaced - during a strategic merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - fieldSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be used - to select objects. A selector based on fields. - type: object - labelSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be used - to select objects. A selector based on labels. - type: object - namespaces: - description: Namespaces is a set of namespace to which objects - belong. - items: - type: string - type: array - nodeSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be used - to select nodes. Selector which must match a node's labels, - and objects must belong to these selected nodes. - type: object - nodes: - description: Nodes is a set of node name and objects must - belong to these nodes. - items: - type: string - type: array - podPhaseSelectors: - description: 'PodPhaseSelectors is a set of condition of a - pod at the current time. supported value: Pending / Running - / Succeeded / Failed / Unknown' - items: - type: string - type: array - pods: - additionalProperties: - items: - type: string - type: array - description: Pods is a map of string keys and a set values - that used to select pods. The key defines the namespace - which pods belong, and the each values is a set of pod names. - type: object - type: object - value: - description: Value is required when the mode is set to `FixedMode` - / `FixedPercentMode` / `RandomMaxPercentMode`. If `FixedMode`, - provide an integer of pods to do chaos action. If `FixedPercentMode`, - provide a number from 0-100 to specify the percent of pods the - server can do chaos action. IF `RandomMaxPercentMode`, provide - a number from 0-100 to specify the max percent of pods to do - chaos action - type: string - required: - - failKernRequest - - mode - - selector - type: object - networkChaos: - description: NetworkChaosSpec defines the desired state of NetworkChaos - properties: - action: - description: 'Action defines the specific network chaos action. - Supported action: partition, netem, delay, loss, duplicate, - corrupt Default action: delay' - enum: - - netem - - delay - - loss - - duplicate - - corrupt - - partition - - bandwidth - type: string - bandwidth: - description: Bandwidth represents the detail about bandwidth control - action - properties: - buffer: - description: Buffer is the maximum amount of bytes that tokens - can be available for instantaneously. - format: int32 - minimum: 1 - type: integer - limit: - description: Limit is the number of bytes that can be queued - waiting for tokens to become available. - format: int32 - minimum: 1 - type: integer - minburst: - description: Minburst specifies the size of the peakrate bucket. - For perfect accuracy, should be set to the MTU of the interface. If - a peakrate is needed, but some burstiness is acceptable, - this size can be raised. A 3000 byte minburst allows around - 3mbit/s of peakrate, given 1000 byte packets. - format: int32 - minimum: 0 - type: integer - peakrate: - description: Peakrate is the maximum depletion rate of the - bucket. The peakrate does not need to be set, it is only - necessary if perfect millisecond timescale shaping is required. - format: int64 - minimum: 0 - type: integer - rate: - description: Rate is the speed knob. Allows bit, kbit, mbit, - gbit, tbit, bps, kbps, mbps, gbps, tbps unit. bps means - bytes per second. - type: string - required: - - buffer - - limit - - rate - type: object - corrupt: - description: Corrupt represents the detail about corrupt action - properties: - correlation: - type: string - corrupt: - type: string - required: - - corrupt - type: object - delay: - description: Delay represents the detail about delay action - properties: - correlation: - type: string - jitter: - type: string - latency: - type: string - reorder: - description: ReorderSpec defines details of packet reorder. - properties: - correlation: - type: string - gap: - type: integer - reorder: - type: string - required: - - gap - - reorder - type: object - required: - - latency - type: object - device: - description: Device represents the network device to be affected. - type: string - direction: - default: to - description: Direction represents the direction, this applies - on netem and network partition action - enum: - - to - - from - - both - type: string - duplicate: - description: DuplicateSpec represents the detail about loss action - properties: - correlation: - type: string - duplicate: - type: string - required: - - duplicate - type: object - duration: - description: Duration represents the duration of the chaos action - type: string - externalTargets: - description: ExternalTargets represents network targets outside - k8s - items: - type: string - type: array - loss: - description: Loss represents the detail about loss action - properties: - correlation: - type: string - loss: - type: string - required: - - loss - type: object - mode: - description: 'Mode defines the mode to run chaos action. Supported - mode: one / all / fixed / fixed-percent / random-max-percent' - enum: - - one - - all - - fixed - - fixed-percent - - random-max-percent - type: string - rate: - description: Rate represents the detail about rate control action - properties: - rate: - description: Rate is the speed knob. Allows bit, kbit, mbit, - gbit, tbit, bps, kbps, mbps, gbps, tbps unit. bps means - bytes per second. - type: string - required: - - rate - type: object - remoteCluster: - description: RemoteCluster represents the remote cluster where - the chaos will be deployed - type: string - selector: - description: Selector is used to select pods that are used to - inject chaos action. - properties: - annotationSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be used - to select objects. A selector based on annotations. - type: object - expressionSelectors: - description: a slice of label selector expressions that can - be used to select objects. A list of selectors based on - set-based label expressions. - items: - description: A label selector requirement is a selector - that contains values, a key, and an operator that relates - the key and values. - properties: - key: - description: key is the label key that the selector - applies to. - type: string - operator: - description: operator represents a key's relationship - to a set of values. Valid operators are In, NotIn, - Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. If - the operator is In or NotIn, the values array must - be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. This array is replaced - during a strategic merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - fieldSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be used - to select objects. A selector based on fields. - type: object - labelSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be used - to select objects. A selector based on labels. - type: object - namespaces: - description: Namespaces is a set of namespace to which objects - belong. - items: - type: string - type: array - nodeSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be used - to select nodes. Selector which must match a node's labels, - and objects must belong to these selected nodes. - type: object - nodes: - description: Nodes is a set of node name and objects must - belong to these nodes. - items: - type: string - type: array - podPhaseSelectors: - description: 'PodPhaseSelectors is a set of condition of a - pod at the current time. supported value: Pending / Running - / Succeeded / Failed / Unknown' - items: - type: string - type: array - pods: - additionalProperties: - items: - type: string - type: array - description: Pods is a map of string keys and a set values - that used to select pods. The key defines the namespace - which pods belong, and the each values is a set of pod names. - type: object - type: object - target: - description: Target represents network target, this applies on - netem and network partition action - properties: - mode: - description: 'Mode defines the mode to run chaos action. Supported - mode: one / all / fixed / fixed-percent / random-max-percent' - enum: - - one - - all - - fixed - - fixed-percent - - random-max-percent - type: string - selector: - description: Selector is used to select pods that are used - to inject chaos action. - properties: - annotationSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be - used to select objects. A selector based on annotations. - type: object - expressionSelectors: - description: a slice of label selector expressions that - can be used to select objects. A list of selectors based - on set-based label expressions. - items: - description: A label selector requirement is a selector - that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the label key that the selector - applies to. - type: string - operator: - description: operator represents a key's relationship - to a set of values. Valid operators are In, NotIn, - Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. - If the operator is In or NotIn, the values array - must be non-empty. If the operator is Exists or - DoesNotExist, the values array must be empty. - This array is replaced during a strategic merge - patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - fieldSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be - used to select objects. A selector based on fields. - type: object - labelSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be - used to select objects. A selector based on labels. - type: object - namespaces: - description: Namespaces is a set of namespace to which - objects belong. - items: - type: string - type: array - nodeSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be - used to select nodes. Selector which must match a node's - labels, and objects must belong to these selected nodes. - type: object - nodes: - description: Nodes is a set of node name and objects must - belong to these nodes. - items: - type: string - type: array - podPhaseSelectors: - description: 'PodPhaseSelectors is a set of condition - of a pod at the current time. supported value: Pending - / Running / Succeeded / Failed / Unknown' - items: - type: string - type: array - pods: - additionalProperties: - items: - type: string - type: array - description: Pods is a map of string keys and a set values - that used to select pods. The key defines the namespace - which pods belong, and the each values is a set of pod - names. - type: object - type: object - value: - description: Value is required when the mode is set to `FixedMode` - / `FixedPercentMode` / `RandomMaxPercentMode`. If `FixedMode`, - provide an integer of pods to do chaos action. If `FixedPercentMode`, - provide a number from 0-100 to specify the percent of pods - the server can do chaos action. IF `RandomMaxPercentMode`, provide - a number from 0-100 to specify the max percent of pods to - do chaos action - type: string - required: - - mode - - selector - type: object - targetDevice: - description: TargetDevice represents the network device to be - affected in target scope. - type: string - value: - description: Value is required when the mode is set to `FixedMode` - / `FixedPercentMode` / `RandomMaxPercentMode`. If `FixedMode`, - provide an integer of pods to do chaos action. If `FixedPercentMode`, - provide a number from 0-100 to specify the percent of pods the - server can do chaos action. IF `RandomMaxPercentMode`, provide - a number from 0-100 to specify the max percent of pods to do - chaos action - type: string - required: - - action - - mode - - selector - type: object - physicalmachineChaos: - description: PhysicalMachineChaosSpec defines the desired state of - PhysicalMachineChaos - properties: - action: - description: the subAction, generate automatically - enum: - - stress-cpu - - stress-mem - - disk-read-payload - - disk-write-payload - - disk-fill - - network-corrupt - - network-duplicate - - network-loss - - network-delay - - network-partition - - network-dns - - network-bandwidth - - network-flood - - network-down - - process - - jvm-exception - - jvm-gc - - jvm-latency - - jvm-return - - jvm-stress - - jvm-rule-data - - jvm-mysql - - clock - - redis-expiration - - redis-penetration - - redis-cacheLimit - - redis-restart - - redis-stop - - kafka-fill - - kafka-flood - - kafka-io - - file-create - - file-modify - - file-delete - - file-rename - - file-append - - file-replace - - vm - - user_defined - type: string - address: - description: 'DEPRECATED: Use Selector instead. Only one of Address - and Selector could be specified.' - items: - type: string - type: array - clock: - properties: - clock-ids-slice: - description: the identifier of the particular clock on which - to act. More clock description in linux kernel can be found - in man page of clock_getres, clock_gettime, clock_settime. - Muti clock ids should be split with "," - type: string - pid: - description: the pid of target program. - type: integer - time-offset: - description: specifies the length of time offset. - type: string - type: object - disk-fill: - properties: - fill-by-fallocate: - description: fill disk by fallocate - type: boolean - path: - description: specifies the location to fill data in. if path - not provided, payload will read/write from/into a temp file, - temp file will be deleted after writing - type: string - size: - description: 'specifies how many units of data will write - into the file path. support unit: c=1, w=2, b=512, kB=1000, - K=1024, MB=1000*1000, M=1024*1024, GB=1000*1000*1000, G=1024*1024*1024 - BYTES. example : 1M | 512kB' - type: string - type: object - disk-read-payload: - properties: - path: - description: specifies the location to fill data in. if path - not provided, payload will read/write from/into a temp file, - temp file will be deleted after writing - type: string - payload-process-num: - description: specifies the number of process work on writing, - default 1, only 1-255 is valid value - type: integer - size: - description: 'specifies how many units of data will write - into the file path. support unit: c=1, w=2, b=512, kB=1000, - K=1024, MB=1000*1000, M=1024*1024, GB=1000*1000*1000, G=1024*1024*1024 - BYTES. example : 1M | 512kB' - type: string - type: object - disk-write-payload: - properties: - path: - description: specifies the location to fill data in. if path - not provided, payload will read/write from/into a temp file, - temp file will be deleted after writing - type: string - payload-process-num: - description: specifies the number of process work on writing, - default 1, only 1-255 is valid value - type: integer - size: - description: 'specifies how many units of data will write - into the file path. support unit: c=1, w=2, b=512, kB=1000, - K=1024, MB=1000*1000, M=1024*1024, GB=1000*1000*1000, G=1024*1024*1024 - BYTES. example : 1M | 512kB' - type: string - type: object - duration: - description: Duration represents the duration of the chaos action - type: string - file-append: - properties: - count: - description: Count is the number of times to append the data. - type: integer - data: - description: Data is the data for append. - type: string - file-name: - description: FileName is the name of the file to be created, - modified, deleted, renamed, or appended. - type: string - type: object - file-create: - properties: - dir-name: - description: DirName is the directory name to create or delete. - type: string - file-name: - description: FileName is the name of the file to be created, - modified, deleted, renamed, or appended. - type: string - type: object - file-delete: - properties: - dir-name: - description: DirName is the directory name to create or delete. - type: string - file-name: - description: FileName is the name of the file to be created, - modified, deleted, renamed, or appended. - type: string - type: object - file-modify: - properties: - file-name: - description: FileName is the name of the file to be created, - modified, deleted, renamed, or appended. - type: string - privilege: - description: Privilege is the file privilege to be set. - format: int32 - type: integer - type: object - file-rename: - properties: - dest-file: - description: DestFile is the name to be renamed. - type: string - source-file: - description: SourceFile is the name need to be renamed. - type: string - type: object - file-replace: - properties: - dest-string: - description: DestStr is the destination string of the file. - type: string - file-name: - description: FileName is the name of the file to be created, - modified, deleted, renamed, or appended. - type: string - line: - description: Line is the line number of the file to be replaced. - type: integer - origin-string: - description: OriginStr is the origin string of the file. - type: string - type: object - http-abort: - properties: - code: - description: Code is a rule to select target by http status - code in response - type: string - method: - description: HTTP method - type: string - path: - description: Match path of Uri with wildcard matches - type: string - port: - description: The TCP port that the target service listens - on - format: int32 - type: integer - proxy_ports: - description: Composed with one of the port of HTTP connection, - we will only attack HTTP connection with port inside proxy_ports - items: - type: integer - type: array - target: - description: 'HTTP target: Request or Response' - type: string - required: - - proxy_ports - - target - type: object - http-config: - properties: - file_path: - description: The config file path - type: string - type: object - http-delay: - properties: - code: - description: Code is a rule to select target by http status - code in response - type: string - delay: - description: Delay represents the delay of the target request/response - type: string - method: - description: HTTP method - type: string - path: - description: Match path of Uri with wildcard matches - type: string - port: - description: The TCP port that the target service listens - on - format: int32 - type: integer - proxy_ports: - description: Composed with one of the port of HTTP connection, - we will only attack HTTP connection with port inside proxy_ports - items: - type: integer - type: array - target: - description: 'HTTP target: Request or Response' - type: string - required: - - delay - - proxy_ports - - target - type: object - http-request: - description: used for HTTP request, now only support GET - properties: - count: - description: The number of requests to send - type: integer - enable-conn-pool: - description: Enable connection pool - type: boolean - url: - description: Request to send" - type: string - type: object - jvm-exception: - properties: - class: - description: Java class - type: string - exception: - description: the exception which needs to throw for action - `exception` - type: string - method: - description: the method in Java class - type: string - pid: - description: the pid of Java process which needs to attach - type: integer - port: - description: the port of agent server, default 9277 - format: int32 - type: integer - type: object - jvm-gc: - properties: - pid: - description: the pid of Java process which needs to attach - type: integer - port: - description: the port of agent server, default 9277 - format: int32 - type: integer - type: object - jvm-latency: - properties: - class: - description: Java class - type: string - latency: - description: the latency duration for action 'latency', unit - ms - type: integer - method: - description: the method in Java class - type: string - pid: - description: the pid of Java process which needs to attach - type: integer - port: - description: the port of agent server, default 9277 - format: int32 - type: integer - type: object - jvm-mysql: - properties: - database: - description: the match database default value is "", means - match all database - type: string - exception: - description: The exception which needs to throw for action - `exception` or the exception message needs to throw in action - `mysql` - type: string - latency: - description: The latency duration for action 'latency' or - the latency duration in action `mysql` - type: integer - mysqlConnectorVersion: - description: the version of mysql-connector-java, only support - 5.X.X(set to "5") and 8.X.X(set to "8") now - type: string - pid: - description: the pid of Java process which needs to attach - type: integer - port: - description: the port of agent server, default 9277 - format: int32 - type: integer - sqlType: - description: the match sql type default value is "", means - match all SQL type. The value can be 'select', 'insert', - 'update', 'delete', 'replace'. - type: string - table: - description: the match table default value is "", means match - all table - type: string - type: object - jvm-return: - properties: - class: - description: Java class - type: string - method: - description: the method in Java class - type: string - pid: - description: the pid of Java process which needs to attach - type: integer - port: - description: the port of agent server, default 9277 - format: int32 - type: integer - value: - description: the return value for action 'return' - type: string - type: object - jvm-rule-data: - properties: - pid: - description: the pid of Java process which needs to attach - type: integer - port: - description: the port of agent server, default 9277 - format: int32 - type: integer - rule-data: - description: RuleData used to save the rule file's data, will - use it when recover - type: string - type: object - jvm-stress: - properties: - cpu-count: - description: the CPU core number need to use, only set it - when action is stress - type: integer - mem-type: - description: the memory type need to locate, only set it when - action is stress, the value can be 'stack' or 'heap' - type: string - pid: - description: the pid of Java process which needs to attach - type: integer - port: - description: the port of agent server, default 9277 - format: int32 - type: integer - type: object - kafka-fill: - properties: - host: - description: The host of kafka server - type: string - maxBytes: - description: The max bytes to fill - format: int64 - type: integer - messageSize: - description: The size of each message - type: integer - password: - description: The password of kafka client - type: string - port: - description: The port of kafka server - type: integer - reloadCommand: - description: The command to reload kafka config - type: string - topic: - description: The topic to attack - type: string - username: - description: The username of kafka client - type: string - type: object - kafka-flood: - properties: - host: - description: The host of kafka server - type: string - messageSize: - description: The size of each message - type: integer - password: - description: The password of kafka client - type: string - port: - description: The port of kafka server - type: integer - threads: - description: The number of worker threads - type: integer - topic: - description: The topic to attack - type: string - username: - description: The username of kafka client - type: string - type: object - kafka-io: - properties: - configFile: - description: The path of server config - type: string - nonReadable: - description: Make kafka cluster non-readable - type: boolean - nonWritable: - description: Make kafka cluster non-writable - type: boolean - topic: - description: The topic to attack - type: string - type: object - mode: - description: 'Mode defines the mode to run chaos action. Supported - mode: one / all / fixed / fixed-percent / random-max-percent' - enum: - - one - - all - - fixed - - fixed-percent - - random-max-percent - type: string - network-bandwidth: - properties: - buffer: - format: int32 - minimum: 1 - type: integer - device: - type: string - hostname: - type: string - ip-address: - type: string - limit: - format: int32 - minimum: 1 - type: integer - minburst: - format: int32 - type: integer - peakrate: - format: int64 - type: integer - rate: - type: string - required: - - buffer - - limit - - rate - type: object - network-corrupt: - properties: - correlation: - description: correlation is percentage (10 is 10%) - type: string - device: - description: the network interface to impact - type: string - egress-port: - description: only impact egress traffic to these destination - ports, use a ',' to separate or to indicate the range, such - as 80, 8001:8010. it can only be used in conjunction with - -p tcp or -p udp - type: string - hostname: - description: only impact traffic to these hostnames - type: string - ip-address: - description: only impact egress traffic to these IP addresses - type: string - ip-protocol: - description: 'only impact traffic using this IP protocol, - supported: tcp, udp, icmp, all' - type: string - percent: - description: percentage of packets to corrupt (10 is 10%) - type: string - source-port: - description: only impact egress traffic from these source - ports, use a ',' to separate or to indicate the range, such - as 80, 8001:8010. it can only be used in conjunction with - -p tcp or -p udp - type: string - type: object - network-delay: - properties: - accept-tcp-flags: - description: only the packet which match the tcp flag can - be accepted, others will be dropped. only set when the IPProtocol - is tcp, used for partition. - type: string - correlation: - description: correlation is percentage (10 is 10%) - type: string - device: - description: the network interface to impact - type: string - egress-port: - description: only impact egress traffic to these destination - ports, use a ',' to separate or to indicate the range, such - as 80, 8001:8010. it can only be used in conjunction with - -p tcp or -p udp - type: string - hostname: - description: only impact traffic to these hostnames - type: string - ip-address: - description: only impact egress traffic to these IP addresses - type: string - ip-protocol: - description: 'only impact traffic using this IP protocol, - supported: tcp, udp, icmp, all' - type: string - jitter: - description: 'jitter time, time units: ns, us (or µs), ms, - s, m, h.' - type: string - latency: - description: 'delay egress time, time units: ns, us (or µs), - ms, s, m, h.' - type: string - source-port: - description: only impact egress traffic from these source - ports, use a ',' to separate or to indicate the range, such - as 80, 8001:8010. it can only be used in conjunction with - -p tcp or -p udp - type: string - type: object - network-dns: - properties: - dns-domain-name: - description: map this host to specified IP - type: string - dns-ip: - description: map specified host to this IP address - type: string - dns-server: - description: update the DNS server in /etc/resolv.conf with - this value - type: string - type: object - network-down: - properties: - device: - description: The network interface to impact - type: string - duration: - description: 'NIC down time, time units: ns, us (or µs), ms, - s, m, h.' - type: string - type: object - network-duplicate: - properties: - correlation: - description: correlation is percentage (10 is 10%) - type: string - device: - description: the network interface to impact - type: string - egress-port: - description: only impact egress traffic to these destination - ports, use a ',' to separate or to indicate the range, such - as 80, 8001:8010. it can only be used in conjunction with - -p tcp or -p udp - type: string - hostname: - description: only impact traffic to these hostnames - type: string - ip-address: - description: only impact egress traffic to these IP addresses - type: string - ip-protocol: - description: 'only impact traffic using this IP protocol, - supported: tcp, udp, icmp, all' - type: string - percent: - description: percentage of packets to duplicate (10 is 10%) - type: string - source-port: - description: only impact egress traffic from these source - ports, use a ',' to separate or to indicate the range, such - as 80, 8001:8010. it can only be used in conjunction with - -p tcp or -p udp - type: string - type: object - network-flood: - properties: - duration: - description: The number of seconds to run the iperf test - type: string - ip-address: - description: Generate traffic to this IP address - type: string - parallel: - description: The number of iperf parallel client threads to - run - format: int32 - type: integer - port: - description: Generate traffic to this port on the IP address - type: string - rate: - description: The speed of network traffic, allows bps, kbps, - mbps, gbps, tbps unit. bps means bytes per second - type: string - required: - - duration - - rate - type: object - network-loss: - properties: - correlation: - description: correlation is percentage (10 is 10%) - type: string - device: - description: the network interface to impact - type: string - egress-port: - description: only impact egress traffic to these destination - ports, use a ',' to separate or to indicate the range, such - as 80, 8001:8010. it can only be used in conjunction with - -p tcp or -p udp - type: string - hostname: - description: only impact traffic to these hostnames - type: string - ip-address: - description: only impact egress traffic to these IP addresses - type: string - ip-protocol: - description: 'only impact traffic using this IP protocol, - supported: tcp, udp, icmp, all' - type: string - percent: - description: percentage of packets to loss (10 is 10%) - type: string - source-port: - description: only impact egress traffic from these source - ports, use a ',' to separate or to indicate the range, such - as 80, 8001:8010. it can only be used in conjunction with - -p tcp or -p udp - type: string - type: object - network-partition: - properties: - accept-tcp-flags: - description: only the packet which match the tcp flag can - be accepted, others will be dropped. only set when the IPProtocol - is tcp, used for partition. - type: string - device: - description: the network interface to impact - type: string - direction: - description: specifies the partition direction, values can - be 'from', 'to'. 'from' means packets coming from the 'IPAddress' - or 'Hostname' and going to your server, 'to' means packets - originating from your server and going to the 'IPAddress' - or 'Hostname'. - type: string - hostname: - description: only impact traffic to these hostnames - type: string - ip-address: - description: only impact egress traffic to these IP addresses - type: string - ip-protocol: - description: only impact egress traffic to these IP addresses - type: string - type: object - process: - properties: - process: - description: the process name or the process ID - type: string - recoverCmd: - description: the command to be run when recovering experiment - type: string - signal: - description: the signal number to send - type: integer - type: object - redis-cacheLimit: - properties: - addr: - description: The adress of Redis server - type: string - cacheSize: - description: The size of `maxmemory` - type: string - password: - description: The password of Redis server - type: string - percent: - description: Specifies maxmemory as a percentage of the original - value - type: string - type: object - redis-expiration: - properties: - addr: - description: The adress of Redis server - type: string - expiration: - description: The expiration of the keys - type: string - key: - description: The keys to be expired - type: string - option: - description: Additional options for `expiration` - type: string - password: - description: The password of Redis server - type: string - type: object - redis-penetration: - properties: - addr: - description: The adress of Redis server - type: string - password: - description: The password of Redis server - type: string - requestNum: - description: The number of requests to be sent - type: integer - type: object - redis-restart: - properties: - addr: - description: The adress of Redis server - type: string - conf: - description: The path of Sentinel conf - type: string - flushConfig: - description: The control flag determines whether to flush - config - type: boolean - password: - description: The password of Redis server - type: string - redisPath: - description: The path of `redis-server` command-line tool - type: boolean - type: object - redis-stop: - properties: - addr: - description: The adress of Redis server - type: string - conf: - description: The path of Sentinel conf - type: string - flushConfig: - description: The control flag determines whether to flush - config - type: boolean - password: - description: The password of Redis server - type: string - redisPath: - description: The path of `redis-server` command-line tool - type: boolean - type: object - remoteCluster: - description: RemoteCluster represents the remote cluster where - the chaos will be deployed - type: string - selector: - description: Selector is used to select physical machines that - are used to inject chaos action. - properties: - annotationSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be used - to select objects. A selector based on annotations. - type: object - expressionSelectors: - description: a slice of label selector expressions that can - be used to select objects. A list of selectors based on - set-based label expressions. - items: - description: A label selector requirement is a selector - that contains values, a key, and an operator that relates - the key and values. - properties: - key: - description: key is the label key that the selector - applies to. - type: string - operator: - description: operator represents a key's relationship - to a set of values. Valid operators are In, NotIn, - Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. If - the operator is In or NotIn, the values array must - be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. This array is replaced - during a strategic merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - fieldSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be used - to select objects. A selector based on fields. - type: object - labelSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be used - to select objects. A selector based on labels. - type: object - namespaces: - description: Namespaces is a set of namespace to which objects - belong. - items: - type: string - type: array - physicalMachines: - additionalProperties: - items: - type: string - type: array - description: PhysicalMachines is a map of string keys and - a set values that used to select physical machines. The - key defines the namespace which physical machine belong, - and each value is a set of physical machine names. - type: object - type: object - stress-cpu: - properties: - load: - description: specifies P percent loading per CPU worker. 0 - is effectively a sleep (no load) and 100 is full loading. - type: integer - options: - description: extend stress-ng options - items: - type: string - type: array - workers: - description: specifies N workers to apply the stressor. - type: integer - type: object - stress-mem: - properties: - options: - description: extend stress-ng options - items: - type: string - type: array - size: - description: 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 - type: object - uid: - description: the experiment ID - type: string - user_defined: - properties: - attackCmd: - description: The command to be executed when attack - type: string - recoverCmd: - description: The command to be executed when recover - type: string - type: object - value: - description: Value is required when the mode is set to `FixedMode` - / `FixedPercentMode` / `RandomMaxPercentMode`. If `FixedMode`, - provide an integer of physical machines to do chaos action. - If `FixedPercentMode`, provide a number from 0-100 to specify - the percent of physical machines the server can do chaos action. - IF `RandomMaxPercentMode`, provide a number from 0-100 to specify - the max percent of pods to do chaos action - type: string - vm: - properties: - vm-name: - description: The name of the VM to be injected - type: string - type: object - required: - - action - - mode - type: object - podChaos: - description: PodChaosSpec defines the attributes that a user creates - on a chaos experiment about pods. - properties: - action: - description: 'Action defines the specific pod chaos action. Supported - action: pod-kill / pod-failure / container-kill Default action: - pod-kill' - enum: - - pod-kill - - pod-failure - - container-kill - type: string - containerNames: - description: ContainerNames indicates list of the name of affected - container. If not set, the first container will be injected - items: - type: string - type: array - duration: - description: Duration represents the duration of the chaos action. - It is required when the action is `PodFailureAction`. A duration - string is a possibly signed sequence of decimal numbers, each - with optional fraction and a unit suffix, such as "300ms", "-1.5h" - or "2h45m". Valid time units are "ns", "us" (or "µs"), "ms", - "s", "m", "h". - type: string - gracePeriod: - description: GracePeriod is used in pod-kill action. It represents - the duration in seconds before the pod should be deleted. Value - must be non-negative integer. The default value is zero that - indicates delete immediately. - format: int64 - minimum: 0 - type: integer - mode: - description: 'Mode defines the mode to run chaos action. Supported - mode: one / all / fixed / fixed-percent / random-max-percent' - enum: - - one - - all - - fixed - - fixed-percent - - random-max-percent - type: string - remoteCluster: - description: RemoteCluster represents the remote cluster where - the chaos will be deployed - type: string - selector: - description: Selector is used to select pods that are used to - inject chaos action. - properties: - annotationSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be used - to select objects. A selector based on annotations. - type: object - expressionSelectors: - description: a slice of label selector expressions that can - be used to select objects. A list of selectors based on - set-based label expressions. - items: - description: A label selector requirement is a selector - that contains values, a key, and an operator that relates - the key and values. - properties: - key: - description: key is the label key that the selector - applies to. - type: string - operator: - description: operator represents a key's relationship - to a set of values. Valid operators are In, NotIn, - Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. If - the operator is In or NotIn, the values array must - be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. This array is replaced - during a strategic merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - fieldSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be used - to select objects. A selector based on fields. - type: object - labelSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be used - to select objects. A selector based on labels. - type: object - namespaces: - description: Namespaces is a set of namespace to which objects - belong. - items: - type: string - type: array - nodeSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be used - to select nodes. Selector which must match a node's labels, - and objects must belong to these selected nodes. - type: object - nodes: - description: Nodes is a set of node name and objects must - belong to these nodes. - items: - type: string - type: array - podPhaseSelectors: - description: 'PodPhaseSelectors is a set of condition of a - pod at the current time. supported value: Pending / Running - / Succeeded / Failed / Unknown' - items: - type: string - type: array - pods: - additionalProperties: - items: - type: string - type: array - description: Pods is a map of string keys and a set values - that used to select pods. The key defines the namespace - which pods belong, and the each values is a set of pod names. - type: object - type: object - value: - description: Value is required when the mode is set to `FixedMode` - / `FixedPercentMode` / `RandomMaxPercentMode`. If `FixedMode`, - provide an integer of pods to do chaos action. If `FixedPercentMode`, - provide a number from 0-100 to specify the percent of pods the - server can do chaos action. IF `RandomMaxPercentMode`, provide - a number from 0-100 to specify the max percent of pods to do - chaos action - type: string - required: - - action - - mode - - selector - type: object - schedule: - type: string - startingDeadlineSeconds: - exclusiveMinimum: true - format: int64 - minimum: 0 - nullable: true - type: integer - stressChaos: - description: StressChaosSpec defines the desired state of StressChaos - properties: - containerNames: - description: ContainerNames indicates list of the name of affected - container. If not set, the first container will be injected - items: - type: string - type: array - duration: - description: Duration represents the duration of the chaos action - type: string - mode: - description: 'Mode defines the mode to run chaos action. Supported - mode: one / all / fixed / fixed-percent / random-max-percent' - enum: - - one - - all - - fixed - - fixed-percent - - random-max-percent - type: string - remoteCluster: - description: RemoteCluster represents the remote cluster where - the chaos will be deployed - type: string - selector: - description: Selector is used to select pods that are used to - inject chaos action. - properties: - annotationSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be used - to select objects. A selector based on annotations. - type: object - expressionSelectors: - description: a slice of label selector expressions that can - be used to select objects. A list of selectors based on - set-based label expressions. - items: - description: A label selector requirement is a selector - that contains values, a key, and an operator that relates - the key and values. - properties: - key: - description: key is the label key that the selector - applies to. - type: string - operator: - description: operator represents a key's relationship - to a set of values. Valid operators are In, NotIn, - Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. If - the operator is In or NotIn, the values array must - be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. This array is replaced - during a strategic merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - fieldSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be used - to select objects. A selector based on fields. - type: object - labelSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be used - to select objects. A selector based on labels. - type: object - namespaces: - description: Namespaces is a set of namespace to which objects - belong. - items: - type: string - type: array - nodeSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be used - to select nodes. Selector which must match a node's labels, - and objects must belong to these selected nodes. - type: object - nodes: - description: Nodes is a set of node name and objects must - belong to these nodes. - items: - type: string - type: array - podPhaseSelectors: - description: 'PodPhaseSelectors is a set of condition of a - pod at the current time. supported value: Pending / Running - / Succeeded / Failed / Unknown' - items: - type: string - type: array - pods: - additionalProperties: - items: - type: string - type: array - description: Pods is a map of string keys and a set values - that used to select pods. The key defines the namespace - which pods belong, and the each values is a set of pod names. - type: object - type: object - stressngStressors: - description: StressngStressors defines plenty of stressors just - like `Stressors` except that it's an experimental feature and - more powerful. You can define stressors in `stress-ng` (see - also `man stress-ng`) dialect, however not all of the supported - stressors are well tested. It maybe retired in later releases. - You should always use `Stressors` to define the stressors and - use this only when you want more stressors unsupported by `Stressors`. - When both `StressngStressors` and `Stressors` are defined, `StressngStressors` - wins. - type: string - stressors: - description: Stressors defines plenty of stressors supported to - stress system components out. You can use one or more of them - to make up various kinds of stresses. At least one of the stressors - should be specified. - properties: - cpu: - description: CPUStressor stresses CPU out - properties: - load: - description: Load specifies P percent loading per CPU - worker. 0 is effectively a sleep (no load) and 100 is - full loading. - maximum: 100 - minimum: 0 - type: integer - options: - description: extend stress-ng options - items: - type: string - type: array - workers: - description: Workers specifies N workers to apply the - stressor. Maximum 8192 workers can run by stress-ng - maximum: 8192 - type: integer - required: - - workers - type: object - memory: - description: MemoryStressor stresses virtual memory out - properties: - oomScoreAdj: - default: 0 - description: OOMScoreAdj sets the oom_score_adj of the - stress process. See `man 5 proc` to know more about - this option. - maximum: 1000 - minimum: -1000 - type: integer - options: - description: extend stress-ng options - items: - type: string - type: array - size: - description: Size 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 - workers: - description: Workers specifies N workers to apply the - stressor. Maximum 8192 workers can run by stress-ng - maximum: 8192 - type: integer - required: - - workers - type: object - type: object - value: - description: Value is required when the mode is set to `FixedMode` - / `FixedPercentMode` / `RandomMaxPercentMode`. If `FixedMode`, - provide an integer of pods to do chaos action. If `FixedPercentMode`, - provide a number from 0-100 to specify the percent of pods the - server can do chaos action. IF `RandomMaxPercentMode`, provide - a number from 0-100 to specify the max percent of pods to do - chaos action - type: string - required: - - mode - - selector - type: object - timeChaos: - description: TimeChaosSpec defines the desired state of TimeChaos - properties: - clockIds: - description: ClockIds defines all affected clock id All available - options are ["CLOCK_REALTIME","CLOCK_MONOTONIC","CLOCK_PROCESS_CPUTIME_ID","CLOCK_THREAD_CPUTIME_ID", - "CLOCK_MONOTONIC_RAW","CLOCK_REALTIME_COARSE","CLOCK_MONOTONIC_COARSE","CLOCK_BOOTTIME","CLOCK_REALTIME_ALARM", - "CLOCK_BOOTTIME_ALARM"] Default value is ["CLOCK_REALTIME"] - items: - type: string - type: array - containerNames: - description: ContainerNames indicates list of the name of affected - container. If not set, the first container will be injected - items: - type: string - type: array - duration: - description: Duration represents the duration of the chaos action - type: string - mode: - description: 'Mode defines the mode to run chaos action. Supported - mode: one / all / fixed / fixed-percent / random-max-percent' - enum: - - one - - all - - fixed - - fixed-percent - - random-max-percent - type: string - remoteCluster: - description: RemoteCluster represents the remote cluster where - the chaos will be deployed - type: string - selector: - description: Selector is used to select pods that are used to - inject chaos action. - properties: - annotationSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be used - to select objects. A selector based on annotations. - type: object - expressionSelectors: - description: a slice of label selector expressions that can - be used to select objects. A list of selectors based on - set-based label expressions. - items: - description: A label selector requirement is a selector - that contains values, a key, and an operator that relates - the key and values. - properties: - key: - description: key is the label key that the selector - applies to. - type: string - operator: - description: operator represents a key's relationship - to a set of values. Valid operators are In, NotIn, - Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. If - the operator is In or NotIn, the values array must - be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. This array is replaced - during a strategic merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - fieldSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be used - to select objects. A selector based on fields. - type: object - labelSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be used - to select objects. A selector based on labels. - type: object - namespaces: - description: Namespaces is a set of namespace to which objects - belong. - items: - type: string - type: array - nodeSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be used - to select nodes. Selector which must match a node's labels, - and objects must belong to these selected nodes. - type: object - nodes: - description: Nodes is a set of node name and objects must - belong to these nodes. - items: - type: string - type: array - podPhaseSelectors: - description: 'PodPhaseSelectors is a set of condition of a - pod at the current time. supported value: Pending / Running - / Succeeded / Failed / Unknown' - items: - type: string - type: array - pods: - additionalProperties: - items: - type: string - type: array - description: Pods is a map of string keys and a set values - that used to select pods. The key defines the namespace - which pods belong, and the each values is a set of pod names. - type: object - type: object - timeOffset: - description: TimeOffset defines the delta time of injected program. - It's a possibly signed sequence of decimal numbers, such as - "300ms", "-1.5h" or "2h45m". Valid time units are "ns", "us" - (or "µs"), "ms", "s", "m", "h". - type: string - value: - description: Value is required when the mode is set to `FixedMode` - / `FixedPercentMode` / `RandomMaxPercentMode`. If `FixedMode`, - provide an integer of pods to do chaos action. If `FixedPercentMode`, - provide a number from 0-100 to specify the percent of pods the - server can do chaos action. IF `RandomMaxPercentMode`, provide - a number from 0-100 to specify the max percent of pods to do - chaos action - type: string - required: - - mode - - selector - - timeOffset - type: object - type: - type: string - workflow: - properties: - entry: - type: string - templates: - items: - properties: - abortWithStatusCheck: - description: AbortWithStatusCheck describe whether to abort - the workflow when the failure threshold of StatusCheck - is exceeded. Only used when Type is TypeStatusCheck. - type: boolean - awsChaos: - description: AWSChaosSpec is the content of the specification - for an AWSChaos - properties: - action: - description: 'Action defines the specific aws chaos - action. Supported action: ec2-stop / ec2-restart / - detach-volume Default action: ec2-stop' - 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. - Needed in detach-volume. - type: string - duration: - description: Duration represents the duration of the - chaos action. - type: string - ec2Instance: - description: Ec2Instance indicates the ID of the ec2 - instance. - type: string - endpoint: - description: Endpoint indicates the endpoint of the - aws server. Just used it in test now. - type: string - remoteCluster: - description: RemoteCluster represents the remote cluster - where the chaos will be deployed - type: string - secretName: - description: SecretName defines the name of kubernetes - secret. - type: string - volumeID: - description: EbsVolume indicates the ID of the EBS volume. - Needed in detach-volume. - type: string - required: - - action - - awsRegion - - ec2Instance - type: object - azureChaos: - description: AzureChaosSpec is the content of the specification - for an AzureChaos - properties: - action: - description: 'Action defines the specific azure chaos - action. Supported action: vm-stop / vm-restart / disk-detach - Default action: vm-stop' - enum: - - vm-stop - - vm-restart - - disk-detach - type: string - diskName: - description: DiskName indicates the name of the disk. - Needed in disk-detach. - type: string - duration: - description: Duration represents the duration of the - chaos action. - type: string - lun: - description: LUN indicates the Logical Unit Number of - the data disk. Needed in disk-detach. - type: integer - remoteCluster: - description: RemoteCluster represents the remote cluster - where the chaos will be deployed - type: string - resourceGroupName: - description: ResourceGroupName defines the name of ResourceGroup - type: string - secretName: - description: SecretName defines the name of kubernetes - secret. It is used for Azure credentials. - type: string - subscriptionID: - description: SubscriptionID defines the id of Azure - subscription. - type: string - vmName: - description: VMName defines the name of Virtual Machine - type: string - required: - - action - - resourceGroupName - - subscriptionID - - vmName - type: object - blockChaos: - description: BlockChaosSpec is the content of the specification - for a BlockChaos - properties: - action: - description: 'Action defines the specific block chaos - action. Supported action: delay' - enum: - - delay - type: string - containerNames: - description: ContainerNames indicates list of the name - of affected container. If not set, the first container - will be injected - items: - type: string - type: array - delay: - description: Delay defines the delay distribution. - properties: - correlation: - type: string - jitter: - type: string - latency: - description: Latency defines the latency of every - io request. - type: string - type: object - duration: - description: Duration represents the duration of the - chaos action. - type: string - mode: - description: 'Mode defines the mode to run chaos action. - Supported mode: one / all / fixed / fixed-percent - / random-max-percent' - enum: - - one - - all - - fixed - - fixed-percent - - random-max-percent - type: string - remoteCluster: - description: RemoteCluster represents the remote cluster - where the chaos will be deployed - type: string - selector: - description: Selector is used to select pods that are - used to inject chaos action. - properties: - annotationSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select objects. A selector based - on annotations. - type: object - expressionSelectors: - description: a slice of label selector expressions - that can be used to select objects. A list of - selectors based on set-based label expressions. - items: - description: A label selector requirement is a - selector that contains values, a key, and an - operator that relates the key and values. - properties: - key: - description: key is the label key that the - selector applies to. - type: string - operator: - description: operator represents a key's relationship - to a set of values. Valid operators are - In, NotIn, Exists and DoesNotExist. - type: string - values: - description: values is an array of string - values. If the operator is In or NotIn, - the values array must be non-empty. If the - operator is Exists or DoesNotExist, the - values array must be empty. This array is - replaced during a strategic merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - fieldSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select objects. A selector based - on fields. - type: object - labelSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select objects. A selector based - on labels. - type: object - namespaces: - description: Namespaces is a set of namespace to - which objects belong. - items: - type: string - type: array - nodeSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select nodes. Selector which must - match a node's labels, and objects must belong - to these selected nodes. - type: object - nodes: - description: Nodes is a set of node name and objects - must belong to these nodes. - items: - type: string - type: array - podPhaseSelectors: - description: 'PodPhaseSelectors is a set of condition - of a pod at the current time. supported value: - Pending / Running / Succeeded / Failed / Unknown' - items: - type: string - type: array - pods: - additionalProperties: - items: - type: string - type: array - description: Pods is a map of string keys and a - set values that used to select pods. The key defines - the namespace which pods belong, and the each - values is a set of pod names. - type: object - type: object - value: - description: Value is required when the mode is set - to `FixedMode` / `FixedPercentMode` / `RandomMaxPercentMode`. - If `FixedMode`, provide an integer of pods to do chaos - action. If `FixedPercentMode`, provide a number from - 0-100 to specify the percent of pods the server can - do chaos action. IF `RandomMaxPercentMode`, provide - a number from 0-100 to specify the max percent of - pods to do chaos action - type: string - volumeName: - type: string - required: - - action - - mode - - selector - - volumeName - type: object - children: - description: Children describes the children steps of serial - or parallel node. Only used when Type is TypeSerial or - TypeParallel. - items: - type: string - type: array - conditionalBranches: - description: ConditionalBranches describes the conditional - branches of custom tasks. Only used when Type is TypeTask. - items: - properties: - expression: - description: Expression is the expression for this - conditional branch, expected type of result is boolean. - If expression is empty, this branch will always - be selected/the template will be spawned. - type: string - target: - description: Target is the name of other template, - if expression is evaluated as true, this template - will be spawned. - type: string - required: - - target - type: object - type: array - deadline: - type: string - dnsChaos: - description: DNSChaosSpec defines the desired state of DNSChaos - properties: - action: - description: 'Action defines the specific DNS chaos - action. Supported action: error, random Default action: - error' - enum: - - error - - random - type: string - containerNames: - description: ContainerNames indicates list of the name - of affected container. If not set, the first container - will be injected - items: - type: string - type: array - duration: - description: Duration represents the duration of the - chaos action - type: string - mode: - description: 'Mode defines the mode to run chaos action. - Supported mode: one / all / fixed / fixed-percent - / random-max-percent' - enum: - - one - - all - - fixed - - fixed-percent - - random-max-percent - type: string - patterns: - description: 'Choose which domain names to take effect, - support the placeholder ? and wildcard *, or the Specified - domain name. Note: 1. The wildcard * must be at the - end of the string. For example, chaos-*.org is invalid. - 2. if the patterns is empty, will take effect on all - the domain names. For example: The value is ["google.com", - "github.*", "chaos-mes?.org"], will take effect on - "google.com", "github.com" and "chaos-mesh.org"' - items: - type: string - type: array - remoteCluster: - description: RemoteCluster represents the remote cluster - where the chaos will be deployed - type: string - selector: - description: Selector is used to select pods that are - used to inject chaos action. - properties: - annotationSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select objects. A selector based - on annotations. - type: object - expressionSelectors: - description: a slice of label selector expressions - that can be used to select objects. A list of - selectors based on set-based label expressions. - items: - description: A label selector requirement is a - selector that contains values, a key, and an - operator that relates the key and values. - properties: - key: - description: key is the label key that the - selector applies to. - type: string - operator: - description: operator represents a key's relationship - to a set of values. Valid operators are - In, NotIn, Exists and DoesNotExist. - type: string - values: - description: values is an array of string - values. If the operator is In or NotIn, - the values array must be non-empty. If the - operator is Exists or DoesNotExist, the - values array must be empty. This array is - replaced during a strategic merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - fieldSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select objects. A selector based - on fields. - type: object - labelSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select objects. A selector based - on labels. - type: object - namespaces: - description: Namespaces is a set of namespace to - which objects belong. - items: - type: string - type: array - nodeSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select nodes. Selector which must - match a node's labels, and objects must belong - to these selected nodes. - type: object - nodes: - description: Nodes is a set of node name and objects - must belong to these nodes. - items: - type: string - type: array - podPhaseSelectors: - description: 'PodPhaseSelectors is a set of condition - of a pod at the current time. supported value: - Pending / Running / Succeeded / Failed / Unknown' - items: - type: string - type: array - pods: - additionalProperties: - items: - type: string - type: array - description: Pods is a map of string keys and a - set values that used to select pods. The key defines - the namespace which pods belong, and the each - values is a set of pod names. - type: object - type: object - value: - description: Value is required when the mode is set - to `FixedMode` / `FixedPercentMode` / `RandomMaxPercentMode`. - If `FixedMode`, provide an integer of pods to do chaos - action. If `FixedPercentMode`, provide a number from - 0-100 to specify the percent of pods the server can - do chaos action. IF `RandomMaxPercentMode`, provide - a number from 0-100 to specify the max percent of - pods to do chaos action - type: string - required: - - action - - mode - - selector - type: object - gcpChaos: - description: GCPChaosSpec is the content of the specification - for a GCPChaos - properties: - action: - description: 'Action defines the specific gcp chaos - action. Supported action: node-stop / node-reset / - disk-loss Default action: node-stop' - enum: - - node-stop - - node-reset - - disk-loss - type: string - deviceNames: - description: The device name of disks to detach. Needed - in disk-loss. - items: - type: string - type: array - duration: - description: Duration represents the duration of the - chaos action. - type: string - instance: - description: Instance defines the name of the instance - type: string - project: - description: Project defines the ID of gcp project. - type: string - remoteCluster: - description: RemoteCluster represents the remote cluster - where the chaos will be deployed - type: string - secretName: - description: SecretName defines the name of kubernetes - secret. It is used for GCP credentials. - type: string - zone: - description: Zone defines the zone of gcp project. - type: string - required: - - action - - instance - - project - - zone - type: object - httpChaos: - properties: - abort: - description: Abort is a rule to abort a http session. - type: boolean - code: - description: Code is a rule to select target by http - status code in response. - format: int32 - type: integer - delay: - description: Delay represents the delay of the target - request/response. A duration string is a possibly - unsigned sequence of decimal numbers, each with optional - fraction and a unit suffix, such as "300ms", "2h45m". - Valid time units are "ns", "us" (or "µs"), "ms", "s", - "m", "h". - type: string - duration: - description: Duration represents the duration of the - chaos action. - type: string - method: - description: Method is a rule to select target by http - method in request. - type: string - mode: - description: 'Mode defines the mode to run chaos action. - Supported mode: one / all / fixed / fixed-percent - / random-max-percent' - enum: - - one - - all - - fixed - - fixed-percent - - random-max-percent - type: string - patch: - description: Patch is a rule to patch some contents - in target. - properties: - body: - description: Body is a rule to patch message body - of target. - properties: - type: - description: Type represents the patch type, - only support `JSON` as [merge patch json](https://tools.ietf.org/html/rfc7396) - currently. - type: string - value: - description: Value is the patch contents. - type: string - required: - - type - - value - type: object - headers: - description: 'Headers is a rule to append http headers - of target. For example: `[["Set-Cookie", ""], ["Set-Cookie", ""]]`.' - items: - items: - type: string - type: array - type: array - queries: - description: 'Queries is a rule to append uri queries - of target(Request only). For example: `[["foo", - "bar"], ["foo", "unknown"]]`.' - items: - items: - type: string - type: array - type: array - type: object - path: - description: Path is a rule to select target by uri - path in http request. - type: string - port: - description: Port represents the target port to be proxy - of. - format: int32 - type: integer - remoteCluster: - description: RemoteCluster represents the remote cluster - where the chaos will be deployed - type: string - replace: - description: Replace is a rule to replace some contents - in target. - properties: - body: - description: Body is a rule to replace http message - body in target. - format: byte - type: string - code: - description: Code is a rule to replace http status - code in response. - format: int32 - type: integer - headers: - additionalProperties: - type: string - description: Headers is a rule to replace http headers - of target. The key-value pairs represent header - name and header value pairs. - type: object - method: - description: Method is a rule to replace http method - in request. - type: string - path: - description: Path is rule to to replace uri path - in http request. - type: string - queries: - additionalProperties: - type: string - description: 'Queries is a rule to replace uri queries - in http request. For example, with value `{ "foo": - "unknown" }`, the `/?foo=bar` will be altered - to `/?foo=unknown`,' - type: object - type: object - request_headers: - additionalProperties: - type: string - description: RequestHeaders is a rule to select target - by http headers in request. The key-value pairs represent - header name and header value pairs. - type: object - response_headers: - additionalProperties: - type: string - description: ResponseHeaders is a rule to select target - by http headers in response. The key-value pairs represent - header name and header value pairs. - type: object - selector: - description: Selector is used to select pods that are - used to inject chaos action. - properties: - annotationSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select objects. A selector based - on annotations. - type: object - expressionSelectors: - description: a slice of label selector expressions - that can be used to select objects. A list of - selectors based on set-based label expressions. - items: - description: A label selector requirement is a - selector that contains values, a key, and an - operator that relates the key and values. - properties: - key: - description: key is the label key that the - selector applies to. - type: string - operator: - description: operator represents a key's relationship - to a set of values. Valid operators are - In, NotIn, Exists and DoesNotExist. - type: string - values: - description: values is an array of string - values. If the operator is In or NotIn, - the values array must be non-empty. If the - operator is Exists or DoesNotExist, the - values array must be empty. This array is - replaced during a strategic merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - fieldSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select objects. A selector based - on fields. - type: object - labelSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select objects. A selector based - on labels. - type: object - namespaces: - description: Namespaces is a set of namespace to - which objects belong. - items: - type: string - type: array - nodeSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select nodes. Selector which must - match a node's labels, and objects must belong - to these selected nodes. - type: object - nodes: - description: Nodes is a set of node name and objects - must belong to these nodes. - items: - type: string - type: array - podPhaseSelectors: - description: 'PodPhaseSelectors is a set of condition - of a pod at the current time. supported value: - Pending / Running / Succeeded / Failed / Unknown' - items: - type: string - type: array - pods: - additionalProperties: - items: - type: string - type: array - description: Pods is a map of string keys and a - set values that used to select pods. The key defines - the namespace which pods belong, and the each - values is a set of pod names. - type: object - type: object - target: - description: Target is the object to be selected and - injected. - enum: - - Request - - Response - type: string - tls: - description: TLS is the tls config, will override PodHttpChaos - if there are multiple HTTPChaos experiments are applied - properties: - caName: - description: CAName represents the data name of - ca file in secret, `ca.crt` for example - type: string - certName: - description: CertName represents the data name of - cert file in secret, `tls.crt` for example - type: string - keyName: - description: KeyName represents the data name of - key file in secret, `tls.key` for example - type: string - secretName: - description: SecretName represents the name of required - secret resource - type: string - secretNamespace: - description: SecretNamespace represents the namespace - of required secret resource - type: string - required: - - certName - - keyName - - secretName - - secretNamespace - type: object - value: - description: Value is required when the mode is set - to `FixedMode` / `FixedPercentMode` / `RandomMaxPercentMode`. - If `FixedMode`, provide an integer of pods to do chaos - action. If `FixedPercentMode`, provide a number from - 0-100 to specify the percent of pods the server can - do chaos action. IF `RandomMaxPercentMode`, provide - a number from 0-100 to specify the max percent of - pods to do chaos action - type: string - required: - - mode - - selector - - target - type: object - ioChaos: - description: IOChaosSpec defines the desired state of IOChaos - properties: - action: - description: 'Action defines the specific pod chaos - action. Supported action: latency / fault / attrOverride - / mistake' - enum: - - latency - - fault - - attrOverride - - mistake - type: string - attr: - description: Attr defines the overrided attribution - properties: - atime: - description: Timespec represents a time - properties: - nsec: - format: int64 - type: integer - sec: - format: int64 - type: integer - required: - - nsec - - sec - type: object - blocks: - format: int64 - type: integer - ctime: - description: Timespec represents a time - properties: - nsec: - format: int64 - type: integer - sec: - format: int64 - type: integer - required: - - nsec - - sec - type: object - gid: - format: int32 - type: integer - ino: - format: int64 - type: integer - kind: - description: FileType represents type of file - type: string - mtime: - description: Timespec represents a time - properties: - nsec: - format: int64 - type: integer - sec: - format: int64 - type: integer - required: - - nsec - - sec - type: object - nlink: - format: int32 - type: integer - perm: - type: integer - rdev: - format: int32 - type: integer - size: - format: int64 - type: integer - uid: - format: int32 - type: integer - type: object - containerNames: - description: ContainerNames indicates list of the name - of affected container. If not set, the first container - will be injected - items: - type: string - type: array - delay: - description: Delay defines the value of I/O chaos action - delay. A delay string is a possibly signed sequence - of decimal numbers, each with optional fraction and - a unit suffix, such as "300ms". Valid time units are - "ns", "us" (or "µs"), "ms", "s", "m", "h". - type: string - duration: - description: Duration represents the duration of the - chaos action. It is required when the action is `PodFailureAction`. - A duration string is a possibly signed sequence of - decimal numbers, each with optional fraction and a - unit suffix, such as "300ms", "-1.5h" or "2h45m". - Valid time units are "ns", "us" (or "µs"), "ms", "s", - "m", "h". - type: string - errno: - description: 'Errno defines the error code that returned - by I/O action. refer to: https://www-numi.fnal.gov/offline_software/srt_public_context/WebDocs/Errors/unix_system_errors.html' - format: int32 - type: integer - methods: - description: 'Methods defines the I/O methods for injecting - I/O chaos action. default: all I/O methods.' - items: - type: string - type: array - mistake: - description: Mistake defines what types of incorrectness - are injected to IO operations - properties: - filling: - description: Filling determines what is filled in - the mistake data. - enum: - - zero - - random - type: string - maxLength: - description: Max length of each wrong data segment - in bytes - format: int64 - minimum: 1 - type: integer - maxOccurrences: - description: There will be [1, MaxOccurrences] segments - of wrong data. - format: int64 - minimum: 1 - type: integer - type: object - mode: - description: 'Mode defines the mode to run chaos action. - Supported mode: one / all / fixed / fixed-percent - / random-max-percent' - enum: - - one - - all - - fixed - - fixed-percent - - random-max-percent - type: string - path: - description: Path defines the path of files for injecting - I/O chaos action. - type: string - percent: - default: 100 - description: 'Percent defines the percentage of injection - errors and provides a number from 0-100. default: - 100.' - type: integer - remoteCluster: - description: RemoteCluster represents the remote cluster - where the chaos will be deployed - type: string - selector: - description: Selector is used to select pods that are - used to inject chaos action. - properties: - annotationSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select objects. A selector based - on annotations. - type: object - expressionSelectors: - description: a slice of label selector expressions - that can be used to select objects. A list of - selectors based on set-based label expressions. - items: - description: A label selector requirement is a - selector that contains values, a key, and an - operator that relates the key and values. - properties: - key: - description: key is the label key that the - selector applies to. - type: string - operator: - description: operator represents a key's relationship - to a set of values. Valid operators are - In, NotIn, Exists and DoesNotExist. - type: string - values: - description: values is an array of string - values. If the operator is In or NotIn, - the values array must be non-empty. If the - operator is Exists or DoesNotExist, the - values array must be empty. This array is - replaced during a strategic merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - fieldSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select objects. A selector based - on fields. - type: object - labelSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select objects. A selector based - on labels. - type: object - namespaces: - description: Namespaces is a set of namespace to - which objects belong. - items: - type: string - type: array - nodeSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select nodes. Selector which must - match a node's labels, and objects must belong - to these selected nodes. - type: object - nodes: - description: Nodes is a set of node name and objects - must belong to these nodes. - items: - type: string - type: array - podPhaseSelectors: - description: 'PodPhaseSelectors is a set of condition - of a pod at the current time. supported value: - Pending / Running / Succeeded / Failed / Unknown' - items: - type: string - type: array - pods: - additionalProperties: - items: - type: string - type: array - description: Pods is a map of string keys and a - set values that used to select pods. The key defines - the namespace which pods belong, and the each - values is a set of pod names. - type: object - type: object - value: - description: Value is required when the mode is set - to `FixedMode` / `FixedPercentMode` / `RandomMaxPercentMode`. - If `FixedMode`, provide an integer of pods to do chaos - action. If `FixedPercentMode`, provide a number from - 0-100 to specify the percent of pods the server can - do chaos action. IF `RandomMaxPercentMode`, provide - a number from 0-100 to specify the max percent of - pods to do chaos action - type: string - volumePath: - description: VolumePath represents the mount path of - injected volume - type: string - required: - - action - - mode - - selector - - volumePath - type: object - jvmChaos: - description: JVMChaosSpec defines the desired state of JVMChaos - properties: - action: - description: 'Action defines the specific jvm chaos - action. Supported action: latency;return;exception;stress;gc;ruleData' - enum: - - latency - - return - - exception - - stress - - gc - - ruleData - - mysql - type: string - class: - description: Java class - type: string - containerNames: - description: ContainerNames indicates list of the name - of affected container. If not set, the first container - will be injected - items: - type: string - type: array - cpuCount: - description: the CPU core number needs to use, only - set it when action is stress - type: integer - database: - description: the match database default value is "", - means match all database - type: string - duration: - description: Duration represents the duration of the - chaos action - type: string - exception: - description: the exception which needs to throw for - action `exception` or the exception message needs - to throw in action `mysql` - type: string - latency: - description: the latency duration for action 'latency', - unit ms or the latency duration in action `mysql` - type: integer - memType: - description: the memory type needs to locate, only set - it when action is stress, the value can be 'stack' - or 'heap' - type: string - method: - description: the method in Java class - type: string - mode: - description: 'Mode defines the mode to run chaos action. - Supported mode: one / all / fixed / fixed-percent - / random-max-percent' - enum: - - one - - all - - fixed - - fixed-percent - - random-max-percent - type: string - mysqlConnectorVersion: - description: the version of mysql-connector-java, only - support 5.X.X(set to "5") and 8.X.X(set to "8") now - type: string - name: - description: byteman rule name, should be unique, and - will generate one if not set - type: string - pid: - description: the pid of Java process which needs to - attach - type: integer - port: - description: the port of agent server, default 9277 - format: int32 - type: integer - remoteCluster: - description: RemoteCluster represents the remote cluster - where the chaos will be deployed - type: string - ruleData: - description: the byteman rule's data for action 'ruleData' - type: string - selector: - description: Selector is used to select pods that are - used to inject chaos action. - properties: - annotationSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select objects. A selector based - on annotations. - type: object - expressionSelectors: - description: a slice of label selector expressions - that can be used to select objects. A list of - selectors based on set-based label expressions. - items: - description: A label selector requirement is a - selector that contains values, a key, and an - operator that relates the key and values. - properties: - key: - description: key is the label key that the - selector applies to. - type: string - operator: - description: operator represents a key's relationship - to a set of values. Valid operators are - In, NotIn, Exists and DoesNotExist. - type: string - values: - description: values is an array of string - values. If the operator is In or NotIn, - the values array must be non-empty. If the - operator is Exists or DoesNotExist, the - values array must be empty. This array is - replaced during a strategic merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - fieldSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select objects. A selector based - on fields. - type: object - labelSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select objects. A selector based - on labels. - type: object - namespaces: - description: Namespaces is a set of namespace to - which objects belong. - items: - type: string - type: array - nodeSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select nodes. Selector which must - match a node's labels, and objects must belong - to these selected nodes. - type: object - nodes: - description: Nodes is a set of node name and objects - must belong to these nodes. - items: - type: string - type: array - podPhaseSelectors: - description: 'PodPhaseSelectors is a set of condition - of a pod at the current time. supported value: - Pending / Running / Succeeded / Failed / Unknown' - items: - type: string - type: array - pods: - additionalProperties: - items: - type: string - type: array - description: Pods is a map of string keys and a - set values that used to select pods. The key defines - the namespace which pods belong, and the each - values is a set of pod names. - type: object - type: object - sqlType: - description: the match sql type default value is "", - means match all SQL type. The value can be 'select', - 'insert', 'update', 'delete', 'replace'. - type: string - table: - description: the match table default value is "", means - match all table - type: string - value: - description: Value is required when the mode is set - to `FixedMode` / `FixedPercentMode` / `RandomMaxPercentMode`. - If `FixedMode`, provide an integer of pods to do chaos - action. If `FixedPercentMode`, provide a number from - 0-100 to specify the percent of pods the server can - do chaos action. IF `RandomMaxPercentMode`, provide - a number from 0-100 to specify the max percent of - pods to do chaos action - type: string - required: - - action - - mode - - selector - type: object - kernelChaos: - description: KernelChaosSpec defines the desired state of - KernelChaos - properties: - containerNames: - description: ContainerNames indicates list of the name - of affected container. If not set, the first container - will be injected - items: - type: string - type: array - duration: - description: Duration represents the duration of the - chaos action - type: string - failKernRequest: - description: FailKernRequest defines the request of - kernel injection - properties: - callchain: - description: 'Callchain indicate a special call - chain, such as: ext4_mount -> mount_subtree -> - ... -> should_failslab With an optional set of - predicates and an optional set of parameters, - which used with predicates. You can read call - chan and predicate examples from https://github.com/chaos-mesh/bpfki/tree/develop/examples - to learn more. If no special call chain, just - keep Callchain empty, which means it will fail - at any call chain with slab alloc (eg: kmalloc).' - items: - description: Frame defines the function signature - and predicate in function's body - properties: - funcname: - description: Funcname can be find from kernel - source or `/proc/kallsyms`, such as `ext4_mount` - type: string - parameters: - description: Parameters is used with predicate, - for example, if you want to inject slab - error in `d_alloc_parallel(struct dentry - *parent, const struct qstr *name)` with - a special name `bananas`, you need to set - it to `struct dentry *parent, const struct - qstr *name` otherwise omit it. - type: string - predicate: - description: Predicate will access the arguments - of this Frame, example with Parameters's, - you can set it to `STRNCMP(name->name, "bananas", - 8)` to make inject only with it, or omit - it to inject for all d_alloc_parallel call - chain. - type: string - type: object - type: array - failtype: - description: 'FailType indicates what to fail, can - be set to ''0'' / ''1'' / ''2'' If `0`, indicates - slab to fail (should_failslab) If `1`, indicates - alloc_page to fail (should_fail_alloc_page) If - `2`, indicates bio to fail (should_fail_bio) You - can read: 1. https://www.kernel.org/doc/html/latest/fault-injection/fault-injection.html - 2. http://github.com/iovisor/bcc/blob/master/tools/inject_example.txt - to learn more' - format: int32 - maximum: 2 - minimum: 0 - type: integer - headers: - description: 'Headers indicates the appropriate - kernel headers you need. Eg: "linux/mmzone.h", - "linux/blkdev.h" and so on' - items: - type: string - type: array - probability: - description: Probability indicates the fails with - probability. If you want 1%, please set this field - with 1. - format: int32 - maximum: 100 - minimum: 0 - type: integer - times: - description: Times indicates the max times of fails. - format: int32 - minimum: 0 - type: integer - required: - - failtype - type: object - mode: - description: 'Mode defines the mode to run chaos action. - Supported mode: one / all / fixed / fixed-percent - / random-max-percent' - enum: - - one - - all - - fixed - - fixed-percent - - random-max-percent - type: string - remoteCluster: - description: RemoteCluster represents the remote cluster - where the chaos will be deployed - type: string - selector: - description: Selector is used to select pods that are - used to inject chaos action. - properties: - annotationSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select objects. A selector based - on annotations. - type: object - expressionSelectors: - description: a slice of label selector expressions - that can be used to select objects. A list of - selectors based on set-based label expressions. - items: - description: A label selector requirement is a - selector that contains values, a key, and an - operator that relates the key and values. - properties: - key: - description: key is the label key that the - selector applies to. - type: string - operator: - description: operator represents a key's relationship - to a set of values. Valid operators are - In, NotIn, Exists and DoesNotExist. - type: string - values: - description: values is an array of string - values. If the operator is In or NotIn, - the values array must be non-empty. If the - operator is Exists or DoesNotExist, the - values array must be empty. This array is - replaced during a strategic merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - fieldSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select objects. A selector based - on fields. - type: object - labelSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select objects. A selector based - on labels. - type: object - namespaces: - description: Namespaces is a set of namespace to - which objects belong. - items: - type: string - type: array - nodeSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select nodes. Selector which must - match a node's labels, and objects must belong - to these selected nodes. - type: object - nodes: - description: Nodes is a set of node name and objects - must belong to these nodes. - items: - type: string - type: array - podPhaseSelectors: - description: 'PodPhaseSelectors is a set of condition - of a pod at the current time. supported value: - Pending / Running / Succeeded / Failed / Unknown' - items: - type: string - type: array - pods: - additionalProperties: - items: - type: string - type: array - description: Pods is a map of string keys and a - set values that used to select pods. The key defines - the namespace which pods belong, and the each - values is a set of pod names. - type: object - type: object - value: - description: Value is required when the mode is set - to `FixedMode` / `FixedPercentMode` / `RandomMaxPercentMode`. - If `FixedMode`, provide an integer of pods to do chaos - action. If `FixedPercentMode`, provide a number from - 0-100 to specify the percent of pods the server can - do chaos action. IF `RandomMaxPercentMode`, provide - a number from 0-100 to specify the max percent of - pods to do chaos action - type: string - required: - - failKernRequest - - mode - - selector - type: object - name: - type: string - networkChaos: - description: NetworkChaosSpec defines the desired state - of NetworkChaos - properties: - action: - description: 'Action defines the specific network chaos - action. Supported action: partition, netem, delay, - loss, duplicate, corrupt Default action: delay' - enum: - - netem - - delay - - loss - - duplicate - - corrupt - - partition - - bandwidth - type: string - bandwidth: - description: Bandwidth represents the detail about bandwidth - control action - properties: - buffer: - description: Buffer is the maximum amount of bytes - that tokens can be available for instantaneously. - format: int32 - minimum: 1 - type: integer - limit: - description: Limit is the number of bytes that can - be queued waiting for tokens to become available. - format: int32 - minimum: 1 - type: integer - minburst: - description: Minburst specifies the size of the - peakrate bucket. For perfect accuracy, should - be set to the MTU of the interface. If a peakrate - is needed, but some burstiness is acceptable, - this size can be raised. A 3000 byte minburst - allows around 3mbit/s of peakrate, given 1000 - byte packets. - format: int32 - minimum: 0 - type: integer - peakrate: - description: Peakrate is the maximum depletion rate - of the bucket. The peakrate does not need to be - set, it is only necessary if perfect millisecond - timescale shaping is required. - format: int64 - minimum: 0 - type: integer - rate: - description: Rate is the speed knob. Allows bit, - kbit, mbit, gbit, tbit, bps, kbps, mbps, gbps, - tbps unit. bps means bytes per second. - type: string - required: - - buffer - - limit - - rate - type: object - corrupt: - description: Corrupt represents the detail about corrupt - action - properties: - correlation: - type: string - corrupt: - type: string - required: - - corrupt - type: object - delay: - description: Delay represents the detail about delay - action - properties: - correlation: - type: string - jitter: - type: string - latency: - type: string - reorder: - description: ReorderSpec defines details of packet - reorder. - properties: - correlation: - type: string - gap: - type: integer - reorder: - type: string - required: - - gap - - reorder - type: object - required: - - latency - type: object - device: - description: Device represents the network device to - be affected. - type: string - direction: - default: to - description: Direction represents the direction, this - applies on netem and network partition action - enum: - - to - - from - - both - type: string - duplicate: - description: DuplicateSpec represents the detail about - loss action - properties: - correlation: - type: string - duplicate: - type: string - required: - - duplicate - type: object - duration: - description: Duration represents the duration of the - chaos action - type: string - externalTargets: - description: ExternalTargets represents network targets - outside k8s - items: - type: string - type: array - loss: - description: Loss represents the detail about loss action - properties: - correlation: - type: string - loss: - type: string - required: - - loss - type: object - mode: - description: 'Mode defines the mode to run chaos action. - Supported mode: one / all / fixed / fixed-percent - / random-max-percent' - enum: - - one - - all - - fixed - - fixed-percent - - random-max-percent - type: string - rate: - description: Rate represents the detail about rate control - action - properties: - rate: - description: Rate is the speed knob. Allows bit, - kbit, mbit, gbit, tbit, bps, kbps, mbps, gbps, - tbps unit. bps means bytes per second. - type: string - required: - - rate - type: object - remoteCluster: - description: RemoteCluster represents the remote cluster - where the chaos will be deployed - type: string - selector: - description: Selector is used to select pods that are - used to inject chaos action. - properties: - annotationSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select objects. A selector based - on annotations. - type: object - expressionSelectors: - description: a slice of label selector expressions - that can be used to select objects. A list of - selectors based on set-based label expressions. - items: - description: A label selector requirement is a - selector that contains values, a key, and an - operator that relates the key and values. - properties: - key: - description: key is the label key that the - selector applies to. - type: string - operator: - description: operator represents a key's relationship - to a set of values. Valid operators are - In, NotIn, Exists and DoesNotExist. - type: string - values: - description: values is an array of string - values. If the operator is In or NotIn, - the values array must be non-empty. If the - operator is Exists or DoesNotExist, the - values array must be empty. This array is - replaced during a strategic merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - fieldSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select objects. A selector based - on fields. - type: object - labelSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select objects. A selector based - on labels. - type: object - namespaces: - description: Namespaces is a set of namespace to - which objects belong. - items: - type: string - type: array - nodeSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select nodes. Selector which must - match a node's labels, and objects must belong - to these selected nodes. - type: object - nodes: - description: Nodes is a set of node name and objects - must belong to these nodes. - items: - type: string - type: array - podPhaseSelectors: - description: 'PodPhaseSelectors is a set of condition - of a pod at the current time. supported value: - Pending / Running / Succeeded / Failed / Unknown' - items: - type: string - type: array - pods: - additionalProperties: - items: - type: string - type: array - description: Pods is a map of string keys and a - set values that used to select pods. The key defines - the namespace which pods belong, and the each - values is a set of pod names. - type: object - type: object - target: - description: Target represents network target, this - applies on netem and network partition action - properties: - mode: - description: 'Mode defines the mode to run chaos - action. Supported mode: one / all / fixed / fixed-percent - / random-max-percent' - enum: - - one - - all - - fixed - - fixed-percent - - random-max-percent - type: string - selector: - description: Selector is used to select pods that - are used to inject chaos action. - properties: - annotationSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select objects. A selector - based on annotations. - type: object - expressionSelectors: - description: a slice of label selector expressions - that can be used to select objects. A list - of selectors based on set-based label expressions. - items: - description: A label selector requirement - is a selector that contains values, a key, - and an operator that relates the key and - values. - properties: - key: - description: key is the label key that - the selector applies to. - type: string - operator: - description: operator represents a key's - relationship to a set of values. Valid - operators are In, NotIn, Exists and - DoesNotExist. - type: string - values: - description: values is an array of string - values. If the operator is In or NotIn, - the values array must be non-empty. - If the operator is Exists or DoesNotExist, - the values array must be empty. This - array is replaced during a strategic - merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - fieldSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select objects. A selector - based on fields. - type: object - labelSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select objects. A selector - based on labels. - type: object - namespaces: - description: Namespaces is a set of namespace - to which objects belong. - items: - type: string - type: array - nodeSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select nodes. Selector which - must match a node's labels, and objects must - belong to these selected nodes. - type: object - nodes: - description: Nodes is a set of node name and - objects must belong to these nodes. - items: - type: string - type: array - podPhaseSelectors: - description: 'PodPhaseSelectors is a set of - condition of a pod at the current time. supported - value: Pending / Running / Succeeded / Failed - / Unknown' - items: - type: string - type: array - pods: - additionalProperties: - items: - type: string - type: array - description: Pods is a map of string keys and - a set values that used to select pods. The - key defines the namespace which pods belong, - and the each values is a set of pod names. - type: object - type: object - value: - description: Value is required when the mode is - set to `FixedMode` / `FixedPercentMode` / `RandomMaxPercentMode`. - If `FixedMode`, provide an integer of pods to - do chaos action. If `FixedPercentMode`, provide - a number from 0-100 to specify the percent of - pods the server can do chaos action. IF `RandomMaxPercentMode`, provide - a number from 0-100 to specify the max percent - of pods to do chaos action - type: string - required: - - mode - - selector - type: object - targetDevice: - description: TargetDevice represents the network device - to be affected in target scope. - type: string - value: - description: Value is required when the mode is set - to `FixedMode` / `FixedPercentMode` / `RandomMaxPercentMode`. - If `FixedMode`, provide an integer of pods to do chaos - action. If `FixedPercentMode`, provide a number from - 0-100 to specify the percent of pods the server can - do chaos action. IF `RandomMaxPercentMode`, provide - a number from 0-100 to specify the max percent of - pods to do chaos action - type: string - required: - - action - - mode - - selector - type: object - physicalmachineChaos: - description: PhysicalMachineChaosSpec defines the desired - state of PhysicalMachineChaos - properties: - action: - description: the subAction, generate automatically - enum: - - stress-cpu - - stress-mem - - disk-read-payload - - disk-write-payload - - disk-fill - - network-corrupt - - network-duplicate - - network-loss - - network-delay - - network-partition - - network-dns - - network-bandwidth - - network-flood - - network-down - - process - - jvm-exception - - jvm-gc - - jvm-latency - - jvm-return - - jvm-stress - - jvm-rule-data - - jvm-mysql - - clock - - redis-expiration - - redis-penetration - - redis-cacheLimit - - redis-restart - - redis-stop - - kafka-fill - - kafka-flood - - kafka-io - - file-create - - file-modify - - file-delete - - file-rename - - file-append - - file-replace - - vm - - user_defined - type: string - address: - description: 'DEPRECATED: Use Selector instead. Only - one of Address and Selector could be specified.' - items: - type: string - type: array - clock: - properties: - clock-ids-slice: - description: the identifier of the particular clock - on which to act. More clock description in linux - kernel can be found in man page of clock_getres, - clock_gettime, clock_settime. Muti clock ids should - be split with "," - type: string - pid: - description: the pid of target program. - type: integer - time-offset: - description: specifies the length of time offset. - type: string - type: object - disk-fill: - properties: - fill-by-fallocate: - description: fill disk by fallocate - type: boolean - path: - description: specifies the location to fill data - in. if path not provided, payload will read/write - from/into a temp file, temp file will be deleted - after writing - type: string - size: - description: 'specifies how many units of data will - write into the file path. support unit: c=1, w=2, - b=512, kB=1000, K=1024, MB=1000*1000, M=1024*1024, - GB=1000*1000*1000, G=1024*1024*1024 BYTES. example - : 1M | 512kB' - type: string - type: object - disk-read-payload: - properties: - path: - description: specifies the location to fill data - in. if path not provided, payload will read/write - from/into a temp file, temp file will be deleted - after writing - type: string - payload-process-num: - description: specifies the number of process work - on writing, default 1, only 1-255 is valid value - type: integer - size: - description: 'specifies how many units of data will - write into the file path. support unit: c=1, w=2, - b=512, kB=1000, K=1024, MB=1000*1000, M=1024*1024, - GB=1000*1000*1000, G=1024*1024*1024 BYTES. example - : 1M | 512kB' - type: string - type: object - disk-write-payload: - properties: - path: - description: specifies the location to fill data - in. if path not provided, payload will read/write - from/into a temp file, temp file will be deleted - after writing - type: string - payload-process-num: - description: specifies the number of process work - on writing, default 1, only 1-255 is valid value - type: integer - size: - description: 'specifies how many units of data will - write into the file path. support unit: c=1, w=2, - b=512, kB=1000, K=1024, MB=1000*1000, M=1024*1024, - GB=1000*1000*1000, G=1024*1024*1024 BYTES. example - : 1M | 512kB' - type: string - type: object - duration: - description: Duration represents the duration of the - chaos action - type: string - file-append: - properties: - count: - description: Count is the number of times to append - the data. - type: integer - data: - description: Data is the data for append. - type: string - file-name: - description: FileName is the name of the file to - be created, modified, deleted, renamed, or appended. - type: string - type: object - file-create: - properties: - dir-name: - description: DirName is the directory name to create - or delete. - type: string - file-name: - description: FileName is the name of the file to - be created, modified, deleted, renamed, or appended. - type: string - type: object - file-delete: - properties: - dir-name: - description: DirName is the directory name to create - or delete. - type: string - file-name: - description: FileName is the name of the file to - be created, modified, deleted, renamed, or appended. - type: string - type: object - file-modify: - properties: - file-name: - description: FileName is the name of the file to - be created, modified, deleted, renamed, or appended. - type: string - privilege: - description: Privilege is the file privilege to - be set. - format: int32 - type: integer - type: object - file-rename: - properties: - dest-file: - description: DestFile is the name to be renamed. - type: string - source-file: - description: SourceFile is the name need to be renamed. - type: string - type: object - file-replace: - properties: - dest-string: - description: DestStr is the destination string of - the file. - type: string - file-name: - description: FileName is the name of the file to - be created, modified, deleted, renamed, or appended. - type: string - line: - description: Line is the line number of the file - to be replaced. - type: integer - origin-string: - description: OriginStr is the origin string of the - file. - type: string - type: object - http-abort: - properties: - code: - description: Code is a rule to select target by - http status code in response - type: string - method: - description: HTTP method - type: string - path: - description: Match path of Uri with wildcard matches - type: string - port: - description: The TCP port that the target service - listens on - format: int32 - type: integer - proxy_ports: - description: Composed with one of the port of HTTP - connection, we will only attack HTTP connection - with port inside proxy_ports - items: - type: integer - type: array - target: - description: 'HTTP target: Request or Response' - type: string - required: - - proxy_ports - - target - type: object - http-config: - properties: - file_path: - description: The config file path - type: string - type: object - http-delay: - properties: - code: - description: Code is a rule to select target by - http status code in response - type: string - delay: - description: Delay represents the delay of the target - request/response - type: string - method: - description: HTTP method - type: string - path: - description: Match path of Uri with wildcard matches - type: string - port: - description: The TCP port that the target service - listens on - format: int32 - type: integer - proxy_ports: - description: Composed with one of the port of HTTP - connection, we will only attack HTTP connection - with port inside proxy_ports - items: - type: integer - type: array - target: - description: 'HTTP target: Request or Response' - type: string - required: - - delay - - proxy_ports - - target - type: object - http-request: - description: used for HTTP request, now only support - GET - properties: - count: - description: The number of requests to send - type: integer - enable-conn-pool: - description: Enable connection pool - type: boolean - url: - description: Request to send" - type: string - type: object - jvm-exception: - properties: - class: - description: Java class - type: string - exception: - description: the exception which needs to throw - for action `exception` - type: string - method: - description: the method in Java class - type: string - pid: - description: the pid of Java process which needs - to attach - type: integer - port: - description: the port of agent server, default 9277 - format: int32 - type: integer - type: object - jvm-gc: - properties: - pid: - description: the pid of Java process which needs - to attach - type: integer - port: - description: the port of agent server, default 9277 - format: int32 - type: integer - type: object - jvm-latency: - properties: - class: - description: Java class - type: string - latency: - description: the latency duration for action 'latency', - unit ms - type: integer - method: - description: the method in Java class - type: string - pid: - description: the pid of Java process which needs - to attach - type: integer - port: - description: the port of agent server, default 9277 - format: int32 - type: integer - type: object - jvm-mysql: - properties: - database: - description: the match database default value is - "", means match all database - type: string - exception: - description: The exception which needs to throw - for action `exception` or the exception message - needs to throw in action `mysql` - type: string - latency: - description: The latency duration for action 'latency' - or the latency duration in action `mysql` - type: integer - mysqlConnectorVersion: - description: the version of mysql-connector-java, - only support 5.X.X(set to "5") and 8.X.X(set to - "8") now - type: string - pid: - description: the pid of Java process which needs - to attach - type: integer - port: - description: the port of agent server, default 9277 - format: int32 - type: integer - sqlType: - description: the match sql type default value is - "", means match all SQL type. The value can be - 'select', 'insert', 'update', 'delete', 'replace'. - type: string - table: - description: the match table default value is "", - means match all table - type: string - type: object - jvm-return: - properties: - class: - description: Java class - type: string - method: - description: the method in Java class - type: string - pid: - description: the pid of Java process which needs - to attach - type: integer - port: - description: the port of agent server, default 9277 - format: int32 - type: integer - value: - description: the return value for action 'return' - type: string - type: object - jvm-rule-data: - properties: - pid: - description: the pid of Java process which needs - to attach - type: integer - port: - description: the port of agent server, default 9277 - format: int32 - type: integer - rule-data: - description: RuleData used to save the rule file's - data, will use it when recover - type: string - type: object - jvm-stress: - properties: - cpu-count: - description: the CPU core number need to use, only - set it when action is stress - type: integer - mem-type: - description: the memory type need to locate, only - set it when action is stress, the value can be - 'stack' or 'heap' - type: string - pid: - description: the pid of Java process which needs - to attach - type: integer - port: - description: the port of agent server, default 9277 - format: int32 - type: integer - type: object - kafka-fill: - properties: - host: - description: The host of kafka server - type: string - maxBytes: - description: The max bytes to fill - format: int64 - type: integer - messageSize: - description: The size of each message - type: integer - password: - description: The password of kafka client - type: string - port: - description: The port of kafka server - type: integer - reloadCommand: - description: The command to reload kafka config - type: string - topic: - description: The topic to attack - type: string - username: - description: The username of kafka client - type: string - type: object - kafka-flood: - properties: - host: - description: The host of kafka server - type: string - messageSize: - description: The size of each message - type: integer - password: - description: The password of kafka client - type: string - port: - description: The port of kafka server - type: integer - threads: - description: The number of worker threads - type: integer - topic: - description: The topic to attack - type: string - username: - description: The username of kafka client - type: string - type: object - kafka-io: - properties: - configFile: - description: The path of server config - type: string - nonReadable: - description: Make kafka cluster non-readable - type: boolean - nonWritable: - description: Make kafka cluster non-writable - type: boolean - topic: - description: The topic to attack - type: string - type: object - mode: - description: 'Mode defines the mode to run chaos action. - Supported mode: one / all / fixed / fixed-percent - / random-max-percent' - enum: - - one - - all - - fixed - - fixed-percent - - random-max-percent - type: string - network-bandwidth: - properties: - buffer: - format: int32 - minimum: 1 - type: integer - device: - type: string - hostname: - type: string - ip-address: - type: string - limit: - format: int32 - minimum: 1 - type: integer - minburst: - format: int32 - type: integer - peakrate: - format: int64 - type: integer - rate: - type: string - required: - - buffer - - limit - - rate - type: object - network-corrupt: - properties: - correlation: - description: correlation is percentage (10 is 10%) - type: string - device: - description: the network interface to impact - type: string - egress-port: - description: only impact egress traffic to these - destination ports, use a ',' to separate or to - indicate the range, such as 80, 8001:8010. it - can only be used in conjunction with -p tcp or - -p udp - type: string - hostname: - description: only impact traffic to these hostnames - type: string - ip-address: - description: only impact egress traffic to these - IP addresses - type: string - ip-protocol: - description: 'only impact traffic using this IP - protocol, supported: tcp, udp, icmp, all' - type: string - percent: - description: percentage of packets to corrupt (10 - is 10%) - type: string - source-port: - description: only impact egress traffic from these - source ports, use a ',' to separate or to indicate - the range, such as 80, 8001:8010. it can only - be used in conjunction with -p tcp or -p udp - type: string - type: object - network-delay: - properties: - accept-tcp-flags: - description: only the packet which match the tcp - flag can be accepted, others will be dropped. - only set when the IPProtocol is tcp, used for - partition. - type: string - correlation: - description: correlation is percentage (10 is 10%) - type: string - device: - description: the network interface to impact - type: string - egress-port: - description: only impact egress traffic to these - destination ports, use a ',' to separate or to - indicate the range, such as 80, 8001:8010. it - can only be used in conjunction with -p tcp or - -p udp - type: string - hostname: - description: only impact traffic to these hostnames - type: string - ip-address: - description: only impact egress traffic to these - IP addresses - type: string - ip-protocol: - description: 'only impact traffic using this IP - protocol, supported: tcp, udp, icmp, all' - type: string - jitter: - description: 'jitter time, time units: ns, us (or - µs), ms, s, m, h.' - type: string - latency: - description: 'delay egress time, time units: ns, - us (or µs), ms, s, m, h.' - type: string - source-port: - description: only impact egress traffic from these - source ports, use a ',' to separate or to indicate - the range, such as 80, 8001:8010. it can only - be used in conjunction with -p tcp or -p udp - type: string - type: object - network-dns: - properties: - dns-domain-name: - description: map this host to specified IP - type: string - dns-ip: - description: map specified host to this IP address - type: string - dns-server: - description: update the DNS server in /etc/resolv.conf - with this value - type: string - type: object - network-down: - properties: - device: - description: The network interface to impact - type: string - duration: - description: 'NIC down time, time units: ns, us - (or µs), ms, s, m, h.' - type: string - type: object - network-duplicate: - properties: - correlation: - description: correlation is percentage (10 is 10%) - type: string - device: - description: the network interface to impact - type: string - egress-port: - description: only impact egress traffic to these - destination ports, use a ',' to separate or to - indicate the range, such as 80, 8001:8010. it - can only be used in conjunction with -p tcp or - -p udp - type: string - hostname: - description: only impact traffic to these hostnames - type: string - ip-address: - description: only impact egress traffic to these - IP addresses - type: string - ip-protocol: - description: 'only impact traffic using this IP - protocol, supported: tcp, udp, icmp, all' - type: string - percent: - description: percentage of packets to duplicate - (10 is 10%) - type: string - source-port: - description: only impact egress traffic from these - source ports, use a ',' to separate or to indicate - the range, such as 80, 8001:8010. it can only - be used in conjunction with -p tcp or -p udp - type: string - type: object - network-flood: - properties: - duration: - description: The number of seconds to run the iperf - test - type: string - ip-address: - description: Generate traffic to this IP address - type: string - parallel: - description: The number of iperf parallel client - threads to run - format: int32 - type: integer - port: - description: Generate traffic to this port on the - IP address - type: string - rate: - description: The speed of network traffic, allows - bps, kbps, mbps, gbps, tbps unit. bps means bytes - per second - type: string - required: - - duration - - rate - type: object - network-loss: - properties: - correlation: - description: correlation is percentage (10 is 10%) - type: string - device: - description: the network interface to impact - type: string - egress-port: - description: only impact egress traffic to these - destination ports, use a ',' to separate or to - indicate the range, such as 80, 8001:8010. it - can only be used in conjunction with -p tcp or - -p udp - type: string - hostname: - description: only impact traffic to these hostnames - type: string - ip-address: - description: only impact egress traffic to these - IP addresses - type: string - ip-protocol: - description: 'only impact traffic using this IP - protocol, supported: tcp, udp, icmp, all' - type: string - percent: - description: percentage of packets to loss (10 is - 10%) - type: string - source-port: - description: only impact egress traffic from these - source ports, use a ',' to separate or to indicate - the range, such as 80, 8001:8010. it can only - be used in conjunction with -p tcp or -p udp - type: string - type: object - network-partition: - properties: - accept-tcp-flags: - description: only the packet which match the tcp - flag can be accepted, others will be dropped. - only set when the IPProtocol is tcp, used for - partition. - type: string - device: - description: the network interface to impact - type: string - direction: - description: specifies the partition direction, - values can be 'from', 'to'. 'from' means packets - coming from the 'IPAddress' or 'Hostname' and - going to your server, 'to' means packets originating - from your server and going to the 'IPAddress' - or 'Hostname'. - type: string - hostname: - description: only impact traffic to these hostnames - type: string - ip-address: - description: only impact egress traffic to these - IP addresses - type: string - ip-protocol: - description: only impact egress traffic to these - IP addresses - type: string - type: object - process: - properties: - process: - description: the process name or the process ID - type: string - recoverCmd: - description: the command to be run when recovering - experiment - type: string - signal: - description: the signal number to send - type: integer - type: object - redis-cacheLimit: - properties: - addr: - description: The adress of Redis server - type: string - cacheSize: - description: The size of `maxmemory` - type: string - password: - description: The password of Redis server - type: string - percent: - description: Specifies maxmemory as a percentage - of the original value - type: string - type: object - redis-expiration: - properties: - addr: - description: The adress of Redis server - type: string - expiration: - description: The expiration of the keys - type: string - key: - description: The keys to be expired - type: string - option: - description: Additional options for `expiration` - type: string - password: - description: The password of Redis server - type: string - type: object - redis-penetration: - properties: - addr: - description: The adress of Redis server - type: string - password: - description: The password of Redis server - type: string - requestNum: - description: The number of requests to be sent - type: integer - type: object - redis-restart: - properties: - addr: - description: The adress of Redis server - type: string - conf: - description: The path of Sentinel conf - type: string - flushConfig: - description: The control flag determines whether - to flush config - type: boolean - password: - description: The password of Redis server - type: string - redisPath: - description: The path of `redis-server` command-line - tool - type: boolean - type: object - redis-stop: - properties: - addr: - description: The adress of Redis server - type: string - conf: - description: The path of Sentinel conf - type: string - flushConfig: - description: The control flag determines whether - to flush config - type: boolean - password: - description: The password of Redis server - type: string - redisPath: - description: The path of `redis-server` command-line - tool - type: boolean - type: object - remoteCluster: - description: RemoteCluster represents the remote cluster - where the chaos will be deployed - type: string - selector: - description: Selector is used to select physical machines - that are used to inject chaos action. - properties: - annotationSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select objects. A selector based - on annotations. - type: object - expressionSelectors: - description: a slice of label selector expressions - that can be used to select objects. A list of - selectors based on set-based label expressions. - items: - description: A label selector requirement is a - selector that contains values, a key, and an - operator that relates the key and values. - properties: - key: - description: key is the label key that the - selector applies to. - type: string - operator: - description: operator represents a key's relationship - to a set of values. Valid operators are - In, NotIn, Exists and DoesNotExist. - type: string - values: - description: values is an array of string - values. If the operator is In or NotIn, - the values array must be non-empty. If the - operator is Exists or DoesNotExist, the - values array must be empty. This array is - replaced during a strategic merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - fieldSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select objects. A selector based - on fields. - type: object - labelSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select objects. A selector based - on labels. - type: object - namespaces: - description: Namespaces is a set of namespace to - which objects belong. - items: - type: string - type: array - physicalMachines: - additionalProperties: - items: - type: string - type: array - description: PhysicalMachines is a map of string - keys and a set values that used to select physical - machines. The key defines the namespace which - physical machine belong, and each value is a set - of physical machine names. - type: object - type: object - stress-cpu: - properties: - load: - description: specifies P percent loading per CPU - worker. 0 is effectively a sleep (no load) and - 100 is full loading. - type: integer - options: - description: extend stress-ng options - items: - type: string - type: array - workers: - description: specifies N workers to apply the stressor. - type: integer - type: object - stress-mem: - properties: - options: - description: extend stress-ng options - items: - type: string - type: array - size: - description: 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 - type: object - uid: - description: the experiment ID - type: string - user_defined: - properties: - attackCmd: - description: The command to be executed when attack - type: string - recoverCmd: - description: The command to be executed when recover - type: string - type: object - value: - description: Value is required when the mode is set - to `FixedMode` / `FixedPercentMode` / `RandomMaxPercentMode`. - If `FixedMode`, provide an integer of physical machines - to do chaos action. If `FixedPercentMode`, provide - a number from 0-100 to specify the percent of physical - machines the server can do chaos action. IF `RandomMaxPercentMode`, provide - a number from 0-100 to specify the max percent of - pods to do chaos action - type: string - vm: - properties: - vm-name: - description: The name of the VM to be injected - type: string - type: object - required: - - action - - mode - type: object - podChaos: - description: PodChaosSpec defines the attributes that a - user creates on a chaos experiment about pods. - properties: - action: - description: 'Action defines the specific pod chaos - action. Supported action: pod-kill / pod-failure / - container-kill Default action: pod-kill' - enum: - - pod-kill - - pod-failure - - container-kill - type: string - containerNames: - description: ContainerNames indicates list of the name - of affected container. If not set, the first container - will be injected - items: - type: string - type: array - duration: - description: Duration represents the duration of the - chaos action. It is required when the action is `PodFailureAction`. - A duration string is a possibly signed sequence of - decimal numbers, each with optional fraction and a - unit suffix, such as "300ms", "-1.5h" or "2h45m". - Valid time units are "ns", "us" (or "µs"), "ms", "s", - "m", "h". - type: string - gracePeriod: - description: GracePeriod is used in pod-kill action. - It represents the duration in seconds before the pod - should be deleted. Value must be non-negative integer. - The default value is zero that indicates delete immediately. - format: int64 - minimum: 0 - type: integer - mode: - description: 'Mode defines the mode to run chaos action. - Supported mode: one / all / fixed / fixed-percent - / random-max-percent' - enum: - - one - - all - - fixed - - fixed-percent - - random-max-percent - type: string - remoteCluster: - description: RemoteCluster represents the remote cluster - where the chaos will be deployed - type: string - selector: - description: Selector is used to select pods that are - used to inject chaos action. - properties: - annotationSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select objects. A selector based - on annotations. - type: object - expressionSelectors: - description: a slice of label selector expressions - that can be used to select objects. A list of - selectors based on set-based label expressions. - items: - description: A label selector requirement is a - selector that contains values, a key, and an - operator that relates the key and values. - properties: - key: - description: key is the label key that the - selector applies to. - type: string - operator: - description: operator represents a key's relationship - to a set of values. Valid operators are - In, NotIn, Exists and DoesNotExist. - type: string - values: - description: values is an array of string - values. If the operator is In or NotIn, - the values array must be non-empty. If the - operator is Exists or DoesNotExist, the - values array must be empty. This array is - replaced during a strategic merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - fieldSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select objects. A selector based - on fields. - type: object - labelSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select objects. A selector based - on labels. - type: object - namespaces: - description: Namespaces is a set of namespace to - which objects belong. - items: - type: string - type: array - nodeSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select nodes. Selector which must - match a node's labels, and objects must belong - to these selected nodes. - type: object - nodes: - description: Nodes is a set of node name and objects - must belong to these nodes. - items: - type: string - type: array - podPhaseSelectors: - description: 'PodPhaseSelectors is a set of condition - of a pod at the current time. supported value: - Pending / Running / Succeeded / Failed / Unknown' - items: - type: string - type: array - pods: - additionalProperties: - items: - type: string - type: array - description: Pods is a map of string keys and a - set values that used to select pods. The key defines - the namespace which pods belong, and the each - values is a set of pod names. - type: object - type: object - value: - description: Value is required when the mode is set - to `FixedMode` / `FixedPercentMode` / `RandomMaxPercentMode`. - If `FixedMode`, provide an integer of pods to do chaos - action. If `FixedPercentMode`, provide a number from - 0-100 to specify the percent of pods the server can - do chaos action. IF `RandomMaxPercentMode`, provide - a number from 0-100 to specify the max percent of - pods to do chaos action - type: string - required: - - action - - mode - - selector - type: object - schedule: - description: Schedule describe the Schedule(describing scheduled - chaos) to be injected with chaos nodes. Only used when - Type is TypeSchedule. - properties: - awsChaos: - description: AWSChaosSpec is the content of the specification - for an AWSChaos - properties: - action: - description: 'Action defines the specific aws chaos - action. Supported action: ec2-stop / ec2-restart - / detach-volume Default action: ec2-stop' - 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. Needed in detach-volume. - type: string - duration: - description: Duration represents the duration of - the chaos action. - type: string - ec2Instance: - description: Ec2Instance indicates the ID of the - ec2 instance. - type: string - endpoint: - description: Endpoint indicates the endpoint of - the aws server. Just used it in test now. - type: string - remoteCluster: - description: RemoteCluster represents the remote - cluster where the chaos will be deployed - type: string - secretName: - description: SecretName defines the name of kubernetes - secret. - type: string - volumeID: - description: EbsVolume indicates the ID of the EBS - volume. Needed in detach-volume. - type: string - required: - - action - - awsRegion - - ec2Instance - type: object - azureChaos: - description: AzureChaosSpec is the content of the specification - for an AzureChaos - properties: - action: - description: 'Action defines the specific azure - chaos action. Supported action: vm-stop / vm-restart - / disk-detach Default action: vm-stop' - enum: - - vm-stop - - vm-restart - - disk-detach - type: string - diskName: - description: DiskName indicates the name of the - disk. Needed in disk-detach. - type: string - duration: - description: Duration represents the duration of - the chaos action. - type: string - lun: - description: LUN indicates the Logical Unit Number - of the data disk. Needed in disk-detach. - type: integer - remoteCluster: - description: RemoteCluster represents the remote - cluster where the chaos will be deployed - type: string - resourceGroupName: - description: ResourceGroupName defines the name - of ResourceGroup - type: string - secretName: - description: SecretName defines the name of kubernetes - secret. It is used for Azure credentials. - type: string - subscriptionID: - description: SubscriptionID defines the id of Azure - subscription. - type: string - vmName: - description: VMName defines the name of Virtual - Machine - type: string - required: - - action - - resourceGroupName - - subscriptionID - - vmName - type: object - blockChaos: - description: BlockChaosSpec is the content of the specification - for a BlockChaos - properties: - action: - description: 'Action defines the specific block - chaos action. Supported action: delay' - enum: - - delay - type: string - containerNames: - description: ContainerNames indicates list of the - name of affected container. If not set, the first - container will be injected - items: - type: string - type: array - delay: - description: Delay defines the delay distribution. - properties: - correlation: - type: string - jitter: - type: string - latency: - description: Latency defines the latency of - every io request. - type: string - type: object - duration: - description: Duration represents the duration of - the chaos action. - type: string - mode: - description: 'Mode defines the mode to run chaos - action. Supported mode: one / all / fixed / fixed-percent - / random-max-percent' - enum: - - one - - all - - fixed - - fixed-percent - - random-max-percent - type: string - remoteCluster: - description: RemoteCluster represents the remote - cluster where the chaos will be deployed - type: string - selector: - description: Selector is used to select pods that - are used to inject chaos action. - properties: - annotationSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select objects. A selector - based on annotations. - type: object - expressionSelectors: - description: a slice of label selector expressions - that can be used to select objects. A list - of selectors based on set-based label expressions. - items: - description: A label selector requirement - is a selector that contains values, a key, - and an operator that relates the key and - values. - properties: - key: - description: key is the label key that - the selector applies to. - type: string - operator: - description: operator represents a key's - relationship to a set of values. Valid - operators are In, NotIn, Exists and - DoesNotExist. - type: string - values: - description: values is an array of string - values. If the operator is In or NotIn, - the values array must be non-empty. - If the operator is Exists or DoesNotExist, - the values array must be empty. This - array is replaced during a strategic - merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - fieldSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select objects. A selector - based on fields. - type: object - labelSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select objects. A selector - based on labels. - type: object - namespaces: - description: Namespaces is a set of namespace - to which objects belong. - items: - type: string - type: array - nodeSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select nodes. Selector which - must match a node's labels, and objects must - belong to these selected nodes. - type: object - nodes: - description: Nodes is a set of node name and - objects must belong to these nodes. - items: - type: string - type: array - podPhaseSelectors: - description: 'PodPhaseSelectors is a set of - condition of a pod at the current time. supported - value: Pending / Running / Succeeded / Failed - / Unknown' - items: - type: string - type: array - pods: - additionalProperties: - items: - type: string - type: array - description: Pods is a map of string keys and - a set values that used to select pods. The - key defines the namespace which pods belong, - and the each values is a set of pod names. - type: object - type: object - value: - description: Value is required when the mode is - set to `FixedMode` / `FixedPercentMode` / `RandomMaxPercentMode`. - If `FixedMode`, provide an integer of pods to - do chaos action. If `FixedPercentMode`, provide - a number from 0-100 to specify the percent of - pods the server can do chaos action. IF `RandomMaxPercentMode`, provide - a number from 0-100 to specify the max percent - of pods to do chaos action - type: string - volumeName: - type: string - required: - - action - - mode - - selector - - volumeName - type: object - concurrencyPolicy: - enum: - - Forbid - - Allow - type: string - dnsChaos: - description: DNSChaosSpec defines the desired state - of DNSChaos - properties: - action: - description: 'Action defines the specific DNS chaos - action. Supported action: error, random Default - action: error' - enum: - - error - - random - type: string - containerNames: - description: ContainerNames indicates list of the - name of affected container. If not set, the first - container will be injected - items: - type: string - type: array - duration: - description: Duration represents the duration of - the chaos action - type: string - mode: - description: 'Mode defines the mode to run chaos - action. Supported mode: one / all / fixed / fixed-percent - / random-max-percent' - enum: - - one - - all - - fixed - - fixed-percent - - random-max-percent - type: string - patterns: - description: 'Choose which domain names to take - effect, support the placeholder ? and wildcard - *, or the Specified domain name. Note: 1. The - wildcard * must be at the end of the string. For - example, chaos-*.org is invalid. 2. if the patterns - is empty, will take effect on all the domain names. - For example: The value is ["google.com", "github.*", - "chaos-mes?.org"], will take effect on "google.com", - "github.com" and "chaos-mesh.org"' - items: - type: string - type: array - remoteCluster: - description: RemoteCluster represents the remote - cluster where the chaos will be deployed - type: string - selector: - description: Selector is used to select pods that - are used to inject chaos action. - properties: - annotationSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select objects. A selector - based on annotations. - type: object - expressionSelectors: - description: a slice of label selector expressions - that can be used to select objects. A list - of selectors based on set-based label expressions. - items: - description: A label selector requirement - is a selector that contains values, a key, - and an operator that relates the key and - values. - properties: - key: - description: key is the label key that - the selector applies to. - type: string - operator: - description: operator represents a key's - relationship to a set of values. Valid - operators are In, NotIn, Exists and - DoesNotExist. - type: string - values: - description: values is an array of string - values. If the operator is In or NotIn, - the values array must be non-empty. - If the operator is Exists or DoesNotExist, - the values array must be empty. This - array is replaced during a strategic - merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - fieldSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select objects. A selector - based on fields. - type: object - labelSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select objects. A selector - based on labels. - type: object - namespaces: - description: Namespaces is a set of namespace - to which objects belong. - items: - type: string - type: array - nodeSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select nodes. Selector which - must match a node's labels, and objects must - belong to these selected nodes. - type: object - nodes: - description: Nodes is a set of node name and - objects must belong to these nodes. - items: - type: string - type: array - podPhaseSelectors: - description: 'PodPhaseSelectors is a set of - condition of a pod at the current time. supported - value: Pending / Running / Succeeded / Failed - / Unknown' - items: - type: string - type: array - pods: - additionalProperties: - items: - type: string - type: array - description: Pods is a map of string keys and - a set values that used to select pods. The - key defines the namespace which pods belong, - and the each values is a set of pod names. - type: object - type: object - value: - description: Value is required when the mode is - set to `FixedMode` / `FixedPercentMode` / `RandomMaxPercentMode`. - If `FixedMode`, provide an integer of pods to - do chaos action. If `FixedPercentMode`, provide - a number from 0-100 to specify the percent of - pods the server can do chaos action. IF `RandomMaxPercentMode`, provide - a number from 0-100 to specify the max percent - of pods to do chaos action - type: string - required: - - action - - mode - - selector - type: object - gcpChaos: - description: GCPChaosSpec is the content of the specification - for a GCPChaos - properties: - action: - description: 'Action defines the specific gcp chaos - action. Supported action: node-stop / node-reset - / disk-loss Default action: node-stop' - enum: - - node-stop - - node-reset - - disk-loss - type: string - deviceNames: - description: The device name of disks to detach. - Needed in disk-loss. - items: - type: string - type: array - duration: - description: Duration represents the duration of - the chaos action. - type: string - instance: - description: Instance defines the name of the instance - type: string - project: - description: Project defines the ID of gcp project. - type: string - remoteCluster: - description: RemoteCluster represents the remote - cluster where the chaos will be deployed - type: string - secretName: - description: SecretName defines the name of kubernetes - secret. It is used for GCP credentials. - type: string - zone: - description: Zone defines the zone of gcp project. - type: string - required: - - action - - instance - - project - - zone - type: object - historyLimit: - minimum: 1 - type: integer - httpChaos: - properties: - abort: - description: Abort is a rule to abort a http session. - type: boolean - code: - description: Code is a rule to select target by - http status code in response. - format: int32 - type: integer - delay: - description: Delay represents the delay of the target - request/response. A duration string is a possibly - unsigned sequence of decimal numbers, each with - optional fraction and a unit suffix, such as "300ms", - "2h45m". Valid time units are "ns", "us" (or "µs"), - "ms", "s", "m", "h". - type: string - duration: - description: Duration represents the duration of - the chaos action. - type: string - method: - description: Method is a rule to select target by - http method in request. - type: string - mode: - description: 'Mode defines the mode to run chaos - action. Supported mode: one / all / fixed / fixed-percent - / random-max-percent' - enum: - - one - - all - - fixed - - fixed-percent - - random-max-percent - type: string - patch: - description: Patch is a rule to patch some contents - in target. - properties: - body: - description: Body is a rule to patch message - body of target. - properties: - type: - description: Type represents the patch type, - only support `JSON` as [merge patch json](https://tools.ietf.org/html/rfc7396) - currently. - type: string - value: - description: Value is the patch contents. - type: string - required: - - type - - value - type: object - headers: - description: 'Headers is a rule to append http - headers of target. For example: `[["Set-Cookie", - ""], ["Set-Cookie", ""]]`.' - items: - items: - type: string - type: array - type: array - queries: - description: 'Queries is a rule to append uri - queries of target(Request only). For example: - `[["foo", "bar"], ["foo", "unknown"]]`.' - items: - items: - type: string - type: array - type: array - type: object - path: - description: Path is a rule to select target by - uri path in http request. - type: string - port: - description: Port represents the target port to - be proxy of. - format: int32 - type: integer - remoteCluster: - description: RemoteCluster represents the remote - cluster where the chaos will be deployed - type: string - replace: - description: Replace is a rule to replace some contents - in target. - properties: - body: - description: Body is a rule to replace http - message body in target. - format: byte - type: string - code: - description: Code is a rule to replace http - status code in response. - format: int32 - type: integer - headers: - additionalProperties: - type: string - description: Headers is a rule to replace http - headers of target. The key-value pairs represent - header name and header value pairs. - type: object - method: - description: Method is a rule to replace http - method in request. - type: string - path: - description: Path is rule to to replace uri - path in http request. - type: string - queries: - additionalProperties: - type: string - description: 'Queries is a rule to replace uri - queries in http request. For example, with - value `{ "foo": "unknown" }`, the `/?foo=bar` - will be altered to `/?foo=unknown`,' - type: object - type: object - request_headers: - additionalProperties: - type: string - description: RequestHeaders is a rule to select - target by http headers in request. The key-value - pairs represent header name and header value pairs. - type: object - response_headers: - additionalProperties: - type: string - description: ResponseHeaders is a rule to select - target by http headers in response. The key-value - pairs represent header name and header value pairs. - type: object - selector: - description: Selector is used to select pods that - are used to inject chaos action. - properties: - annotationSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select objects. A selector - based on annotations. - type: object - expressionSelectors: - description: a slice of label selector expressions - that can be used to select objects. A list - of selectors based on set-based label expressions. - items: - description: A label selector requirement - is a selector that contains values, a key, - and an operator that relates the key and - values. - properties: - key: - description: key is the label key that - the selector applies to. - type: string - operator: - description: operator represents a key's - relationship to a set of values. Valid - operators are In, NotIn, Exists and - DoesNotExist. - type: string - values: - description: values is an array of string - values. If the operator is In or NotIn, - the values array must be non-empty. - If the operator is Exists or DoesNotExist, - the values array must be empty. This - array is replaced during a strategic - merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - fieldSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select objects. A selector - based on fields. - type: object - labelSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select objects. A selector - based on labels. - type: object - namespaces: - description: Namespaces is a set of namespace - to which objects belong. - items: - type: string - type: array - nodeSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select nodes. Selector which - must match a node's labels, and objects must - belong to these selected nodes. - type: object - nodes: - description: Nodes is a set of node name and - objects must belong to these nodes. - items: - type: string - type: array - podPhaseSelectors: - description: 'PodPhaseSelectors is a set of - condition of a pod at the current time. supported - value: Pending / Running / Succeeded / Failed - / Unknown' - items: - type: string - type: array - pods: - additionalProperties: - items: - type: string - type: array - description: Pods is a map of string keys and - a set values that used to select pods. The - key defines the namespace which pods belong, - and the each values is a set of pod names. - type: object - type: object - target: - description: Target is the object to be selected - and injected. - enum: - - Request - - Response - type: string - tls: - description: TLS is the tls config, will override - PodHttpChaos if there are multiple HTTPChaos experiments - are applied - properties: - caName: - description: CAName represents the data name - of ca file in secret, `ca.crt` for example - type: string - certName: - description: CertName represents the data name - of cert file in secret, `tls.crt` for example - type: string - keyName: - description: KeyName represents the data name - of key file in secret, `tls.key` for example - type: string - secretName: - description: SecretName represents the name - of required secret resource - type: string - secretNamespace: - description: SecretNamespace represents the - namespace of required secret resource - type: string - required: - - certName - - keyName - - secretName - - secretNamespace - type: object - value: - description: Value is required when the mode is - set to `FixedMode` / `FixedPercentMode` / `RandomMaxPercentMode`. - If `FixedMode`, provide an integer of pods to - do chaos action. If `FixedPercentMode`, provide - a number from 0-100 to specify the percent of - pods the server can do chaos action. IF `RandomMaxPercentMode`, provide - a number from 0-100 to specify the max percent - of pods to do chaos action - type: string - required: - - mode - - selector - - target - type: object - ioChaos: - description: IOChaosSpec defines the desired state of - IOChaos - properties: - action: - description: 'Action defines the specific pod chaos - action. Supported action: latency / fault / attrOverride - / mistake' - enum: - - latency - - fault - - attrOverride - - mistake - type: string - attr: - description: Attr defines the overrided attribution - properties: - atime: - description: Timespec represents a time - properties: - nsec: - format: int64 - type: integer - sec: - format: int64 - type: integer - required: - - nsec - - sec - type: object - blocks: - format: int64 - type: integer - ctime: - description: Timespec represents a time - properties: - nsec: - format: int64 - type: integer - sec: - format: int64 - type: integer - required: - - nsec - - sec - type: object - gid: - format: int32 - type: integer - ino: - format: int64 - type: integer - kind: - description: FileType represents type of file - type: string - mtime: - description: Timespec represents a time - properties: - nsec: - format: int64 - type: integer - sec: - format: int64 - type: integer - required: - - nsec - - sec - type: object - nlink: - format: int32 - type: integer - perm: - type: integer - rdev: - format: int32 - type: integer - size: - format: int64 - type: integer - uid: - format: int32 - type: integer - type: object - containerNames: - description: ContainerNames indicates list of the - name of affected container. If not set, the first - container will be injected - items: - type: string - type: array - delay: - description: Delay defines the value of I/O chaos - action delay. A delay string is a possibly signed - sequence of decimal numbers, each with optional - fraction and a unit suffix, such as "300ms". Valid - time units are "ns", "us" (or "µs"), "ms", "s", - "m", "h". - type: string - duration: - description: Duration represents the duration of - the chaos action. It is required when the action - is `PodFailureAction`. A duration string is a - possibly signed sequence of decimal numbers, each - with optional fraction and a unit suffix, such - as "300ms", "-1.5h" or "2h45m". Valid time units - are "ns", "us" (or "µs"), "ms", "s", "m", "h". - type: string - errno: - description: 'Errno defines the error code that - returned by I/O action. refer to: https://www-numi.fnal.gov/offline_software/srt_public_context/WebDocs/Errors/unix_system_errors.html' - format: int32 - type: integer - methods: - description: 'Methods defines the I/O methods for - injecting I/O chaos action. default: all I/O methods.' - items: - type: string - type: array - mistake: - description: Mistake defines what types of incorrectness - are injected to IO operations - properties: - filling: - description: Filling determines what is filled - in the mistake data. - enum: - - zero - - random - type: string - maxLength: - description: Max length of each wrong data segment - in bytes - format: int64 - minimum: 1 - type: integer - maxOccurrences: - description: There will be [1, MaxOccurrences] - segments of wrong data. - format: int64 - minimum: 1 - type: integer - type: object - mode: - description: 'Mode defines the mode to run chaos - action. Supported mode: one / all / fixed / fixed-percent - / random-max-percent' - enum: - - one - - all - - fixed - - fixed-percent - - random-max-percent - type: string - path: - description: Path defines the path of files for - injecting I/O chaos action. - type: string - percent: - default: 100 - description: 'Percent defines the percentage of - injection errors and provides a number from 0-100. - default: 100.' - type: integer - remoteCluster: - description: RemoteCluster represents the remote - cluster where the chaos will be deployed - type: string - selector: - description: Selector is used to select pods that - are used to inject chaos action. - properties: - annotationSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select objects. A selector - based on annotations. - type: object - expressionSelectors: - description: a slice of label selector expressions - that can be used to select objects. A list - of selectors based on set-based label expressions. - items: - description: A label selector requirement - is a selector that contains values, a key, - and an operator that relates the key and - values. - properties: - key: - description: key is the label key that - the selector applies to. - type: string - operator: - description: operator represents a key's - relationship to a set of values. Valid - operators are In, NotIn, Exists and - DoesNotExist. - type: string - values: - description: values is an array of string - values. If the operator is In or NotIn, - the values array must be non-empty. - If the operator is Exists or DoesNotExist, - the values array must be empty. This - array is replaced during a strategic - merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - fieldSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select objects. A selector - based on fields. - type: object - labelSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select objects. A selector - based on labels. - type: object - namespaces: - description: Namespaces is a set of namespace - to which objects belong. - items: - type: string - type: array - nodeSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select nodes. Selector which - must match a node's labels, and objects must - belong to these selected nodes. - type: object - nodes: - description: Nodes is a set of node name and - objects must belong to these nodes. - items: - type: string - type: array - podPhaseSelectors: - description: 'PodPhaseSelectors is a set of - condition of a pod at the current time. supported - value: Pending / Running / Succeeded / Failed - / Unknown' - items: - type: string - type: array - pods: - additionalProperties: - items: - type: string - type: array - description: Pods is a map of string keys and - a set values that used to select pods. The - key defines the namespace which pods belong, - and the each values is a set of pod names. - type: object - type: object - value: - description: Value is required when the mode is - set to `FixedMode` / `FixedPercentMode` / `RandomMaxPercentMode`. - If `FixedMode`, provide an integer of pods to - do chaos action. If `FixedPercentMode`, provide - a number from 0-100 to specify the percent of - pods the server can do chaos action. IF `RandomMaxPercentMode`, provide - a number from 0-100 to specify the max percent - of pods to do chaos action - type: string - volumePath: - description: VolumePath represents the mount path - of injected volume - type: string - required: - - action - - mode - - selector - - volumePath - type: object - jvmChaos: - description: JVMChaosSpec defines the desired state - of JVMChaos - properties: - action: - description: 'Action defines the specific jvm chaos - action. Supported action: latency;return;exception;stress;gc;ruleData' - enum: - - latency - - return - - exception - - stress - - gc - - ruleData - - mysql - type: string - class: - description: Java class - type: string - containerNames: - description: ContainerNames indicates list of the - name of affected container. If not set, the first - container will be injected - items: - type: string - type: array - cpuCount: - description: the CPU core number needs to use, only - set it when action is stress - type: integer - database: - description: the match database default value is - "", means match all database - type: string - duration: - description: Duration represents the duration of - the chaos action - type: string - exception: - description: the exception which needs to throw - for action `exception` or the exception message - needs to throw in action `mysql` - type: string - latency: - description: the latency duration for action 'latency', - unit ms or the latency duration in action `mysql` - type: integer - memType: - description: the memory type needs to locate, only - set it when action is stress, the value can be - 'stack' or 'heap' - type: string - method: - description: the method in Java class - type: string - mode: - description: 'Mode defines the mode to run chaos - action. Supported mode: one / all / fixed / fixed-percent - / random-max-percent' - enum: - - one - - all - - fixed - - fixed-percent - - random-max-percent - type: string - mysqlConnectorVersion: - description: the version of mysql-connector-java, - only support 5.X.X(set to "5") and 8.X.X(set to - "8") now - type: string - name: - description: byteman rule name, should be unique, - and will generate one if not set - type: string - pid: - description: the pid of Java process which needs - to attach - type: integer - port: - description: the port of agent server, default 9277 - format: int32 - type: integer - remoteCluster: - description: RemoteCluster represents the remote - cluster where the chaos will be deployed - type: string - ruleData: - description: the byteman rule's data for action - 'ruleData' - type: string - selector: - description: Selector is used to select pods that - are used to inject chaos action. - properties: - annotationSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select objects. A selector - based on annotations. - type: object - expressionSelectors: - description: a slice of label selector expressions - that can be used to select objects. A list - of selectors based on set-based label expressions. - items: - description: A label selector requirement - is a selector that contains values, a key, - and an operator that relates the key and - values. - properties: - key: - description: key is the label key that - the selector applies to. - type: string - operator: - description: operator represents a key's - relationship to a set of values. Valid - operators are In, NotIn, Exists and - DoesNotExist. - type: string - values: - description: values is an array of string - values. If the operator is In or NotIn, - the values array must be non-empty. - If the operator is Exists or DoesNotExist, - the values array must be empty. This - array is replaced during a strategic - merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - fieldSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select objects. A selector - based on fields. - type: object - labelSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select objects. A selector - based on labels. - type: object - namespaces: - description: Namespaces is a set of namespace - to which objects belong. - items: - type: string - type: array - nodeSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select nodes. Selector which - must match a node's labels, and objects must - belong to these selected nodes. - type: object - nodes: - description: Nodes is a set of node name and - objects must belong to these nodes. - items: - type: string - type: array - podPhaseSelectors: - description: 'PodPhaseSelectors is a set of - condition of a pod at the current time. supported - value: Pending / Running / Succeeded / Failed - / Unknown' - items: - type: string - type: array - pods: - additionalProperties: - items: - type: string - type: array - description: Pods is a map of string keys and - a set values that used to select pods. The - key defines the namespace which pods belong, - and the each values is a set of pod names. - type: object - type: object - sqlType: - description: the match sql type default value is - "", means match all SQL type. The value can be - 'select', 'insert', 'update', 'delete', 'replace'. - type: string - table: - description: the match table default value is "", - means match all table - type: string - value: - description: Value is required when the mode is - set to `FixedMode` / `FixedPercentMode` / `RandomMaxPercentMode`. - If `FixedMode`, provide an integer of pods to - do chaos action. If `FixedPercentMode`, provide - a number from 0-100 to specify the percent of - pods the server can do chaos action. IF `RandomMaxPercentMode`, provide - a number from 0-100 to specify the max percent - of pods to do chaos action - type: string - required: - - action - - mode - - selector - type: object - kernelChaos: - description: KernelChaosSpec defines the desired state - of KernelChaos - properties: - containerNames: - description: ContainerNames indicates list of the - name of affected container. If not set, the first - container will be injected - items: - type: string - type: array - duration: - description: Duration represents the duration of - the chaos action - type: string - failKernRequest: - description: FailKernRequest defines the request - of kernel injection - properties: - callchain: - description: 'Callchain indicate a special call - chain, such as: ext4_mount -> mount_subtree - -> ... -> should_failslab With an optional - set of predicates and an optional set of parameters, - which used with predicates. You can read call - chan and predicate examples from https://github.com/chaos-mesh/bpfki/tree/develop/examples - to learn more. If no special call chain, just - keep Callchain empty, which means it will - fail at any call chain with slab alloc (eg: - kmalloc).' - items: - description: Frame defines the function signature - and predicate in function's body - properties: - funcname: - description: Funcname can be find from - kernel source or `/proc/kallsyms`, such - as `ext4_mount` - type: string - parameters: - description: Parameters is used with predicate, - for example, if you want to inject slab - error in `d_alloc_parallel(struct dentry - *parent, const struct qstr *name)` with - a special name `bananas`, you need to - set it to `struct dentry *parent, const - struct qstr *name` otherwise omit it. - type: string - predicate: - description: Predicate will access the - arguments of this Frame, example with - Parameters's, you can set it to `STRNCMP(name->name, - "bananas", 8)` to make inject only with - it, or omit it to inject for all d_alloc_parallel - call chain. - type: string - type: object - type: array - failtype: - description: 'FailType indicates what to fail, - can be set to ''0'' / ''1'' / ''2'' If `0`, - indicates slab to fail (should_failslab) If - `1`, indicates alloc_page to fail (should_fail_alloc_page) - If `2`, indicates bio to fail (should_fail_bio) - You can read: 1. https://www.kernel.org/doc/html/latest/fault-injection/fault-injection.html - 2. http://github.com/iovisor/bcc/blob/master/tools/inject_example.txt - to learn more' - format: int32 - maximum: 2 - minimum: 0 - type: integer - headers: - description: 'Headers indicates the appropriate - kernel headers you need. Eg: "linux/mmzone.h", - "linux/blkdev.h" and so on' - items: - type: string - type: array - probability: - description: Probability indicates the fails - with probability. If you want 1%, please set - this field with 1. - format: int32 - maximum: 100 - minimum: 0 - type: integer - times: - description: Times indicates the max times of - fails. - format: int32 - minimum: 0 - type: integer - required: - - failtype - type: object - mode: - description: 'Mode defines the mode to run chaos - action. Supported mode: one / all / fixed / fixed-percent - / random-max-percent' - enum: - - one - - all - - fixed - - fixed-percent - - random-max-percent - type: string - remoteCluster: - description: RemoteCluster represents the remote - cluster where the chaos will be deployed - type: string - selector: - description: Selector is used to select pods that - are used to inject chaos action. - properties: - annotationSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select objects. A selector - based on annotations. - type: object - expressionSelectors: - description: a slice of label selector expressions - that can be used to select objects. A list - of selectors based on set-based label expressions. - items: - description: A label selector requirement - is a selector that contains values, a key, - and an operator that relates the key and - values. - properties: - key: - description: key is the label key that - the selector applies to. - type: string - operator: - description: operator represents a key's - relationship to a set of values. Valid - operators are In, NotIn, Exists and - DoesNotExist. - type: string - values: - description: values is an array of string - values. If the operator is In or NotIn, - the values array must be non-empty. - If the operator is Exists or DoesNotExist, - the values array must be empty. This - array is replaced during a strategic - merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - fieldSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select objects. A selector - based on fields. - type: object - labelSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select objects. A selector - based on labels. - type: object - namespaces: - description: Namespaces is a set of namespace - to which objects belong. - items: - type: string - type: array - nodeSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select nodes. Selector which - must match a node's labels, and objects must - belong to these selected nodes. - type: object - nodes: - description: Nodes is a set of node name and - objects must belong to these nodes. - items: - type: string - type: array - podPhaseSelectors: - description: 'PodPhaseSelectors is a set of - condition of a pod at the current time. supported - value: Pending / Running / Succeeded / Failed - / Unknown' - items: - type: string - type: array - pods: - additionalProperties: - items: - type: string - type: array - description: Pods is a map of string keys and - a set values that used to select pods. The - key defines the namespace which pods belong, - and the each values is a set of pod names. - type: object - type: object - value: - description: Value is required when the mode is - set to `FixedMode` / `FixedPercentMode` / `RandomMaxPercentMode`. - If `FixedMode`, provide an integer of pods to - do chaos action. If `FixedPercentMode`, provide - a number from 0-100 to specify the percent of - pods the server can do chaos action. IF `RandomMaxPercentMode`, provide - a number from 0-100 to specify the max percent - of pods to do chaos action - type: string - required: - - failKernRequest - - mode - - selector - type: object - networkChaos: - description: NetworkChaosSpec defines the desired state - of NetworkChaos - properties: - action: - description: 'Action defines the specific network - chaos action. Supported action: partition, netem, - delay, loss, duplicate, corrupt Default action: - delay' - enum: - - netem - - delay - - loss - - duplicate - - corrupt - - partition - - bandwidth - type: string - bandwidth: - description: Bandwidth represents the detail about - bandwidth control action - properties: - buffer: - description: Buffer is the maximum amount of - bytes that tokens can be available for instantaneously. - format: int32 - minimum: 1 - type: integer - limit: - description: Limit is the number of bytes that - can be queued waiting for tokens to become - available. - format: int32 - minimum: 1 - type: integer - minburst: - description: Minburst specifies the size of - the peakrate bucket. For perfect accuracy, - should be set to the MTU of the interface. If - a peakrate is needed, but some burstiness - is acceptable, this size can be raised. A - 3000 byte minburst allows around 3mbit/s of - peakrate, given 1000 byte packets. - format: int32 - minimum: 0 - type: integer - peakrate: - description: Peakrate is the maximum depletion - rate of the bucket. The peakrate does not - need to be set, it is only necessary if perfect - millisecond timescale shaping is required. - format: int64 - minimum: 0 - type: integer - rate: - description: Rate is the speed knob. Allows - bit, kbit, mbit, gbit, tbit, bps, kbps, mbps, - gbps, tbps unit. bps means bytes per second. - type: string - required: - - buffer - - limit - - rate - type: object - corrupt: - description: Corrupt represents the detail about - corrupt action - properties: - correlation: - type: string - corrupt: - type: string - required: - - corrupt - type: object - delay: - description: Delay represents the detail about delay - action - properties: - correlation: - type: string - jitter: - type: string - latency: - type: string - reorder: - description: ReorderSpec defines details of - packet reorder. - properties: - correlation: - type: string - gap: - type: integer - reorder: - type: string - required: - - gap - - reorder - type: object - required: - - latency - type: object - device: - description: Device represents the network device - to be affected. - type: string - direction: - default: to - description: Direction represents the direction, - this applies on netem and network partition action - enum: - - to - - from - - both - type: string - duplicate: - description: DuplicateSpec represents the detail - about loss action - properties: - correlation: - type: string - duplicate: - type: string - required: - - duplicate - type: object - duration: - description: Duration represents the duration of - the chaos action - type: string - externalTargets: - description: ExternalTargets represents network - targets outside k8s - items: - type: string - type: array - loss: - description: Loss represents the detail about loss - action - properties: - correlation: - type: string - loss: - type: string - required: - - loss - type: object - mode: - description: 'Mode defines the mode to run chaos - action. Supported mode: one / all / fixed / fixed-percent - / random-max-percent' - enum: - - one - - all - - fixed - - fixed-percent - - random-max-percent - type: string - rate: - description: Rate represents the detail about rate - control action - properties: - rate: - description: Rate is the speed knob. Allows - bit, kbit, mbit, gbit, tbit, bps, kbps, mbps, - gbps, tbps unit. bps means bytes per second. - type: string - required: - - rate - type: object - remoteCluster: - description: RemoteCluster represents the remote - cluster where the chaos will be deployed - type: string - selector: - description: Selector is used to select pods that - are used to inject chaos action. - properties: - annotationSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select objects. A selector - based on annotations. - type: object - expressionSelectors: - description: a slice of label selector expressions - that can be used to select objects. A list - of selectors based on set-based label expressions. - items: - description: A label selector requirement - is a selector that contains values, a key, - and an operator that relates the key and - values. - properties: - key: - description: key is the label key that - the selector applies to. - type: string - operator: - description: operator represents a key's - relationship to a set of values. Valid - operators are In, NotIn, Exists and - DoesNotExist. - type: string - values: - description: values is an array of string - values. If the operator is In or NotIn, - the values array must be non-empty. - If the operator is Exists or DoesNotExist, - the values array must be empty. This - array is replaced during a strategic - merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - fieldSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select objects. A selector - based on fields. - type: object - labelSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select objects. A selector - based on labels. - type: object - namespaces: - description: Namespaces is a set of namespace - to which objects belong. - items: - type: string - type: array - nodeSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select nodes. Selector which - must match a node's labels, and objects must - belong to these selected nodes. - type: object - nodes: - description: Nodes is a set of node name and - objects must belong to these nodes. - items: - type: string - type: array - podPhaseSelectors: - description: 'PodPhaseSelectors is a set of - condition of a pod at the current time. supported - value: Pending / Running / Succeeded / Failed - / Unknown' - items: - type: string - type: array - pods: - additionalProperties: - items: - type: string - type: array - description: Pods is a map of string keys and - a set values that used to select pods. The - key defines the namespace which pods belong, - and the each values is a set of pod names. - type: object - type: object - target: - description: Target represents network target, this - applies on netem and network partition action - properties: - mode: - description: 'Mode defines the mode to run chaos - action. Supported mode: one / all / fixed - / fixed-percent / random-max-percent' - enum: - - one - - all - - fixed - - fixed-percent - - random-max-percent - type: string - selector: - description: Selector is used to select pods - that are used to inject chaos action. - properties: - annotationSelectors: - additionalProperties: - type: string - description: Map of string keys and values - that can be used to select objects. A - selector based on annotations. - type: object - expressionSelectors: - description: a slice of label selector expressions - that can be used to select objects. A - list of selectors based on set-based label - expressions. - items: - description: A label selector requirement - is a selector that contains values, - a key, and an operator that relates - the key and values. - properties: - key: - description: key is the label key - that the selector applies to. - type: string - operator: - description: operator represents a - key's relationship to a set of values. - Valid operators are In, NotIn, Exists - and DoesNotExist. - type: string - values: - description: values is an array of - string values. If the operator is - In or NotIn, the values array must - be non-empty. If the operator is - Exists or DoesNotExist, the values - array must be empty. This array - is replaced during a strategic merge - patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - fieldSelectors: - additionalProperties: - type: string - description: Map of string keys and values - that can be used to select objects. A - selector based on fields. - type: object - labelSelectors: - additionalProperties: - type: string - description: Map of string keys and values - that can be used to select objects. A - selector based on labels. - type: object - namespaces: - description: Namespaces is a set of namespace - to which objects belong. - items: - type: string - type: array - nodeSelectors: - additionalProperties: - type: string - description: Map of string keys and values - that can be used to select nodes. Selector - which must match a node's labels, and - objects must belong to these selected - nodes. - type: object - nodes: - description: Nodes is a set of node name - and objects must belong to these nodes. - items: - type: string - type: array - podPhaseSelectors: - description: 'PodPhaseSelectors is a set - of condition of a pod at the current time. - supported value: Pending / Running / Succeeded - / Failed / Unknown' - items: - type: string - type: array - pods: - additionalProperties: - items: - type: string - type: array - description: Pods is a map of string keys - and a set values that used to select pods. - The key defines the namespace which pods - belong, and the each values is a set of - pod names. - type: object - type: object - value: - description: Value is required when the mode - is set to `FixedMode` / `FixedPercentMode` - / `RandomMaxPercentMode`. If `FixedMode`, - provide an integer of pods to do chaos action. - If `FixedPercentMode`, provide a number from - 0-100 to specify the percent of pods the server - can do chaos action. IF `RandomMaxPercentMode`, provide - a number from 0-100 to specify the max percent - of pods to do chaos action - type: string - required: - - mode - - selector - type: object - targetDevice: - description: TargetDevice represents the network - device to be affected in target scope. - type: string - value: - description: Value is required when the mode is - set to `FixedMode` / `FixedPercentMode` / `RandomMaxPercentMode`. - If `FixedMode`, provide an integer of pods to - do chaos action. If `FixedPercentMode`, provide - a number from 0-100 to specify the percent of - pods the server can do chaos action. IF `RandomMaxPercentMode`, provide - a number from 0-100 to specify the max percent - of pods to do chaos action - type: string - required: - - action - - mode - - selector - type: object - physicalmachineChaos: - description: PhysicalMachineChaosSpec defines the desired - state of PhysicalMachineChaos - properties: - action: - description: the subAction, generate automatically - enum: - - stress-cpu - - stress-mem - - disk-read-payload - - disk-write-payload - - disk-fill - - network-corrupt - - network-duplicate - - network-loss - - network-delay - - network-partition - - network-dns - - network-bandwidth - - network-flood - - network-down - - process - - jvm-exception - - jvm-gc - - jvm-latency - - jvm-return - - jvm-stress - - jvm-rule-data - - jvm-mysql - - clock - - redis-expiration - - redis-penetration - - redis-cacheLimit - - redis-restart - - redis-stop - - kafka-fill - - kafka-flood - - kafka-io - - file-create - - file-modify - - file-delete - - file-rename - - file-append - - file-replace - - vm - - user_defined - type: string - address: - description: 'DEPRECATED: Use Selector instead. - Only one of Address and Selector could be specified.' - items: - type: string - type: array - clock: - properties: - clock-ids-slice: - description: the identifier of the particular - clock on which to act. More clock description - in linux kernel can be found in man page of - clock_getres, clock_gettime, clock_settime. - Muti clock ids should be split with "," - type: string - pid: - description: the pid of target program. - type: integer - time-offset: - description: specifies the length of time offset. - type: string - type: object - disk-fill: - properties: - fill-by-fallocate: - description: fill disk by fallocate - type: boolean - path: - description: specifies the location to fill - data in. if path not provided, payload will - read/write from/into a temp file, temp file - will be deleted after writing - type: string - size: - description: 'specifies how many units of data - will write into the file path. support unit: - c=1, w=2, b=512, kB=1000, K=1024, MB=1000*1000, - M=1024*1024, GB=1000*1000*1000, G=1024*1024*1024 - BYTES. example : 1M | 512kB' - type: string - type: object - disk-read-payload: - properties: - path: - description: specifies the location to fill - data in. if path not provided, payload will - read/write from/into a temp file, temp file - will be deleted after writing - type: string - payload-process-num: - description: specifies the number of process - work on writing, default 1, only 1-255 is - valid value - type: integer - size: - description: 'specifies how many units of data - will write into the file path. support unit: - c=1, w=2, b=512, kB=1000, K=1024, MB=1000*1000, - M=1024*1024, GB=1000*1000*1000, G=1024*1024*1024 - BYTES. example : 1M | 512kB' - type: string - type: object - disk-write-payload: - properties: - path: - description: specifies the location to fill - data in. if path not provided, payload will - read/write from/into a temp file, temp file - will be deleted after writing - type: string - payload-process-num: - description: specifies the number of process - work on writing, default 1, only 1-255 is - valid value - type: integer - size: - description: 'specifies how many units of data - will write into the file path. support unit: - c=1, w=2, b=512, kB=1000, K=1024, MB=1000*1000, - M=1024*1024, GB=1000*1000*1000, G=1024*1024*1024 - BYTES. example : 1M | 512kB' - type: string - type: object - duration: - description: Duration represents the duration of - the chaos action - type: string - file-append: - properties: - count: - description: Count is the number of times to - append the data. - type: integer - data: - description: Data is the data for append. - type: string - file-name: - description: FileName is the name of the file - to be created, modified, deleted, renamed, - or appended. - type: string - type: object - file-create: - properties: - dir-name: - description: DirName is the directory name to - create or delete. - type: string - file-name: - description: FileName is the name of the file - to be created, modified, deleted, renamed, - or appended. - type: string - type: object - file-delete: - properties: - dir-name: - description: DirName is the directory name to - create or delete. - type: string - file-name: - description: FileName is the name of the file - to be created, modified, deleted, renamed, - or appended. - type: string - type: object - file-modify: - properties: - file-name: - description: FileName is the name of the file - to be created, modified, deleted, renamed, - or appended. - type: string - privilege: - description: Privilege is the file privilege - to be set. - format: int32 - type: integer - type: object - file-rename: - properties: - dest-file: - description: DestFile is the name to be renamed. - type: string - source-file: - description: SourceFile is the name need to - be renamed. - type: string - type: object - file-replace: - properties: - dest-string: - description: DestStr is the destination string - of the file. - type: string - file-name: - description: FileName is the name of the file - to be created, modified, deleted, renamed, - or appended. - type: string - line: - description: Line is the line number of the - file to be replaced. - type: integer - origin-string: - description: OriginStr is the origin string - of the file. - type: string - type: object - http-abort: - properties: - code: - description: Code is a rule to select target - by http status code in response - type: string - method: - description: HTTP method - type: string - path: - description: Match path of Uri with wildcard - matches - type: string - port: - description: The TCP port that the target service - listens on - format: int32 - type: integer - proxy_ports: - description: Composed with one of the port of - HTTP connection, we will only attack HTTP - connection with port inside proxy_ports - items: - type: integer - type: array - target: - description: 'HTTP target: Request or Response' - type: string - required: - - proxy_ports - - target - type: object - http-config: - properties: - file_path: - description: The config file path - type: string - type: object - http-delay: - properties: - code: - description: Code is a rule to select target - by http status code in response - type: string - delay: - description: Delay represents the delay of the - target request/response - type: string - method: - description: HTTP method - type: string - path: - description: Match path of Uri with wildcard - matches - type: string - port: - description: The TCP port that the target service - listens on - format: int32 - type: integer - proxy_ports: - description: Composed with one of the port of - HTTP connection, we will only attack HTTP - connection with port inside proxy_ports - items: - type: integer - type: array - target: - description: 'HTTP target: Request or Response' - type: string - required: - - delay - - proxy_ports - - target - type: object - http-request: - description: used for HTTP request, now only support - GET - properties: - count: - description: The number of requests to send - type: integer - enable-conn-pool: - description: Enable connection pool - type: boolean - url: - description: Request to send" - type: string - type: object - jvm-exception: - properties: - class: - description: Java class - type: string - exception: - description: the exception which needs to throw - for action `exception` - type: string - method: - description: the method in Java class - type: string - pid: - description: the pid of Java process which needs - to attach - type: integer - port: - description: the port of agent server, default - 9277 - format: int32 - type: integer - type: object - jvm-gc: - properties: - pid: - description: the pid of Java process which needs - to attach - type: integer - port: - description: the port of agent server, default - 9277 - format: int32 - type: integer - type: object - jvm-latency: - properties: - class: - description: Java class - type: string - latency: - description: the latency duration for action - 'latency', unit ms - type: integer - method: - description: the method in Java class - type: string - pid: - description: the pid of Java process which needs - to attach - type: integer - port: - description: the port of agent server, default - 9277 - format: int32 - type: integer - type: object - jvm-mysql: - properties: - database: - description: the match database default value - is "", means match all database - type: string - exception: - description: The exception which needs to throw - for action `exception` or the exception message - needs to throw in action `mysql` - type: string - latency: - description: The latency duration for action - 'latency' or the latency duration in action - `mysql` - type: integer - mysqlConnectorVersion: - description: the version of mysql-connector-java, - only support 5.X.X(set to "5") and 8.X.X(set - to "8") now - type: string - pid: - description: the pid of Java process which needs - to attach - type: integer - port: - description: the port of agent server, default - 9277 - format: int32 - type: integer - sqlType: - description: the match sql type default value - is "", means match all SQL type. The value - can be 'select', 'insert', 'update', 'delete', - 'replace'. - type: string - table: - description: the match table default value is - "", means match all table - type: string - type: object - jvm-return: - properties: - class: - description: Java class - type: string - method: - description: the method in Java class - type: string - pid: - description: the pid of Java process which needs - to attach - type: integer - port: - description: the port of agent server, default - 9277 - format: int32 - type: integer - value: - description: the return value for action 'return' - type: string - type: object - jvm-rule-data: - properties: - pid: - description: the pid of Java process which needs - to attach - type: integer - port: - description: the port of agent server, default - 9277 - format: int32 - type: integer - rule-data: - description: RuleData used to save the rule - file's data, will use it when recover - type: string - type: object - jvm-stress: - properties: - cpu-count: - description: the CPU core number need to use, - only set it when action is stress - type: integer - mem-type: - description: the memory type need to locate, - only set it when action is stress, the value - can be 'stack' or 'heap' - type: string - pid: - description: the pid of Java process which needs - to attach - type: integer - port: - description: the port of agent server, default - 9277 - format: int32 - type: integer - type: object - kafka-fill: - properties: - host: - description: The host of kafka server - type: string - maxBytes: - description: The max bytes to fill - format: int64 - type: integer - messageSize: - description: The size of each message - type: integer - password: - description: The password of kafka client - type: string - port: - description: The port of kafka server - type: integer - reloadCommand: - description: The command to reload kafka config - type: string - topic: - description: The topic to attack - type: string - username: - description: The username of kafka client - type: string - type: object - kafka-flood: - properties: - host: - description: The host of kafka server - type: string - messageSize: - description: The size of each message - type: integer - password: - description: The password of kafka client - type: string - port: - description: The port of kafka server - type: integer - threads: - description: The number of worker threads - type: integer - topic: - description: The topic to attack - type: string - username: - description: The username of kafka client - type: string - type: object - kafka-io: - properties: - configFile: - description: The path of server config - type: string - nonReadable: - description: Make kafka cluster non-readable - type: boolean - nonWritable: - description: Make kafka cluster non-writable - type: boolean - topic: - description: The topic to attack - type: string - type: object - mode: - description: 'Mode defines the mode to run chaos - action. Supported mode: one / all / fixed / fixed-percent - / random-max-percent' - enum: - - one - - all - - fixed - - fixed-percent - - random-max-percent - type: string - network-bandwidth: - properties: - buffer: - format: int32 - minimum: 1 - type: integer - device: - type: string - hostname: - type: string - ip-address: - type: string - limit: - format: int32 - minimum: 1 - type: integer - minburst: - format: int32 - type: integer - peakrate: - format: int64 - type: integer - rate: - type: string - required: - - buffer - - limit - - rate - type: object - network-corrupt: - properties: - correlation: - description: correlation is percentage (10 is - 10%) - type: string - device: - description: the network interface to impact - type: string - egress-port: - description: only impact egress traffic to these - destination ports, use a ',' to separate or - to indicate the range, such as 80, 8001:8010. - it can only be used in conjunction with -p - tcp or -p udp - type: string - hostname: - description: only impact traffic to these hostnames - type: string - ip-address: - description: only impact egress traffic to these - IP addresses - type: string - ip-protocol: - description: 'only impact traffic using this - IP protocol, supported: tcp, udp, icmp, all' - type: string - percent: - description: percentage of packets to corrupt - (10 is 10%) - type: string - source-port: - description: only impact egress traffic from - these source ports, use a ',' to separate - or to indicate the range, such as 80, 8001:8010. - it can only be used in conjunction with -p - tcp or -p udp - type: string - type: object - network-delay: - properties: - accept-tcp-flags: - description: only the packet which match the - tcp flag can be accepted, others will be dropped. - only set when the IPProtocol is tcp, used - for partition. - type: string - correlation: - description: correlation is percentage (10 is - 10%) - type: string - device: - description: the network interface to impact - type: string - egress-port: - description: only impact egress traffic to these - destination ports, use a ',' to separate or - to indicate the range, such as 80, 8001:8010. - it can only be used in conjunction with -p - tcp or -p udp - type: string - hostname: - description: only impact traffic to these hostnames - type: string - ip-address: - description: only impact egress traffic to these - IP addresses - type: string - ip-protocol: - description: 'only impact traffic using this - IP protocol, supported: tcp, udp, icmp, all' - type: string - jitter: - description: 'jitter time, time units: ns, us - (or µs), ms, s, m, h.' - type: string - latency: - description: 'delay egress time, time units: - ns, us (or µs), ms, s, m, h.' - type: string - source-port: - description: only impact egress traffic from - these source ports, use a ',' to separate - or to indicate the range, such as 80, 8001:8010. - it can only be used in conjunction with -p - tcp or -p udp - type: string - type: object - network-dns: - properties: - dns-domain-name: - description: map this host to specified IP - type: string - dns-ip: - description: map specified host to this IP address - type: string - dns-server: - description: update the DNS server in /etc/resolv.conf - with this value - type: string - type: object - network-down: - properties: - device: - description: The network interface to impact - type: string - duration: - description: 'NIC down time, time units: ns, - us (or µs), ms, s, m, h.' - type: string - type: object - network-duplicate: - properties: - correlation: - description: correlation is percentage (10 is - 10%) - type: string - device: - description: the network interface to impact - type: string - egress-port: - description: only impact egress traffic to these - destination ports, use a ',' to separate or - to indicate the range, such as 80, 8001:8010. - it can only be used in conjunction with -p - tcp or -p udp - type: string - hostname: - description: only impact traffic to these hostnames - type: string - ip-address: - description: only impact egress traffic to these - IP addresses - type: string - ip-protocol: - description: 'only impact traffic using this - IP protocol, supported: tcp, udp, icmp, all' - type: string - percent: - description: percentage of packets to duplicate - (10 is 10%) - type: string - source-port: - description: only impact egress traffic from - these source ports, use a ',' to separate - or to indicate the range, such as 80, 8001:8010. - it can only be used in conjunction with -p - tcp or -p udp - type: string - type: object - network-flood: - properties: - duration: - description: The number of seconds to run the - iperf test - type: string - ip-address: - description: Generate traffic to this IP address - type: string - parallel: - description: The number of iperf parallel client - threads to run - format: int32 - type: integer - port: - description: Generate traffic to this port on - the IP address - type: string - rate: - description: The speed of network traffic, allows - bps, kbps, mbps, gbps, tbps unit. bps means - bytes per second - type: string - required: - - duration - - rate - type: object - network-loss: - properties: - correlation: - description: correlation is percentage (10 is - 10%) - type: string - device: - description: the network interface to impact - type: string - egress-port: - description: only impact egress traffic to these - destination ports, use a ',' to separate or - to indicate the range, such as 80, 8001:8010. - it can only be used in conjunction with -p - tcp or -p udp - type: string - hostname: - description: only impact traffic to these hostnames - type: string - ip-address: - description: only impact egress traffic to these - IP addresses - type: string - ip-protocol: - description: 'only impact traffic using this - IP protocol, supported: tcp, udp, icmp, all' - type: string - percent: - description: percentage of packets to loss (10 - is 10%) - type: string - source-port: - description: only impact egress traffic from - these source ports, use a ',' to separate - or to indicate the range, such as 80, 8001:8010. - it can only be used in conjunction with -p - tcp or -p udp - type: string - type: object - network-partition: - properties: - accept-tcp-flags: - description: only the packet which match the - tcp flag can be accepted, others will be dropped. - only set when the IPProtocol is tcp, used - for partition. - type: string - device: - description: the network interface to impact - type: string - direction: - description: specifies the partition direction, - values can be 'from', 'to'. 'from' means packets - coming from the 'IPAddress' or 'Hostname' - and going to your server, 'to' means packets - originating from your server and going to - the 'IPAddress' or 'Hostname'. - type: string - hostname: - description: only impact traffic to these hostnames - type: string - ip-address: - description: only impact egress traffic to these - IP addresses - type: string - ip-protocol: - description: only impact egress traffic to these - IP addresses - type: string - type: object - process: - properties: - process: - description: the process name or the process - ID - type: string - recoverCmd: - description: the command to be run when recovering - experiment - type: string - signal: - description: the signal number to send - type: integer - type: object - redis-cacheLimit: - properties: - addr: - description: The adress of Redis server - type: string - cacheSize: - description: The size of `maxmemory` - type: string - password: - description: The password of Redis server - type: string - percent: - description: Specifies maxmemory as a percentage - of the original value - type: string - type: object - redis-expiration: - properties: - addr: - description: The adress of Redis server - type: string - expiration: - description: The expiration of the keys - type: string - key: - description: The keys to be expired - type: string - option: - description: Additional options for `expiration` - type: string - password: - description: The password of Redis server - type: string - type: object - redis-penetration: - properties: - addr: - description: The adress of Redis server - type: string - password: - description: The password of Redis server - type: string - requestNum: - description: The number of requests to be sent - type: integer - type: object - redis-restart: - properties: - addr: - description: The adress of Redis server - type: string - conf: - description: The path of Sentinel conf - type: string - flushConfig: - description: The control flag determines whether - to flush config - type: boolean - password: - description: The password of Redis server - type: string - redisPath: - description: The path of `redis-server` command-line - tool - type: boolean - type: object - redis-stop: - properties: - addr: - description: The adress of Redis server - type: string - conf: - description: The path of Sentinel conf - type: string - flushConfig: - description: The control flag determines whether - to flush config - type: boolean - password: - description: The password of Redis server - type: string - redisPath: - description: The path of `redis-server` command-line - tool - type: boolean - type: object - remoteCluster: - description: RemoteCluster represents the remote - cluster where the chaos will be deployed - type: string - selector: - description: Selector is used to select physical - machines that are used to inject chaos action. - properties: - annotationSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select objects. A selector - based on annotations. - type: object - expressionSelectors: - description: a slice of label selector expressions - that can be used to select objects. A list - of selectors based on set-based label expressions. - items: - description: A label selector requirement - is a selector that contains values, a key, - and an operator that relates the key and - values. - properties: - key: - description: key is the label key that - the selector applies to. - type: string - operator: - description: operator represents a key's - relationship to a set of values. Valid - operators are In, NotIn, Exists and - DoesNotExist. - type: string - values: - description: values is an array of string - values. If the operator is In or NotIn, - the values array must be non-empty. - If the operator is Exists or DoesNotExist, - the values array must be empty. This - array is replaced during a strategic - merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - fieldSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select objects. A selector - based on fields. - type: object - labelSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select objects. A selector - based on labels. - type: object - namespaces: - description: Namespaces is a set of namespace - to which objects belong. - items: - type: string - type: array - physicalMachines: - additionalProperties: - items: - type: string - type: array - description: PhysicalMachines is a map of string - keys and a set values that used to select - physical machines. The key defines the namespace - which physical machine belong, and each value - is a set of physical machine names. - type: object - type: object - stress-cpu: - properties: - load: - description: specifies P percent loading per - CPU worker. 0 is effectively a sleep (no load) - and 100 is full loading. - type: integer - options: - description: extend stress-ng options - items: - type: string - type: array - workers: - description: specifies N workers to apply the - stressor. - type: integer - type: object - stress-mem: - properties: - options: - description: extend stress-ng options - items: - type: string - type: array - size: - description: 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 - type: object - uid: - description: the experiment ID - type: string - user_defined: - properties: - attackCmd: - description: The command to be executed when - attack - type: string - recoverCmd: - description: The command to be executed when - recover - type: string - type: object - value: - description: Value is required when the mode is - set to `FixedMode` / `FixedPercentMode` / `RandomMaxPercentMode`. - If `FixedMode`, provide an integer of physical - machines to do chaos action. If `FixedPercentMode`, - provide a number from 0-100 to specify the percent - of physical machines the server can do chaos action. - IF `RandomMaxPercentMode`, provide a number from - 0-100 to specify the max percent of pods to do - chaos action - type: string - vm: - properties: - vm-name: - description: The name of the VM to be injected - type: string - type: object - required: - - action - - mode - type: object - podChaos: - description: PodChaosSpec defines the attributes that - a user creates on a chaos experiment about pods. - properties: - action: - description: 'Action defines the specific pod chaos - action. Supported action: pod-kill / pod-failure - / container-kill Default action: pod-kill' - enum: - - pod-kill - - pod-failure - - container-kill - type: string - containerNames: - description: ContainerNames indicates list of the - name of affected container. If not set, the first - container will be injected - items: - type: string - type: array - duration: - description: Duration represents the duration of - the chaos action. It is required when the action - is `PodFailureAction`. A duration string is a - possibly signed sequence of decimal numbers, each - with optional fraction and a unit suffix, such - as "300ms", "-1.5h" or "2h45m". Valid time units - are "ns", "us" (or "µs"), "ms", "s", "m", "h". - type: string - gracePeriod: - description: GracePeriod is used in pod-kill action. - It represents the duration in seconds before the - pod should be deleted. Value must be non-negative - integer. The default value is zero that indicates - delete immediately. - format: int64 - minimum: 0 - type: integer - mode: - description: 'Mode defines the mode to run chaos - action. Supported mode: one / all / fixed / fixed-percent - / random-max-percent' - enum: - - one - - all - - fixed - - fixed-percent - - random-max-percent - type: string - remoteCluster: - description: RemoteCluster represents the remote - cluster where the chaos will be deployed - type: string - selector: - description: Selector is used to select pods that - are used to inject chaos action. - properties: - annotationSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select objects. A selector - based on annotations. - type: object - expressionSelectors: - description: a slice of label selector expressions - that can be used to select objects. A list - of selectors based on set-based label expressions. - items: - description: A label selector requirement - is a selector that contains values, a key, - and an operator that relates the key and - values. - properties: - key: - description: key is the label key that - the selector applies to. - type: string - operator: - description: operator represents a key's - relationship to a set of values. Valid - operators are In, NotIn, Exists and - DoesNotExist. - type: string - values: - description: values is an array of string - values. If the operator is In or NotIn, - the values array must be non-empty. - If the operator is Exists or DoesNotExist, - the values array must be empty. This - array is replaced during a strategic - merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - fieldSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select objects. A selector - based on fields. - type: object - labelSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select objects. A selector - based on labels. - type: object - namespaces: - description: Namespaces is a set of namespace - to which objects belong. - items: - type: string - type: array - nodeSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select nodes. Selector which - must match a node's labels, and objects must - belong to these selected nodes. - type: object - nodes: - description: Nodes is a set of node name and - objects must belong to these nodes. - items: - type: string - type: array - podPhaseSelectors: - description: 'PodPhaseSelectors is a set of - condition of a pod at the current time. supported - value: Pending / Running / Succeeded / Failed - / Unknown' - items: - type: string - type: array - pods: - additionalProperties: - items: - type: string - type: array - description: Pods is a map of string keys and - a set values that used to select pods. The - key defines the namespace which pods belong, - and the each values is a set of pod names. - type: object - type: object - value: - description: Value is required when the mode is - set to `FixedMode` / `FixedPercentMode` / `RandomMaxPercentMode`. - If `FixedMode`, provide an integer of pods to - do chaos action. If `FixedPercentMode`, provide - a number from 0-100 to specify the percent of - pods the server can do chaos action. IF `RandomMaxPercentMode`, provide - a number from 0-100 to specify the max percent - of pods to do chaos action - type: string - required: - - action - - mode - - selector - type: object - schedule: - type: string - startingDeadlineSeconds: - format: int64 - minimum: 0 - nullable: true - type: integer - stressChaos: - description: StressChaosSpec defines the desired state - of StressChaos - properties: - containerNames: - description: ContainerNames indicates list of the - name of affected container. If not set, the first - container will be injected - items: - type: string - type: array - duration: - description: Duration represents the duration of - the chaos action - type: string - mode: - description: 'Mode defines the mode to run chaos - action. Supported mode: one / all / fixed / fixed-percent - / random-max-percent' - enum: - - one - - all - - fixed - - fixed-percent - - random-max-percent - type: string - remoteCluster: - description: RemoteCluster represents the remote - cluster where the chaos will be deployed - type: string - selector: - description: Selector is used to select pods that - are used to inject chaos action. - properties: - annotationSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select objects. A selector - based on annotations. - type: object - expressionSelectors: - description: a slice of label selector expressions - that can be used to select objects. A list - of selectors based on set-based label expressions. - items: - description: A label selector requirement - is a selector that contains values, a key, - and an operator that relates the key and - values. - properties: - key: - description: key is the label key that - the selector applies to. - type: string - operator: - description: operator represents a key's - relationship to a set of values. Valid - operators are In, NotIn, Exists and - DoesNotExist. - type: string - values: - description: values is an array of string - values. If the operator is In or NotIn, - the values array must be non-empty. - If the operator is Exists or DoesNotExist, - the values array must be empty. This - array is replaced during a strategic - merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - fieldSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select objects. A selector - based on fields. - type: object - labelSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select objects. A selector - based on labels. - type: object - namespaces: - description: Namespaces is a set of namespace - to which objects belong. - items: - type: string - type: array - nodeSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select nodes. Selector which - must match a node's labels, and objects must - belong to these selected nodes. - type: object - nodes: - description: Nodes is a set of node name and - objects must belong to these nodes. - items: - type: string - type: array - podPhaseSelectors: - description: 'PodPhaseSelectors is a set of - condition of a pod at the current time. supported - value: Pending / Running / Succeeded / Failed - / Unknown' - items: - type: string - type: array - pods: - additionalProperties: - items: - type: string - type: array - description: Pods is a map of string keys and - a set values that used to select pods. The - key defines the namespace which pods belong, - and the each values is a set of pod names. - type: object - type: object - stressngStressors: - description: StressngStressors defines plenty of - stressors just like `Stressors` except that it's - an experimental feature and more powerful. You - can define stressors in `stress-ng` (see also - `man stress-ng`) dialect, however not all of the - supported stressors are well tested. It maybe - retired in later releases. You should always use - `Stressors` to define the stressors and use this - only when you want more stressors unsupported - by `Stressors`. When both `StressngStressors` - and `Stressors` are defined, `StressngStressors` - wins. - type: string - stressors: - description: Stressors defines plenty of stressors - supported to stress system components out. You - can use one or more of them to make up various - kinds of stresses. At least one of the stressors - should be specified. - properties: - cpu: - description: CPUStressor stresses CPU out - properties: - load: - description: Load specifies P percent loading - per CPU worker. 0 is effectively a sleep - (no load) and 100 is full loading. - maximum: 100 - minimum: 0 - type: integer - options: - description: extend stress-ng options - items: - type: string - type: array - workers: - description: Workers specifies N workers - to apply the stressor. Maximum 8192 workers - can run by stress-ng - maximum: 8192 - type: integer - required: - - workers - type: object - memory: - description: MemoryStressor stresses virtual - memory out - properties: - oomScoreAdj: - default: 0 - description: OOMScoreAdj sets the oom_score_adj - of the stress process. See `man 5 proc` - to know more about this option. - maximum: 1000 - minimum: -1000 - type: integer - options: - description: extend stress-ng options - items: - type: string - type: array - size: - description: Size 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 - workers: - description: Workers specifies N workers - to apply the stressor. Maximum 8192 workers - can run by stress-ng - maximum: 8192 - type: integer - required: - - workers - type: object - type: object - value: - description: Value is required when the mode is - set to `FixedMode` / `FixedPercentMode` / `RandomMaxPercentMode`. - If `FixedMode`, provide an integer of pods to - do chaos action. If `FixedPercentMode`, provide - a number from 0-100 to specify the percent of - pods the server can do chaos action. IF `RandomMaxPercentMode`, provide - a number from 0-100 to specify the max percent - of pods to do chaos action - type: string - required: - - mode - - selector - type: object - timeChaos: - description: TimeChaosSpec defines the desired state - of TimeChaos - properties: - clockIds: - description: ClockIds defines all affected clock - id All available options are ["CLOCK_REALTIME","CLOCK_MONOTONIC","CLOCK_PROCESS_CPUTIME_ID","CLOCK_THREAD_CPUTIME_ID", - "CLOCK_MONOTONIC_RAW","CLOCK_REALTIME_COARSE","CLOCK_MONOTONIC_COARSE","CLOCK_BOOTTIME","CLOCK_REALTIME_ALARM", - "CLOCK_BOOTTIME_ALARM"] Default value is ["CLOCK_REALTIME"] - items: - type: string - type: array - containerNames: - description: ContainerNames indicates list of the - name of affected container. If not set, the first - container will be injected - items: - type: string - type: array - duration: - description: Duration represents the duration of - the chaos action - type: string - mode: - description: 'Mode defines the mode to run chaos - action. Supported mode: one / all / fixed / fixed-percent - / random-max-percent' - enum: - - one - - all - - fixed - - fixed-percent - - random-max-percent - type: string - remoteCluster: - description: RemoteCluster represents the remote - cluster where the chaos will be deployed - type: string - selector: - description: Selector is used to select pods that - are used to inject chaos action. - properties: - annotationSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select objects. A selector - based on annotations. - type: object - expressionSelectors: - description: a slice of label selector expressions - that can be used to select objects. A list - of selectors based on set-based label expressions. - items: - description: A label selector requirement - is a selector that contains values, a key, - and an operator that relates the key and - values. - properties: - key: - description: key is the label key that - the selector applies to. - type: string - operator: - description: operator represents a key's - relationship to a set of values. Valid - operators are In, NotIn, Exists and - DoesNotExist. - type: string - values: - description: values is an array of string - values. If the operator is In or NotIn, - the values array must be non-empty. - If the operator is Exists or DoesNotExist, - the values array must be empty. This - array is replaced during a strategic - merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - fieldSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select objects. A selector - based on fields. - type: object - labelSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select objects. A selector - based on labels. - type: object - namespaces: - description: Namespaces is a set of namespace - to which objects belong. - items: - type: string - type: array - nodeSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select nodes. Selector which - must match a node's labels, and objects must - belong to these selected nodes. - type: object - nodes: - description: Nodes is a set of node name and - objects must belong to these nodes. - items: - type: string - type: array - podPhaseSelectors: - description: 'PodPhaseSelectors is a set of - condition of a pod at the current time. supported - value: Pending / Running / Succeeded / Failed - / Unknown' - items: - type: string - type: array - pods: - additionalProperties: - items: - type: string - type: array - description: Pods is a map of string keys and - a set values that used to select pods. The - key defines the namespace which pods belong, - and the each values is a set of pod names. - type: object - type: object - timeOffset: - description: TimeOffset defines the delta time of - injected program. It's a possibly signed sequence - of decimal numbers, such as "300ms", "-1.5h" or - "2h45m". Valid time units are "ns", "us" (or "µs"), - "ms", "s", "m", "h". - type: string - value: - description: Value is required when the mode is - set to `FixedMode` / `FixedPercentMode` / `RandomMaxPercentMode`. - If `FixedMode`, provide an integer of pods to - do chaos action. If `FixedPercentMode`, provide - a number from 0-100 to specify the percent of - pods the server can do chaos action. IF `RandomMaxPercentMode`, provide - a number from 0-100 to specify the max percent - of pods to do chaos action - type: string - required: - - mode - - selector - - timeOffset - type: object - type: - type: string - required: - - schedule - - type - type: object - statusCheck: - description: StatusCheck describe the behavior of StatusCheck. - Only used when Type is TypeStatusCheck. - properties: - duration: - description: Duration defines the duration of the whole - status check if the number of failed execution does - not exceed the failure threshold. Duration is available - to both `Synchronous` and `Continuous` mode. A duration - string is a possibly signed sequence of decimal numbers, - each with optional fraction and a unit suffix, such - as "300ms", "-1.5h" or "2h45m". Valid time units are - "ns", "us" (or "µs"), "ms", "s", "m", "h". - type: string - failureThreshold: - default: 3 - description: FailureThreshold defines the minimum consecutive - failure for the status check to be considered failed. - minimum: 1 - type: integer - http: - properties: - body: - type: string - criteria: - description: Criteria defines how to determine the - result of the status check. - properties: - statusCode: - description: StatusCode defines the expected - http status code for the request. A statusCode - string could be a single code (e.g. 200), - or an inclusive range (e.g. 200-400, both - `200` and `400` are included). - type: string - required: - - statusCode - type: object - headers: - additionalProperties: - items: - type: string - type: array - description: "A Header represents the key-value - pairs in an HTTP header. \n The keys should be - in canonical form, as returned by CanonicalHeaderKey." - type: object - method: - default: GET - enum: - - GET - - POST - type: string - url: - type: string - required: - - criteria - - url - type: object - intervalSeconds: - default: 10 - description: IntervalSeconds defines how often (in seconds) - to perform an execution of status check. - minimum: 1 - type: integer - mode: - description: 'Mode defines the execution mode of the - status check. Support type: Synchronous / Continuous' - enum: - - Synchronous - - Continuous - type: string - recordsHistoryLimit: - default: 100 - description: RecordsHistoryLimit defines the number - of record to retain. - maximum: 1000 - minimum: 1 - type: integer - successThreshold: - default: 1 - description: SuccessThreshold defines the minimum consecutive - successes for the status check to be considered successful. - SuccessThreshold only works for `Synchronous` mode. - minimum: 1 - type: integer - timeoutSeconds: - default: 1 - description: TimeoutSeconds defines the number of seconds - after which an execution of status check times out. - minimum: 1 - type: integer - type: - default: HTTP - description: 'Type defines the specific status check - type. Support type: HTTP' - enum: - - HTTP - type: string - required: - - type - type: object - stressChaos: - description: StressChaosSpec defines the desired state of - StressChaos - properties: - containerNames: - description: ContainerNames indicates list of the name - of affected container. If not set, the first container - will be injected - items: - type: string - type: array - duration: - description: Duration represents the duration of the - chaos action - type: string - mode: - description: 'Mode defines the mode to run chaos action. - Supported mode: one / all / fixed / fixed-percent - / random-max-percent' - enum: - - one - - all - - fixed - - fixed-percent - - random-max-percent - type: string - remoteCluster: - description: RemoteCluster represents the remote cluster - where the chaos will be deployed - type: string - selector: - description: Selector is used to select pods that are - used to inject chaos action. - properties: - annotationSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select objects. A selector based - on annotations. - type: object - expressionSelectors: - description: a slice of label selector expressions - that can be used to select objects. A list of - selectors based on set-based label expressions. - items: - description: A label selector requirement is a - selector that contains values, a key, and an - operator that relates the key and values. - properties: - key: - description: key is the label key that the - selector applies to. - type: string - operator: - description: operator represents a key's relationship - to a set of values. Valid operators are - In, NotIn, Exists and DoesNotExist. - type: string - values: - description: values is an array of string - values. If the operator is In or NotIn, - the values array must be non-empty. If the - operator is Exists or DoesNotExist, the - values array must be empty. This array is - replaced during a strategic merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - fieldSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select objects. A selector based - on fields. - type: object - labelSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select objects. A selector based - on labels. - type: object - namespaces: - description: Namespaces is a set of namespace to - which objects belong. - items: - type: string - type: array - nodeSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select nodes. Selector which must - match a node's labels, and objects must belong - to these selected nodes. - type: object - nodes: - description: Nodes is a set of node name and objects - must belong to these nodes. - items: - type: string - type: array - podPhaseSelectors: - description: 'PodPhaseSelectors is a set of condition - of a pod at the current time. supported value: - Pending / Running / Succeeded / Failed / Unknown' - items: - type: string - type: array - pods: - additionalProperties: - items: - type: string - type: array - description: Pods is a map of string keys and a - set values that used to select pods. The key defines - the namespace which pods belong, and the each - values is a set of pod names. - type: object - type: object - stressngStressors: - description: StressngStressors defines plenty of stressors - just like `Stressors` except that it's an experimental - feature and more powerful. You can define stressors - in `stress-ng` (see also `man stress-ng`) dialect, - however not all of the supported stressors are well - tested. It maybe retired in later releases. You should - always use `Stressors` to define the stressors and - use this only when you want more stressors unsupported - by `Stressors`. When both `StressngStressors` and - `Stressors` are defined, `StressngStressors` wins. - type: string - stressors: - description: Stressors defines plenty of stressors supported - to stress system components out. You can use one or - more of them to make up various kinds of stresses. - At least one of the stressors should be specified. - properties: - cpu: - description: CPUStressor stresses CPU out - properties: - load: - description: Load specifies P percent loading - per CPU worker. 0 is effectively a sleep (no - load) and 100 is full loading. - maximum: 100 - minimum: 0 - type: integer - options: - description: extend stress-ng options - items: - type: string - type: array - workers: - description: Workers specifies N workers to - apply the stressor. Maximum 8192 workers can - run by stress-ng - maximum: 8192 - type: integer - required: - - workers - type: object - memory: - description: MemoryStressor stresses virtual memory - out - properties: - oomScoreAdj: - default: 0 - description: OOMScoreAdj sets the oom_score_adj - of the stress process. See `man 5 proc` to - know more about this option. - maximum: 1000 - minimum: -1000 - type: integer - options: - description: extend stress-ng options - items: - type: string - type: array - size: - description: Size 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 - workers: - description: Workers specifies N workers to - apply the stressor. Maximum 8192 workers can - run by stress-ng - maximum: 8192 - type: integer - required: - - workers - type: object - type: object - value: - description: Value is required when the mode is set - to `FixedMode` / `FixedPercentMode` / `RandomMaxPercentMode`. - If `FixedMode`, provide an integer of pods to do chaos - action. If `FixedPercentMode`, provide a number from - 0-100 to specify the percent of pods the server can - do chaos action. IF `RandomMaxPercentMode`, provide - a number from 0-100 to specify the max percent of - pods to do chaos action - type: string - required: - - mode - - selector - type: object - task: - description: Task describes the behavior of the custom task. - Only used when Type is TypeTask. - properties: - container: - description: Container is the main container image to - run in the pod - properties: - args: - description: 'Arguments to the entrypoint. The container - image''s CMD is used if this is not provided. - Variable references $(VAR_NAME) are expanded using - the container''s environment. If a variable cannot - be resolved, the reference in the input string - will be unchanged. Double $$ are reduced to a - single $, which allows for escaping the $(VAR_NAME) - syntax: i.e. "$$(VAR_NAME)" will produce the string - literal "$(VAR_NAME)". Escaped references will - never be expanded, regardless of whether the variable - exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell' - items: - type: string - type: array - command: - description: 'Entrypoint array. Not executed within - a shell. The container image''s ENTRYPOINT is - used if this is not provided. Variable references - $(VAR_NAME) are expanded using the container''s - environment. If a variable cannot be resolved, - the reference in the input string will be unchanged. - Double $$ are reduced to a single $, which allows - for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" - will produce the string literal "$(VAR_NAME)". - Escaped references will never be expanded, regardless - of whether the variable exists or not. Cannot - be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell' - items: - type: string - type: array - env: - description: List of environment variables to set - in the container. Cannot be updated. - items: - description: EnvVar represents an environment - variable present in a Container. - properties: - name: - description: Name of the environment variable. - Must be a C_IDENTIFIER. - type: string - value: - description: 'Variable references $(VAR_NAME) - are expanded using the previously defined - environment variables in the container and - any service environment variables. If a - variable cannot be resolved, the reference - in the input string will be unchanged. Double - $$ are reduced to a single $, which allows - for escaping the $(VAR_NAME) syntax: i.e. - "$$(VAR_NAME)" will produce the string literal - "$(VAR_NAME)". Escaped references will never - be expanded, regardless of whether the variable - exists or not. Defaults to "".' - type: string - valueFrom: - description: Source for the environment variable's - value. Cannot be used if value is not empty. - properties: - configMapKeyRef: - description: Selects a key of a ConfigMap. - properties: - key: - description: The key to select. - type: string - name: - description: 'Name of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, - kind, uid?' - type: string - optional: - description: Specify whether the ConfigMap - or its key must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - fieldRef: - description: 'Selects a field of the pod: - supports metadata.name, metadata.namespace, - `metadata.labels['''']`, `metadata.annotations['''']`, - spec.nodeName, spec.serviceAccountName, - status.hostIP, status.podIP, status.podIPs.' - properties: - apiVersion: - description: Version of the schema - the FieldPath is written in terms - of, defaults to "v1". - type: string - fieldPath: - description: Path of the field to - select in the specified API version. - type: string - required: - - fieldPath - type: object - x-kubernetes-map-type: atomic - resourceFieldRef: - description: 'Selects a resource of the - container: only resources limits and - requests (limits.cpu, limits.memory, - limits.ephemeral-storage, requests.cpu, - requests.memory and requests.ephemeral-storage) - are currently supported.' - properties: - containerName: - description: 'Container name: required - for volumes, optional for env vars' - type: string - divisor: - anyOf: - - type: integer - - type: string - description: Specifies the output - format of the exposed resources, - defaults to "1" - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - description: 'Required: resource to - select' - type: string - required: - - resource - type: object - x-kubernetes-map-type: atomic - secretKeyRef: - description: Selects a key of a secret - in the pod's namespace - properties: - key: - description: The key of the secret - to select from. Must be a valid - secret key. - type: string - name: - description: 'Name of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, - kind, uid?' - type: string - optional: - description: Specify whether the Secret - or its key must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - type: object - required: - - name - type: object - type: array - envFrom: - description: List of sources to populate environment - variables in the container. The keys defined within - a source must be a C_IDENTIFIER. All invalid keys - will be reported as an event when the container - is starting. When a key exists in multiple sources, - the value associated with the last source will - take precedence. Values defined by an Env with - a duplicate key will take precedence. Cannot be - updated. - items: - description: EnvFromSource represents the source - of a set of ConfigMaps - properties: - configMapRef: - description: The ConfigMap to select from - properties: - name: - description: 'Name of the referent. More - info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, - kind, uid?' - type: string - optional: - description: Specify whether the ConfigMap - must be defined - type: boolean - type: object - x-kubernetes-map-type: atomic - prefix: - description: An optional identifier to prepend - to each key in the ConfigMap. Must be a - C_IDENTIFIER. - type: string - secretRef: - description: The Secret to select from - properties: - name: - description: 'Name of the referent. More - info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, - kind, uid?' - type: string - optional: - description: Specify whether the Secret - must be defined - type: boolean - type: object - x-kubernetes-map-type: atomic - type: object - type: array - image: - description: 'Container image name. More info: https://kubernetes.io/docs/concepts/containers/images - This field is optional to allow higher level config - management to default or override container images - in workload controllers like Deployments and StatefulSets.' - type: string - imagePullPolicy: - description: 'Image pull policy. One of Always, - Never, IfNotPresent. Defaults to Always if :latest - tag is specified, or IfNotPresent otherwise. Cannot - be updated. More info: https://kubernetes.io/docs/concepts/containers/images#updating-images' - type: string - lifecycle: - description: Actions that the management system - should take in response to container lifecycle - events. Cannot be updated. - properties: - postStart: - description: 'PostStart is called immediately - after a container is created. If the handler - fails, the container is terminated and restarted - according to its restart policy. Other management - of the container blocks until the hook completes. - More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks' - properties: - exec: - description: Exec specifies the action to - take. - properties: - command: - description: Command is the command - line to execute inside the container, - the working directory for the command is - root ('/') in the container's filesystem. - The command is simply exec'd, it is - not run inside a shell, so traditional - shell instructions ('|', etc) won't - work. To use a shell, you need to - explicitly call out to that shell. - Exit status of 0 is treated as live/healthy - and non-zero is unhealthy. - items: - type: string - type: array - type: object - httpGet: - description: HTTPGet specifies the http - request to perform. - properties: - host: - description: Host name to connect to, - defaults to the pod IP. You probably - want to set "Host" in httpHeaders - instead. - type: string - httpHeaders: - description: Custom headers to set in - the request. HTTP allows repeated - headers. - items: - description: HTTPHeader describes - a custom header to be used in HTTP - probes - properties: - name: - description: The header field - name. This will be canonicalized - upon output, so case-variant - names will be understood as - the same header. - type: string - value: - description: The header field - value - type: string - required: - - name - - value - type: object - type: array - path: - description: Path to access on the HTTP - server. - type: string - port: - anyOf: - - type: integer - - type: string - description: Name or number of the port - to access on the container. Number - must be in the range 1 to 65535. Name - must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - scheme: - description: Scheme to use for connecting - to the host. Defaults to HTTP. - type: string - required: - - port - type: object - tcpSocket: - description: Deprecated. TCPSocket is NOT - supported as a LifecycleHandler and kept - for the backward compatibility. There - are no validation of this field and lifecycle - hooks will fail in runtime when tcp handler - is specified. - properties: - host: - description: 'Optional: Host name to - connect to, defaults to the pod IP.' - type: string - port: - anyOf: - - type: integer - - type: string - description: Number or name of the port - to access on the container. Number - must be in the range 1 to 65535. Name - must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - required: - - port - type: object - type: object - preStop: - description: 'PreStop is called immediately - before a container is terminated due to an - API request or management event such as liveness/startup - probe failure, preemption, resource contention, - etc. The handler is not called if the container - crashes or exits. The Pod''s termination grace - period countdown begins before the PreStop - hook is executed. Regardless of the outcome - of the handler, the container will eventually - terminate within the Pod''s termination grace - period (unless delayed by finalizers). Other - management of the container blocks until the - hook completes or until the termination grace - period is reached. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks' - properties: - exec: - description: Exec specifies the action to - take. - properties: - command: - description: Command is the command - line to execute inside the container, - the working directory for the command is - root ('/') in the container's filesystem. - The command is simply exec'd, it is - not run inside a shell, so traditional - shell instructions ('|', etc) won't - work. To use a shell, you need to - explicitly call out to that shell. - Exit status of 0 is treated as live/healthy - and non-zero is unhealthy. - items: - type: string - type: array - type: object - httpGet: - description: HTTPGet specifies the http - request to perform. - properties: - host: - description: Host name to connect to, - defaults to the pod IP. You probably - want to set "Host" in httpHeaders - instead. - type: string - httpHeaders: - description: Custom headers to set in - the request. HTTP allows repeated - headers. - items: - description: HTTPHeader describes - a custom header to be used in HTTP - probes - properties: - name: - description: The header field - name. This will be canonicalized - upon output, so case-variant - names will be understood as - the same header. - type: string - value: - description: The header field - value - type: string - required: - - name - - value - type: object - type: array - path: - description: Path to access on the HTTP - server. - type: string - port: - anyOf: - - type: integer - - type: string - description: Name or number of the port - to access on the container. Number - must be in the range 1 to 65535. Name - must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - scheme: - description: Scheme to use for connecting - to the host. Defaults to HTTP. - type: string - required: - - port - type: object - tcpSocket: - description: Deprecated. TCPSocket is NOT - supported as a LifecycleHandler and kept - for the backward compatibility. There - are no validation of this field and lifecycle - hooks will fail in runtime when tcp handler - is specified. - properties: - host: - description: 'Optional: Host name to - connect to, defaults to the pod IP.' - type: string - port: - anyOf: - - type: integer - - type: string - description: Number or name of the port - to access on the container. Number - must be in the range 1 to 65535. Name - must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - required: - - port - type: object - type: object - type: object - livenessProbe: - description: 'Periodic probe of container liveness. - Container will be restarted if the probe fails. - Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' - properties: - exec: - description: Exec specifies the action to take. - properties: - command: - description: Command is the command line - to execute inside the container, the working - directory for the command is root ('/') - in the container's filesystem. The command - is simply exec'd, it is not run inside - a shell, so traditional shell instructions - ('|', etc) won't work. To use a shell, - you need to explicitly call out to that - shell. Exit status of 0 is treated as - live/healthy and non-zero is unhealthy. - items: - type: string - type: array - type: object - failureThreshold: - description: Minimum consecutive failures for - the probe to be considered failed after having - succeeded. Defaults to 3. Minimum value is - 1. - format: int32 - type: integer - grpc: - description: GRPC specifies an action involving - a GRPC port. - properties: - port: - description: Port number of the gRPC service. - Number must be in the range 1 to 65535. - format: int32 - type: integer - service: - description: "Service is the name of the - service to place in the gRPC HealthCheckRequest - (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). - \n If this is not specified, the default - behavior is defined by gRPC." - type: string - required: - - port - type: object - httpGet: - description: HTTPGet specifies the http request - to perform. - properties: - host: - description: Host name to connect to, defaults - to the pod IP. You probably want to set - "Host" in httpHeaders instead. - type: string - httpHeaders: - description: Custom headers to set in the - request. HTTP allows repeated headers. - items: - description: HTTPHeader describes a custom - header to be used in HTTP probes - properties: - name: - description: The header field name. - This will be canonicalized upon - output, so case-variant names will - be understood as the same header. - type: string - value: - description: The header field value - type: string - required: - - name - - value - type: object - type: array - path: - description: Path to access on the HTTP - server. - type: string - port: - anyOf: - - type: integer - - type: string - description: Name or number of the port - to access on the container. Number must - be in the range 1 to 65535. Name must - be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - scheme: - description: Scheme to use for connecting - to the host. Defaults to HTTP. - type: string - required: - - port - type: object - initialDelaySeconds: - description: 'Number of seconds after the container - has started before liveness probes are initiated. - More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' - format: int32 - type: integer - periodSeconds: - description: How often (in seconds) to perform - the probe. Default to 10 seconds. Minimum - value is 1. - format: int32 - type: integer - successThreshold: - description: Minimum consecutive successes for - the probe to be considered successful after - having failed. Defaults to 1. Must be 1 for - liveness and startup. Minimum value is 1. - format: int32 - type: integer - tcpSocket: - description: TCPSocket specifies an action involving - a TCP port. - properties: - host: - description: 'Optional: Host name to connect - to, defaults to the pod IP.' - type: string - port: - anyOf: - - type: integer - - type: string - description: Number or name of the port - to access on the container. Number must - be in the range 1 to 65535. Name must - be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - required: - - port - type: object - terminationGracePeriodSeconds: - description: Optional duration in seconds the - pod needs to terminate gracefully upon probe - failure. The grace period is the duration - in seconds after the processes running in - the pod are sent a termination signal and - the time when the processes are forcibly halted - with a kill signal. Set this value longer - than the expected cleanup time for your process. - If this value is nil, the pod's terminationGracePeriodSeconds - will be used. Otherwise, this value overrides - the value provided by the pod spec. Value - must be non-negative integer. The value zero - indicates stop immediately via the kill signal - (no opportunity to shut down). This is a beta - field and requires enabling ProbeTerminationGracePeriod - feature gate. Minimum value is 1. spec.terminationGracePeriodSeconds - is used if unset. - format: int64 - type: integer - timeoutSeconds: - description: 'Number of seconds after which - the probe times out. Defaults to 1 second. - Minimum value is 1. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' - format: int32 - type: integer - type: object - name: - description: Name of the container specified as - a DNS_LABEL. Each container in a pod must have - a unique name (DNS_LABEL). Cannot be updated. - type: string - ports: - description: List of ports to expose from the container. - Not specifying a port here DOES NOT prevent that - port from being exposed. Any port which is listening - on the default "0.0.0.0" address inside a container - will be accessible from the network. Modifying - this array with strategic merge patch may corrupt - the data. For more information See https://github.com/kubernetes/kubernetes/issues/108255. - Cannot be updated. - items: - description: ContainerPort represents a network - port in a single container. - properties: - containerPort: - description: Number of port to expose on the - pod's IP address. This must be a valid port - number, 0 < x < 65536. - format: int32 - type: integer - hostIP: - description: What host IP to bind the external - port to. - type: string - hostPort: - description: Number of port to expose on the - host. If specified, this must be a valid - port number, 0 < x < 65536. If HostNetwork - is specified, this must match ContainerPort. - Most containers do not need this. - format: int32 - type: integer - name: - description: If specified, this must be an - IANA_SVC_NAME and unique within the pod. - Each named port in a pod must have a unique - name. Name for the port that can be referred - to by services. - type: string - protocol: - default: TCP - description: Protocol for port. Must be UDP, - TCP, or SCTP. Defaults to "TCP". - type: string - required: - - containerPort - type: object - type: array - x-kubernetes-list-map-keys: - - containerPort - - protocol - x-kubernetes-list-type: map - readinessProbe: - description: 'Periodic probe of container service - readiness. Container will be removed from service - endpoints if the probe fails. Cannot be updated. - More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' - properties: - exec: - description: Exec specifies the action to take. - properties: - command: - description: Command is the command line - to execute inside the container, the working - directory for the command is root ('/') - in the container's filesystem. The command - is simply exec'd, it is not run inside - a shell, so traditional shell instructions - ('|', etc) won't work. To use a shell, - you need to explicitly call out to that - shell. Exit status of 0 is treated as - live/healthy and non-zero is unhealthy. - items: - type: string - type: array - type: object - failureThreshold: - description: Minimum consecutive failures for - the probe to be considered failed after having - succeeded. Defaults to 3. Minimum value is - 1. - format: int32 - type: integer - grpc: - description: GRPC specifies an action involving - a GRPC port. - properties: - port: - description: Port number of the gRPC service. - Number must be in the range 1 to 65535. - format: int32 - type: integer - service: - description: "Service is the name of the - service to place in the gRPC HealthCheckRequest - (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). - \n If this is not specified, the default - behavior is defined by gRPC." - type: string - required: - - port - type: object - httpGet: - description: HTTPGet specifies the http request - to perform. - properties: - host: - description: Host name to connect to, defaults - to the pod IP. You probably want to set - "Host" in httpHeaders instead. - type: string - httpHeaders: - description: Custom headers to set in the - request. HTTP allows repeated headers. - items: - description: HTTPHeader describes a custom - header to be used in HTTP probes - properties: - name: - description: The header field name. - This will be canonicalized upon - output, so case-variant names will - be understood as the same header. - type: string - value: - description: The header field value - type: string - required: - - name - - value - type: object - type: array - path: - description: Path to access on the HTTP - server. - type: string - port: - anyOf: - - type: integer - - type: string - description: Name or number of the port - to access on the container. Number must - be in the range 1 to 65535. Name must - be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - scheme: - description: Scheme to use for connecting - to the host. Defaults to HTTP. - type: string - required: - - port - type: object - initialDelaySeconds: - description: 'Number of seconds after the container - has started before liveness probes are initiated. - More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' - format: int32 - type: integer - periodSeconds: - description: How often (in seconds) to perform - the probe. Default to 10 seconds. Minimum - value is 1. - format: int32 - type: integer - successThreshold: - description: Minimum consecutive successes for - the probe to be considered successful after - having failed. Defaults to 1. Must be 1 for - liveness and startup. Minimum value is 1. - format: int32 - type: integer - tcpSocket: - description: TCPSocket specifies an action involving - a TCP port. - properties: - host: - description: 'Optional: Host name to connect - to, defaults to the pod IP.' - type: string - port: - anyOf: - - type: integer - - type: string - description: Number or name of the port - to access on the container. Number must - be in the range 1 to 65535. Name must - be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - required: - - port - type: object - terminationGracePeriodSeconds: - description: Optional duration in seconds the - pod needs to terminate gracefully upon probe - failure. The grace period is the duration - in seconds after the processes running in - the pod are sent a termination signal and - the time when the processes are forcibly halted - with a kill signal. Set this value longer - than the expected cleanup time for your process. - If this value is nil, the pod's terminationGracePeriodSeconds - will be used. Otherwise, this value overrides - the value provided by the pod spec. Value - must be non-negative integer. The value zero - indicates stop immediately via the kill signal - (no opportunity to shut down). This is a beta - field and requires enabling ProbeTerminationGracePeriod - feature gate. Minimum value is 1. spec.terminationGracePeriodSeconds - is used if unset. - format: int64 - type: integer - timeoutSeconds: - description: 'Number of seconds after which - the probe times out. Defaults to 1 second. - Minimum value is 1. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' - format: int32 - type: integer - type: object - resizePolicy: - description: Resources resize policy for the container. - items: - description: ContainerResizePolicy represents - resource resize policy for the container. - properties: - resourceName: - description: 'Name of the resource to which - this resource resize policy applies. Supported - values: cpu, memory.' - type: string - restartPolicy: - description: Restart policy to apply when - specified resource is resized. If not specified, - it defaults to NotRequired. - type: string - required: - - resourceName - - restartPolicy - type: object - type: array - x-kubernetes-list-type: atomic - resources: - description: 'Compute Resources required by this - container. Cannot be updated. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' - properties: - claims: - description: "Claims lists the names of resources, - defined in spec.resourceClaims, that are used - by this container. \n This is an alpha field - and requires enabling the DynamicResourceAllocation - feature gate. \n This field is immutable. - It can only be set for containers." - items: - description: ResourceClaim references one - entry in PodSpec.ResourceClaims. - properties: - name: - description: Name must match the name - of one entry in pod.spec.resourceClaims - of the Pod where this field is used. - It makes that resource available inside - a container. - type: string - required: - - name - type: object - type: array - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Limits describes the maximum amount - of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Requests describes the minimum - amount of compute resources required. If Requests - is omitted for a container, it defaults to - Limits if that is explicitly specified, otherwise - to an implementation-defined value. Requests - cannot exceed Limits. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' - type: object - type: object - restartPolicy: - description: 'RestartPolicy defines the restart - behavior of individual containers in a pod. This - field may only be set for init containers, and - the only allowed value is "Always". For non-init - containers or when this field is not specified, - the restart behavior is defined by the Pod''s - restart policy and the container type. Setting - the RestartPolicy as "Always" for the init container - will have the following effect: this init container - will be continually restarted on exit until all - regular containers have terminated. Once all regular - containers have completed, all init containers - with restartPolicy "Always" will be shut down. - This lifecycle differs from normal init containers - and is often referred to as a "sidecar" container. - Although this init container still starts in the - init container sequence, it does not wait for - the container to complete before proceeding to - the next init container. Instead, the next init - container starts immediately after this init container - is started, or after any startupProbe has successfully - completed.' - type: string - 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/' - properties: - allowPrivilegeEscalation: - description: 'AllowPrivilegeEscalation controls - whether a process can gain more privileges - than its parent process. This bool directly - controls if the no_new_privs flag will be - set on the container process. AllowPrivilegeEscalation - is true always when the container is: 1) run - as Privileged 2) has CAP_SYS_ADMIN Note that - this field cannot be set when spec.os.name - is windows.' - type: boolean - capabilities: - description: The capabilities to add/drop when - running containers. Defaults to the default - set of capabilities granted by the container - runtime. Note that this field cannot be set - when spec.os.name is windows. - properties: - add: - description: Added capabilities - items: - description: Capability represent POSIX - capabilities type - type: string - type: array - drop: - description: Removed capabilities - items: - description: Capability represent POSIX - capabilities type - type: string - type: array - type: object - privileged: - description: Run container in privileged mode. - Processes in privileged containers are essentially - equivalent to root on the host. Defaults to - false. Note that this field cannot be set - when spec.os.name is windows. - type: boolean - procMount: - description: procMount denotes the type of proc - mount to use for the containers. The default - is DefaultProcMount which uses the container - runtime defaults for readonly paths and masked - paths. This requires the ProcMountType feature - flag to be enabled. Note that this field cannot - be set when spec.os.name is windows. - type: string - readOnlyRootFilesystem: - description: Whether this container has a read-only - root filesystem. Default is false. Note that - this field cannot be set when spec.os.name - is windows. - type: boolean - runAsGroup: - description: The GID to run the entrypoint of - the container process. Uses runtime default - if unset. May also be set in PodSecurityContext. If - set in both SecurityContext and PodSecurityContext, - the value specified in SecurityContext takes - precedence. Note that this field cannot be - set when spec.os.name is windows. - format: int64 - type: integer - runAsNonRoot: - description: Indicates that the container must - run as a non-root user. If true, the Kubelet - will validate the image at runtime to ensure - that it does not run as UID 0 (root) and fail - to start the container if it does. If unset - or false, no such validation will be performed. - May also be set in PodSecurityContext. If - set in both SecurityContext and PodSecurityContext, - the value specified in SecurityContext takes - precedence. - type: boolean - runAsUser: - description: The UID to run the entrypoint of - the container process. Defaults to user specified - in image metadata if unspecified. May also - be set in PodSecurityContext. If set in both - SecurityContext and PodSecurityContext, the - value specified in SecurityContext takes precedence. - Note that this field cannot be set when spec.os.name - is windows. - format: int64 - type: integer - seLinuxOptions: - description: The SELinux context to be applied - to the container. If unspecified, the container - runtime will allocate a random SELinux context - for each container. May also be set in PodSecurityContext. If - set in both SecurityContext and PodSecurityContext, - the value specified in SecurityContext takes - precedence. Note that this field cannot be - set when spec.os.name is windows. - properties: - level: - description: Level is SELinux level label - that applies to the container. - type: string - role: - description: Role is a SELinux role label - that applies to the container. - type: string - type: - description: Type is a SELinux type label - that applies to the container. - type: string - user: - description: User is a SELinux user label - that applies to the container. - type: string - type: object - seccompProfile: - description: The seccomp options to use by this - container. If seccomp options are provided - at both the pod & container level, the container - options override the pod options. Note that - this field cannot be set when spec.os.name - is windows. - properties: - localhostProfile: - description: localhostProfile indicates - a profile defined in a file on the node - should be used. The profile must be preconfigured - on the node to work. Must be a descending - path, relative to the kubelet's configured - seccomp profile location. Must be set - if type is "Localhost". Must NOT be set - for any other type. - type: string - type: - description: "type indicates which kind - of seccomp profile will be applied. Valid - options are: \n Localhost - a profile - defined in a file on the node should be - used. RuntimeDefault - the container runtime - default profile should be used. Unconfined - - no profile should be applied." - type: string - required: - - type - type: object - windowsOptions: - description: The Windows specific settings applied - to all containers. If unspecified, the options - from the PodSecurityContext will be used. - If set in both SecurityContext and PodSecurityContext, - the value specified in SecurityContext takes - precedence. Note that this field cannot be - set when spec.os.name is linux. - properties: - gmsaCredentialSpec: - description: GMSACredentialSpec is where - the GMSA admission webhook (https://github.com/kubernetes-sigs/windows-gmsa) - inlines the contents of the GMSA credential - spec named by the GMSACredentialSpecName - field. - type: string - gmsaCredentialSpecName: - description: GMSACredentialSpecName is the - name of the GMSA credential spec to use. - type: string - hostProcess: - description: HostProcess determines if a - container should be run as a 'Host Process' - container. All of a Pod's containers must - have the same effective HostProcess value - (it is not allowed to have a mix of HostProcess - containers and non-HostProcess containers). - In addition, if HostProcess is true then - HostNetwork must also be set to true. - type: boolean - runAsUserName: - description: The UserName in Windows to - run the entrypoint of the container process. - Defaults to the user specified in image - metadata if unspecified. May also be set - in PodSecurityContext. If set in both - SecurityContext and PodSecurityContext, - the value specified in SecurityContext - takes precedence. - type: string - type: object - type: object - startupProbe: - description: 'StartupProbe indicates that the Pod - has successfully initialized. If specified, no - other probes are executed until this completes - successfully. If this probe fails, the Pod will - be restarted, just as if the livenessProbe failed. - This can be used to provide different probe parameters - at the beginning of a Pod''s lifecycle, when it - might take a long time to load data or warm a - cache, than during steady-state operation. This - cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' - properties: - exec: - description: Exec specifies the action to take. - properties: - command: - description: Command is the command line - to execute inside the container, the working - directory for the command is root ('/') - in the container's filesystem. The command - is simply exec'd, it is not run inside - a shell, so traditional shell instructions - ('|', etc) won't work. To use a shell, - you need to explicitly call out to that - shell. Exit status of 0 is treated as - live/healthy and non-zero is unhealthy. - items: - type: string - type: array - type: object - failureThreshold: - description: Minimum consecutive failures for - the probe to be considered failed after having - succeeded. Defaults to 3. Minimum value is - 1. - format: int32 - type: integer - grpc: - description: GRPC specifies an action involving - a GRPC port. - properties: - port: - description: Port number of the gRPC service. - Number must be in the range 1 to 65535. - format: int32 - type: integer - service: - description: "Service is the name of the - service to place in the gRPC HealthCheckRequest - (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). - \n If this is not specified, the default - behavior is defined by gRPC." - type: string - required: - - port - type: object - httpGet: - description: HTTPGet specifies the http request - to perform. - properties: - host: - description: Host name to connect to, defaults - to the pod IP. You probably want to set - "Host" in httpHeaders instead. - type: string - httpHeaders: - description: Custom headers to set in the - request. HTTP allows repeated headers. - items: - description: HTTPHeader describes a custom - header to be used in HTTP probes - properties: - name: - description: The header field name. - This will be canonicalized upon - output, so case-variant names will - be understood as the same header. - type: string - value: - description: The header field value - type: string - required: - - name - - value - type: object - type: array - path: - description: Path to access on the HTTP - server. - type: string - port: - anyOf: - - type: integer - - type: string - description: Name or number of the port - to access on the container. Number must - be in the range 1 to 65535. Name must - be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - scheme: - description: Scheme to use for connecting - to the host. Defaults to HTTP. - type: string - required: - - port - type: object - initialDelaySeconds: - description: 'Number of seconds after the container - has started before liveness probes are initiated. - More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' - format: int32 - type: integer - periodSeconds: - description: How often (in seconds) to perform - the probe. Default to 10 seconds. Minimum - value is 1. - format: int32 - type: integer - successThreshold: - description: Minimum consecutive successes for - the probe to be considered successful after - having failed. Defaults to 1. Must be 1 for - liveness and startup. Minimum value is 1. - format: int32 - type: integer - tcpSocket: - description: TCPSocket specifies an action involving - a TCP port. - properties: - host: - description: 'Optional: Host name to connect - to, defaults to the pod IP.' - type: string - port: - anyOf: - - type: integer - - type: string - description: Number or name of the port - to access on the container. Number must - be in the range 1 to 65535. Name must - be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - required: - - port - type: object - terminationGracePeriodSeconds: - description: Optional duration in seconds the - pod needs to terminate gracefully upon probe - failure. The grace period is the duration - in seconds after the processes running in - the pod are sent a termination signal and - the time when the processes are forcibly halted - with a kill signal. Set this value longer - than the expected cleanup time for your process. - If this value is nil, the pod's terminationGracePeriodSeconds - will be used. Otherwise, this value overrides - the value provided by the pod spec. Value - must be non-negative integer. The value zero - indicates stop immediately via the kill signal - (no opportunity to shut down). This is a beta - field and requires enabling ProbeTerminationGracePeriod - feature gate. Minimum value is 1. spec.terminationGracePeriodSeconds - is used if unset. - format: int64 - type: integer - timeoutSeconds: - description: 'Number of seconds after which - the probe times out. Defaults to 1 second. - Minimum value is 1. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' - format: int32 - type: integer - type: object - stdin: - description: Whether this container should allocate - a buffer for stdin in the container runtime. If - this is not set, reads from stdin in the container - will always result in EOF. Default is false. - type: boolean - stdinOnce: - description: Whether the container runtime should - close the stdin channel after it has been opened - by a single attach. When stdin is true the stdin - stream will remain open across multiple attach - sessions. If stdinOnce is set to true, stdin is - opened on container start, is empty until the - first client attaches to stdin, and then remains - open and accepts data until the client disconnects, - at which time stdin is closed and remains closed - until the container is restarted. If this flag - is false, a container processes that reads from - stdin will never receive an EOF. Default is false - type: boolean - terminationMessagePath: - description: 'Optional: Path at which the file to - which the container''s termination message will - be written is mounted into the container''s filesystem. - Message written is intended to be brief final - status, such as an assertion failure message. - Will be truncated by the node if greater than - 4096 bytes. The total message length across all - containers will be limited to 12kb. Defaults to - /dev/termination-log. Cannot be updated.' - type: string - terminationMessagePolicy: - description: Indicate how the termination message - should be populated. File will use the contents - of terminationMessagePath to populate the container - status message on both success and failure. FallbackToLogsOnError - will use the last chunk of container log output - if the termination message file is empty and the - container exited with an error. The log output - is limited to 2048 bytes or 80 lines, whichever - is smaller. Defaults to File. Cannot be updated. - type: string - tty: - description: Whether this container should allocate - a TTY for itself, also requires 'stdin' to be - true. Default is false. - type: boolean - volumeDevices: - description: volumeDevices is the list of block - devices to be used by the container. - items: - description: volumeDevice describes a mapping - of a raw block device within a container. - properties: - devicePath: - description: devicePath is the path inside - of the container that the device will be - mapped to. - type: string - name: - description: name must match the name of a - persistentVolumeClaim in the pod - type: string - required: - - devicePath - - name - type: object - type: array - volumeMounts: - description: Pod volumes to mount into the container's - filesystem. Cannot be updated. - items: - description: VolumeMount describes a mounting - of a Volume within a container. - properties: - mountPath: - description: Path within the container at - which the volume should be mounted. Must - not contain ':'. - type: string - mountPropagation: - description: mountPropagation determines how - mounts are propagated from the host to container - and the other way around. When not set, - MountPropagationNone is used. This field - is beta in 1.10. - type: string - name: - description: This must match the Name of a - Volume. - type: string - readOnly: - description: Mounted read-only if true, read-write - otherwise (false or unspecified). Defaults - to false. - type: boolean - subPath: - description: Path within the volume from which - the container's volume should be mounted. - Defaults to "" (volume's root). - type: string - subPathExpr: - description: Expanded path within the volume - from which the container's volume should - be mounted. Behaves similarly to SubPath - but environment variable references $(VAR_NAME) - are expanded using the container's environment. - Defaults to "" (volume's root). SubPathExpr - and SubPath are mutually exclusive. - type: string - required: - - mountPath - - name - type: object - type: array - workingDir: - description: Container's working directory. If not - specified, the container runtime's default will - be used, which might be configured in the container - image. Cannot be updated. - type: string - required: - - name - type: object - volumes: - description: Volumes is a list of volumes that can be - mounted by containers in a template. - items: - description: Volume represents a named volume in a - pod that may be accessed by any container in the - pod. - properties: - awsElasticBlockStore: - description: 'awsElasticBlockStore represents - an AWS Disk resource that is attached to a kubelet''s - host machine and then exposed to the pod. More - info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore' - properties: - fsType: - description: 'fsType is the filesystem type - of the volume that you want to mount. Tip: - Ensure that the filesystem type is supported - by the host operating system. Examples: - "ext4", "xfs", "ntfs". Implicitly inferred - to be "ext4" if unspecified. More info: - https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore - TODO: how do we prevent errors in the filesystem - from compromising the machine' - type: string - partition: - description: 'partition is the partition in - the volume that you want to mount. If omitted, - the default is to mount by volume name. - Examples: For volume /dev/sda1, you specify - the partition as "1". Similarly, the volume - partition for /dev/sda is "0" (or you can - leave the property empty).' - format: int32 - type: integer - readOnly: - description: 'readOnly value true will force - the readOnly setting in VolumeMounts. More - info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore' - type: boolean - volumeID: - description: 'volumeID is unique ID of the - persistent disk resource in AWS (Amazon - EBS volume). More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore' - type: string - required: - - volumeID - type: object - azureDisk: - description: azureDisk represents an Azure Data - Disk mount on the host and bind mount to the - pod. - properties: - cachingMode: - description: 'cachingMode is the Host Caching - mode: None, Read Only, Read Write.' - type: string - diskName: - description: diskName is the Name of the data - disk in the blob storage - type: string - diskURI: - description: diskURI is the URI of data disk - in the blob storage - type: string - fsType: - description: fsType is Filesystem type to - mount. Must be a filesystem type supported - by the host operating system. Ex. "ext4", - "xfs", "ntfs". Implicitly inferred to be - "ext4" if unspecified. - type: string - kind: - description: 'kind expected values are Shared: - multiple blob disks per storage account Dedicated: - single blob disk per storage account Managed: - azure managed data disk (only in managed - availability set). defaults to shared' - type: string - readOnly: - description: readOnly Defaults to false (read/write). - ReadOnly here will force the ReadOnly setting - in VolumeMounts. - type: boolean - required: - - diskName - - diskURI - type: object - azureFile: - description: azureFile represents an Azure File - Service mount on the host and bind mount to - the pod. - properties: - readOnly: - description: readOnly defaults to false (read/write). - ReadOnly here will force the ReadOnly setting - in VolumeMounts. - type: boolean - secretName: - description: secretName is the name of secret - that contains Azure Storage Account Name - and Key - type: string - shareName: - description: shareName is the azure share - Name - type: string - required: - - secretName - - shareName - type: object - cephfs: - description: cephFS represents a Ceph FS mount - on the host that shares a pod's lifetime - properties: - monitors: - description: 'monitors is Required: Monitors - is a collection of Ceph monitors More info: - https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' - items: - type: string - type: array - path: - description: 'path is Optional: Used as the - mounted root, rather than the full Ceph - tree, default is /' - type: string - readOnly: - description: 'readOnly is Optional: Defaults - to false (read/write). ReadOnly here will - force the ReadOnly setting in VolumeMounts. - More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' - type: boolean - secretFile: - description: 'secretFile is Optional: SecretFile - is the path to key ring for User, default - is /etc/ceph/user.secret More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' - type: string - secretRef: - description: 'secretRef is Optional: SecretRef - is reference to the authentication secret - for User, default is empty. More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' - properties: - name: - description: 'Name of the referent. More - info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, - kind, uid?' - type: string - type: object - x-kubernetes-map-type: atomic - user: - description: 'user is optional: User is the - rados user name, default is admin More info: - https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' - type: string - required: - - monitors - type: object - cinder: - description: 'cinder represents a cinder volume - attached and mounted on kubelets host machine. - More info: https://examples.k8s.io/mysql-cinder-pd/README.md' - properties: - fsType: - description: 'fsType is the filesystem type - to mount. Must be a filesystem type supported - by the host operating system. Examples: - "ext4", "xfs", "ntfs". Implicitly inferred - to be "ext4" if unspecified. More info: - https://examples.k8s.io/mysql-cinder-pd/README.md' - type: string - readOnly: - description: 'readOnly defaults to false (read/write). - ReadOnly here will force the ReadOnly setting - in VolumeMounts. More info: https://examples.k8s.io/mysql-cinder-pd/README.md' - type: boolean - secretRef: - description: 'secretRef is optional: points - to a secret object containing parameters - used to connect to OpenStack.' - properties: - name: - description: 'Name of the referent. More - info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, - kind, uid?' - type: string - type: object - x-kubernetes-map-type: atomic - volumeID: - description: 'volumeID used to identify the - volume in cinder. More info: https://examples.k8s.io/mysql-cinder-pd/README.md' - type: string - required: - - volumeID - type: object - configMap: - description: configMap represents a configMap - that should populate this volume - properties: - defaultMode: - description: 'defaultMode is optional: mode - bits used to set permissions on created - files by default. Must be an octal value - between 0000 and 0777 or a decimal value - between 0 and 511. YAML accepts both octal - and decimal values, JSON requires decimal - values for mode bits. Defaults to 0644. - Directories within the path are not affected - by this setting. This might be in conflict - with other options that affect the file - mode, like fsGroup, and the result can be - other mode bits set.' - format: int32 - type: integer - items: - description: items if unspecified, each key-value - pair in the Data field of the referenced - ConfigMap will be projected into the volume - as a file whose name is the key and content - is the value. If specified, the listed keys - will be projected into the specified paths, - and unlisted keys will not be present. If - a key is specified which is not present - in the ConfigMap, the volume setup will - error unless it is marked optional. Paths - must be relative and may not contain the - '..' path or start with '..'. - items: - description: Maps a string key to a path - within a volume. - properties: - key: - description: key is the key to project. - type: string - mode: - description: 'mode is Optional: mode - bits used to set permissions on this - file. Must be an octal value between - 0000 and 0777 or a decimal value between - 0 and 511. YAML accepts both octal - and decimal values, JSON requires - decimal values for mode bits. If not - specified, the volume defaultMode - will be used. This might be in conflict - with other options that affect the - file mode, like fsGroup, and the result - can be other mode bits set.' - format: int32 - type: integer - path: - description: path is the relative path - of the file to map the key to. May - not be an absolute path. May not contain - the path element '..'. May not start - with the string '..'. - type: string - required: - - key - - path - type: object - 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?' - type: string - optional: - description: optional specify whether the - ConfigMap or its keys must be defined - type: boolean - type: object - x-kubernetes-map-type: atomic - csi: - description: csi (Container Storage Interface) - represents ephemeral storage that is handled - by certain external CSI drivers (Beta feature). - 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: fsType to mount. Ex. "ext4", - "xfs", "ntfs". If not provided, the empty - value is passed to the associated CSI driver - which will determine the default filesystem - to apply. - type: string - nodePublishSecretRef: - description: nodePublishSecretRef is a reference - to the secret object containing sensitive - information to pass to the CSI driver to - complete the CSI NodePublishVolume and NodeUnpublishVolume - calls. This field is optional, and may - be empty if no secret is required. If the - secret object contains more than one secret, - all secret references are passed. - properties: - name: - description: 'Name of the referent. More - info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, - kind, uid?' - type: string - type: object - x-kubernetes-map-type: atomic - readOnly: - description: readOnly specifies a read-only - configuration for the volume. Defaults to - false (read/write). - 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. - type: object - required: - - driver - type: object - downwardAPI: - description: downwardAPI represents downward API - about the pod that should populate this volume - 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.' - format: int32 - type: integer - items: - description: Items is a list of downward API - volume file - items: - description: DownwardAPIVolumeFile represents - information to create the file containing - the pod field - properties: - fieldRef: - description: 'Required: Selects a field - of the pod: only annotations, labels, - name and namespace are supported.' - properties: - apiVersion: - description: Version of the schema - the FieldPath is written in terms - of, defaults to "v1". - type: string - fieldPath: - description: Path of the field to - select in the specified API version. - type: string - required: - - fieldPath - type: object - x-kubernetes-map-type: atomic - 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.' - format: int32 - 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 (limits.cpu, limits.memory, - requests.cpu and requests.memory) - are currently supported.' - properties: - containerName: - description: 'Container name: required - for volumes, optional for env - vars' - type: string - divisor: - anyOf: - - type: integer - - type: string - description: Specifies the output - format of the exposed resources, - defaults to "1" - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - description: 'Required: resource - to select' - type: string - required: - - resource - type: object - x-kubernetes-map-type: atomic - required: - - path - type: object - type: array - type: object - emptyDir: - description: 'emptyDir represents a temporary - directory that shares a pod''s lifetime. More - info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir' - properties: - medium: - description: 'medium represents what type - of storage medium should back this directory. - The default is "" which means to use the - node''s default medium. Must be an empty - string (default) or Memory. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir' - type: string - sizeLimit: - anyOf: - - type: integer - - type: string - description: 'sizeLimit is the total amount - of local storage required for this EmptyDir - volume. The size limit is also applicable - for memory medium. The maximum usage on - memory medium EmptyDir would be the minimum - value between the SizeLimit specified here - and the sum of memory limits of all containers - in a pod. The default is nil which means - that the limit is undefined. More info: - https://kubernetes.io/docs/concepts/storage/volumes#emptydir' - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - ephemeral: - description: "ephemeral represents a volume that - is handled by a cluster storage driver. The - volume's lifecycle is tied to the pod that defines - it - it will be created before the pod starts, - and deleted when the pod is removed. \n 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). - \n Use PersistentVolumeClaim or one of the vendor-specific - APIs for volumes that persist for longer than - the lifecycle of an individual pod. \n 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. \n A pod can use both types of - ephemeral volumes and persistent volumes at - the same time." - properties: - volumeClaimTemplate: - description: "Will be used to create a stand-alone - PVC to provision the volume. The pod in - which this EphemeralVolumeSource is embedded - will be the owner of the PVC, i.e. the PVC - will be deleted together with the pod. The - name of the PVC will be `-` where `` is the name - from the `PodSpec.Volumes` array entry. - Pod validation will reject the pod if the - concatenated name is not valid for a PVC - (for example, too long). \n 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. \n This field is read-only - and no changes will be made by Kubernetes - to the PVC after it has been created. \n - Required, must not be nil." - properties: - metadata: - description: May contain labels and annotations - that will be copied into the PVC when - creating it. No other fields are allowed - and will be rejected during validation. - type: object - spec: - description: The specification for the - PersistentVolumeClaim. The entire content - is copied unchanged into the PVC that - gets created from this template. The - same fields as in a PersistentVolumeClaim - are also valid here. - 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' - items: - type: string - type: array - dataSource: - description: 'dataSource field can - be used to specify either: * An - existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot) - * An existing PVC (PersistentVolumeClaim) - If the provisioner or an external - controller can support the specified - data source, it will create a new - volume based on the contents of - the specified data source. When - the AnyVolumeDataSource feature - gate is enabled, dataSource contents - will be copied to dataSourceRef, - and dataSourceRef contents will - be copied to dataSource when dataSourceRef.namespace - is not specified. If the namespace - is specified, then dataSourceRef - will not be copied to dataSource.' - properties: - apiGroup: - description: APIGroup is the group - for the resource being referenced. - If APIGroup is not specified, - the specified Kind must be in - the core API group. For any - other third-party types, APIGroup - is required. - type: string - kind: - description: Kind is the type - of resource being referenced - type: string - name: - description: Name is the name - of resource being referenced - type: string - required: - - kind - - name - type: object - x-kubernetes-map-type: atomic - dataSourceRef: - description: 'dataSourceRef specifies - the object from which to populate - the volume with data, if a non-empty - volume is desired. This may be any - object from a non-empty API group - (non core object) or a PersistentVolumeClaim - object. When this field is specified, - volume binding will only succeed - if the type of the specified object - matches some installed volume populator - or dynamic provisioner. This field - will replace the functionality of - the dataSource field and as such - if both fields are non-empty, they - must have the same value. For backwards - compatibility, when namespace isn''t - specified in dataSourceRef, both - fields (dataSource and dataSourceRef) - will be set to the same value automatically - if one of them is empty and the - other is non-empty. When namespace - is specified in dataSourceRef, dataSource - isn''t set to the same value and - must be empty. There are three important - differences between dataSource and - dataSourceRef: * While dataSource - only allows two specific types of - objects, dataSourceRef 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. * While dataSource - only allows local objects, dataSourceRef - allows objects in any namespaces. - (Beta) Using this field requires - the AnyVolumeDataSource feature - gate to be enabled. (Alpha) Using - the namespace field of dataSourceRef - requires the CrossNamespaceVolumeDataSource - feature gate to be enabled.' - properties: - apiGroup: - description: APIGroup is the group - for the resource being referenced. - If APIGroup is not specified, - the specified Kind must be in - the core API group. For any - other third-party types, APIGroup - is required. - type: string - kind: - description: Kind is the type - of resource being referenced - type: string - name: - description: Name is the name - of resource being referenced - type: string - namespace: - description: Namespace is the - namespace of resource being - referenced Note that when a - namespace is specified, a gateway.networking.k8s.io/ReferenceGrant - object is required in the referent - namespace to allow that namespace's - owner to accept the reference. - See the ReferenceGrant documentation - for details. (Alpha) This field - requires the CrossNamespaceVolumeDataSource - feature gate to be enabled. - type: string - required: - - kind - - name - type: object - resources: - 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' - properties: - claims: - description: "Claims lists the - names of resources, defined - in spec.resourceClaims, that - are used by this container. - \n This is an alpha field and - requires enabling the DynamicResourceAllocation - feature gate. \n This field - is immutable. It can only be - set for containers." - items: - description: ResourceClaim references - one entry in PodSpec.ResourceClaims. - properties: - name: - description: Name must match - the name of one entry - in pod.spec.resourceClaims - of the Pod where this - field is used. It makes - that resource available - inside a container. - type: string - required: - - name - type: object - type: array - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Limits describes - the maximum amount of compute - resources allowed. More info: - https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Requests describes - the minimum amount of compute - resources required. If Requests - is omitted for a container, - it defaults to Limits if that - is explicitly specified, otherwise - to an implementation-defined - value. Requests cannot exceed - Limits. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' - type: object - type: object - selector: - description: selector is a label query - over volumes to consider for binding. - properties: - matchExpressions: - description: matchExpressions - is a list of label selector - requirements. The requirements - are ANDed. - items: - description: A label selector - requirement is a selector - that contains values, a key, - and an operator that relates - the key and values. - properties: - key: - description: key is the - label key that the selector - applies to. - type: string - operator: - description: operator represents - a key's relationship to - a set of values. Valid - operators are In, NotIn, - Exists and DoesNotExist. - type: string - values: - description: values is an - array of string values. - If the operator is In - or NotIn, the values array - must be non-empty. If - the operator is Exists - or DoesNotExist, the values - array must be empty. This - array is replaced during - a strategic merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a - map of {key,value} pairs. A - single {key,value} in the matchLabels - map is equivalent to an element - of matchExpressions, whose key - field is "key", the operator - is "In", and the values array - contains only "value". The requirements - are ANDed. - type: object - type: object - x-kubernetes-map-type: atomic - storageClassName: - description: 'storageClassName is - the name of the StorageClass required - by the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1' - type: string - volumeMode: - description: volumeMode defines what - type of volume is required by the - claim. Value of Filesystem is implied - when not included in claim spec. - type: string - volumeName: - description: volumeName is the binding - reference to the PersistentVolume - backing this claim. - type: string - type: object - required: - - spec - type: object - type: object - fc: - description: fc represents a Fibre Channel resource - that is attached to a kubelet's host machine - and then exposed to the pod. - properties: - fsType: - description: 'fsType is the filesystem type - to mount. Must be a filesystem type supported - by the host operating system. Ex. "ext4", - "xfs", "ntfs". Implicitly inferred to be - "ext4" if unspecified. TODO: how do we prevent - errors in the filesystem from compromising - the machine' - type: string - lun: - description: 'lun is Optional: FC target lun - number' - format: int32 - type: integer - readOnly: - description: 'readOnly is Optional: Defaults - to false (read/write). ReadOnly here will - force the ReadOnly setting in VolumeMounts.' - type: boolean - targetWWNs: - description: 'targetWWNs is Optional: FC target - worldwide names (WWNs)' - items: - type: string - type: array - wwids: - description: 'wwids Optional: FC volume world - wide identifiers (wwids) Either wwids or - combination of targetWWNs and lun must be - set, but not both simultaneously.' - items: - type: string - type: array - type: object - flexVolume: - description: flexVolume represents a generic volume - resource that is provisioned/attached using - an exec based plugin. - properties: - driver: - description: driver is the name of the driver - to use for this volume. - type: string - fsType: - description: fsType is the filesystem type - to mount. Must be a filesystem type supported - by the host operating system. Ex. "ext4", - "xfs", "ntfs". The default filesystem depends - on FlexVolume script. - type: string - options: - additionalProperties: - type: string - description: 'options is Optional: this field - holds extra command options if any.' - type: object - readOnly: - description: 'readOnly is Optional: defaults - to false (read/write). ReadOnly here will - force the ReadOnly setting in VolumeMounts.' - type: boolean - secretRef: - description: 'secretRef is Optional: secretRef - is reference to the secret object containing - sensitive information to pass to the plugin - scripts. This may be empty if no secret - object is specified. If the secret object - contains more than one secret, all secrets - are passed to the plugin scripts.' - properties: - name: - description: 'Name of the referent. More - info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, - kind, uid?' - type: string - type: object - x-kubernetes-map-type: atomic - required: - - driver - type: object - flocker: - description: flocker represents a Flocker volume - attached to a kubelet's host machine. This depends - on the Flocker control service being running - properties: - datasetName: - description: datasetName is Name of the dataset - stored as metadata -> name on the dataset - for Flocker should be considered as deprecated - type: string - datasetUUID: - description: datasetUUID is the UUID of the - dataset. This is unique identifier of a - Flocker dataset - type: string - type: object - gcePersistentDisk: - description: 'gcePersistentDisk represents a GCE - Disk resource that is attached to a kubelet''s - host machine and then exposed to the pod. More - info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' - properties: - fsType: - description: 'fsType is filesystem type of - the volume that you want to mount. Tip: - Ensure that the filesystem type is supported - by the host operating system. Examples: - "ext4", "xfs", "ntfs". Implicitly inferred - to be "ext4" if unspecified. More info: - https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk - TODO: how do we prevent errors in the filesystem - from compromising the machine' - type: string - partition: - description: 'partition is the partition in - the volume that you want to mount. If omitted, - the default is to mount by volume name. - Examples: For volume /dev/sda1, you specify - the partition as "1". Similarly, the volume - partition for /dev/sda is "0" (or you can - leave the property empty). More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' - format: int32 - type: integer - pdName: - description: 'pdName is unique name of the - PD resource in GCE. Used to identify the - disk in GCE. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' - type: string - readOnly: - description: 'readOnly here will force the - ReadOnly setting in VolumeMounts. Defaults - to false. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' - type: boolean - required: - - pdName - type: object - gitRepo: - description: 'gitRepo represents a git repository - at a particular revision. DEPRECATED: GitRepo - is deprecated. To provision a container with - a git repo, mount an EmptyDir into an InitContainer - that clones the repo using git, then mount the - EmptyDir into the Pod''s container.' - properties: - directory: - description: directory is the target directory - name. Must not contain or start with '..'. If - '.' is supplied, the volume directory will - be the git repository. Otherwise, if specified, - the volume will contain the git repository - in the subdirectory with the given name. - type: string - repository: - description: repository is the URL - type: string - revision: - description: revision is the commit hash for - the specified revision. - type: string - required: - - repository - type: object - glusterfs: - description: 'glusterfs represents a Glusterfs - mount on the host that shares a pod''s lifetime. - More info: https://examples.k8s.io/volumes/glusterfs/README.md' - properties: - endpoints: - description: 'endpoints is the endpoint name - that details Glusterfs topology. More info: - https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod' - type: string - path: - description: 'path is the Glusterfs volume - path. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod' - type: string - readOnly: - description: 'readOnly here will force the - Glusterfs volume to be mounted with read-only - permissions. Defaults to false. More info: - https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod' - type: boolean - required: - - endpoints - - path - type: object - hostPath: - description: 'hostPath represents a pre-existing - file or directory on the host machine that is - directly exposed to the container. This is generally - used for system agents or other privileged things - that are allowed to see the host machine. Most - containers will NOT need this. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath - --- TODO(jonesdl) We need to restrict who can - use host directory mounts and who can/can not - mount host directories as read/write.' - properties: - path: - description: 'path of the directory on the - host. If the path is a symlink, it will - follow the link to the real path. More info: - https://kubernetes.io/docs/concepts/storage/volumes#hostpath' - type: string - type: - description: 'type for HostPath Volume Defaults - to "" More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath' - type: string - required: - - path - type: object - iscsi: - description: 'iscsi represents an ISCSI Disk resource - that is attached to a kubelet''s host machine - and then exposed to the pod. More info: https://examples.k8s.io/volumes/iscsi/README.md' - properties: - chapAuthDiscovery: - description: chapAuthDiscovery defines whether - support iSCSI Discovery CHAP authentication - type: boolean - chapAuthSession: - description: chapAuthSession defines whether - support iSCSI Session CHAP authentication - type: boolean - fsType: - description: 'fsType is the filesystem type - of the volume that you want to mount. Tip: - Ensure that the filesystem type is supported - by the host operating system. Examples: - "ext4", "xfs", "ntfs". Implicitly inferred - to be "ext4" if unspecified. More info: - https://kubernetes.io/docs/concepts/storage/volumes#iscsi - TODO: how do we prevent errors in the filesystem - from compromising the machine' - type: string - initiatorName: - description: initiatorName is the custom iSCSI - Initiator Name. If initiatorName is specified - with iscsiInterface simultaneously, new - iSCSI interface : will be created for the connection. - type: string - iqn: - description: iqn is the target iSCSI Qualified - Name. - type: string - iscsiInterface: - description: iscsiInterface is the interface - Name that uses an iSCSI transport. Defaults - to 'default' (tcp). - type: string - lun: - description: lun represents iSCSI Target Lun - number. - format: int32 - type: integer - portals: - description: portals is the iSCSI Target Portal - List. The portal is either an IP or ip_addr:port - if the port is other than default (typically - TCP ports 860 and 3260). - items: - type: string - type: array - readOnly: - description: readOnly here will force the - ReadOnly setting in VolumeMounts. Defaults - to false. - type: boolean - secretRef: - description: secretRef is the CHAP Secret - for iSCSI target and initiator authentication - properties: - name: - description: 'Name of the referent. More - info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, - kind, uid?' - type: string - type: object - x-kubernetes-map-type: atomic - targetPortal: - description: targetPortal is iSCSI Target - Portal. The Portal is either an IP or ip_addr:port - if the port is other than default (typically - TCP ports 860 and 3260). - type: string - required: - - iqn - - lun - - targetPortal - type: object - name: - description: 'name of the volume. Must be a DNS_LABEL - and unique within the pod. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' - type: string - nfs: - description: 'nfs represents an NFS mount on the - host that shares a pod''s lifetime More info: - https://kubernetes.io/docs/concepts/storage/volumes#nfs' - properties: - path: - description: 'path that is exported by the - NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' - type: string - readOnly: - description: 'readOnly here will force the - NFS export to be mounted with read-only - permissions. Defaults to false. More info: - https://kubernetes.io/docs/concepts/storage/volumes#nfs' - type: boolean - server: - description: 'server is the hostname or IP - address of the NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' - type: string - required: - - path - - server - type: object - persistentVolumeClaim: - description: 'persistentVolumeClaimVolumeSource - represents a reference to a PersistentVolumeClaim - in the same namespace. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims' - 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: readOnly Will force the ReadOnly - setting in VolumeMounts. Default false. - type: boolean - required: - - claimName - type: object - photonPersistentDisk: - description: photonPersistentDisk represents a - PhotonController persistent disk attached and - mounted on kubelets host machine - properties: - fsType: - description: fsType is the filesystem type - to mount. Must be a filesystem type supported - by the host operating system. Ex. "ext4", - "xfs", "ntfs". Implicitly inferred to be - "ext4" if unspecified. - type: string - pdID: - description: pdID is the ID that identifies - Photon Controller persistent disk - type: string - required: - - pdID - type: object - portworxVolume: - description: portworxVolume represents a portworx - volume attached and mounted on kubelets host - machine - 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: readOnly defaults to false (read/write). - ReadOnly here will force the ReadOnly setting - in VolumeMounts. - type: boolean - volumeID: - description: volumeID uniquely identifies - a Portworx volume - type: string - required: - - volumeID - type: object - projected: - description: projected items for all in one resources - secrets, configmaps, and downward API - properties: - defaultMode: - description: defaultMode are the mode bits - used to set permissions on created files - by default. Must be an octal value between - 0000 and 0777 or a decimal value between - 0 and 511. YAML accepts both octal and decimal - values, JSON requires decimal values for - mode bits. Directories within the path are - not affected by this setting. This might - be in conflict with other options that affect - the file mode, like fsGroup, and the result - can be other mode bits set. - format: int32 - type: integer - sources: - description: sources is the list of volume - projections - items: - description: Projection that may be projected - along with other supported volume types - properties: - configMap: - description: configMap information about - the configMap data to project - properties: - items: - description: items if unspecified, - each key-value pair in the Data - field of the referenced ConfigMap - will be projected into the volume - as a file whose name is the key - and content is the value. If specified, - the listed keys will be projected - into the specified paths, and - unlisted keys will not be present. - If a key is specified which is - not present in the ConfigMap, - the volume setup will error unless - it is marked optional. Paths must - be relative and may not contain - the '..' path or start with '..'. - items: - description: Maps a string key - to a path within a volume. - properties: - key: - description: key is the key - to project. - type: string - mode: - description: 'mode is Optional: - mode bits used to set permissions - on this file. Must be an - octal value between 0000 - and 0777 or a decimal value - between 0 and 511. YAML - accepts both octal and decimal - values, JSON requires decimal - values for mode bits. If - not specified, the volume - defaultMode will be used. - This might be in conflict - with other options that - affect the file mode, like - fsGroup, and the result - can be other mode bits set.' - format: int32 - type: integer - path: - description: path is the relative - path of the file to map - the key to. May not be an - absolute path. May not contain - the path element '..'. May - not start with the string - '..'. - type: string - required: - - key - - path - type: object - 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?' - type: string - optional: - description: optional specify whether - the ConfigMap or its keys must - be defined - type: boolean - type: object - x-kubernetes-map-type: atomic - downwardAPI: - description: downwardAPI information - about the downwardAPI data to project - properties: - items: - description: Items is a list of - DownwardAPIVolume file - items: - description: DownwardAPIVolumeFile - represents information to create - the file containing the pod - field - properties: - fieldRef: - description: 'Required: Selects - a field of the pod: only - annotations, labels, name - and namespace are supported.' - properties: - apiVersion: - description: Version of - the schema the FieldPath - is written in terms - of, defaults to "v1". - type: string - fieldPath: - description: Path of the - field to select in the - specified API version. - type: string - required: - - fieldPath - type: object - x-kubernetes-map-type: atomic - 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.' - format: int32 - 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 (limits.cpu, - limits.memory, requests.cpu - and requests.memory) are - currently supported.' - properties: - containerName: - description: 'Container - name: required for volumes, - optional for env vars' - type: string - divisor: - anyOf: - - type: integer - - type: string - description: Specifies - the output format of - the exposed resources, - defaults to "1" - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - description: 'Required: - resource to select' - type: string - required: - - resource - type: object - x-kubernetes-map-type: atomic - required: - - path - type: object - type: array - type: object - secret: - description: secret information about - the secret data to project - properties: - items: - description: items if unspecified, - each key-value pair in the Data - field of the referenced Secret - will be projected into the volume - as a file whose name is the key - and content is the value. If specified, - the listed keys will be projected - into the specified paths, and - unlisted keys will not be present. - If a key is specified which is - not present in the Secret, the - volume setup will error unless - it is marked optional. Paths must - be relative and may not contain - the '..' path or start with '..'. - items: - description: Maps a string key - to a path within a volume. - properties: - key: - description: key is the key - to project. - type: string - mode: - description: 'mode is Optional: - mode bits used to set permissions - on this file. Must be an - octal value between 0000 - and 0777 or a decimal value - between 0 and 511. YAML - accepts both octal and decimal - values, JSON requires decimal - values for mode bits. If - not specified, the volume - defaultMode will be used. - This might be in conflict - with other options that - affect the file mode, like - fsGroup, and the result - can be other mode bits set.' - format: int32 - type: integer - path: - description: path is the relative - path of the file to map - the key to. May not be an - absolute path. May not contain - the path element '..'. May - not start with the string - '..'. - type: string - required: - - key - - path - type: object - 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?' - type: string - optional: - description: optional field specify - whether the Secret or its key - must be defined - type: boolean - type: object - x-kubernetes-map-type: atomic - serviceAccountToken: - description: serviceAccountToken is - information about the serviceAccountToken - data to project - properties: - audience: - description: audience is the intended - audience of the token. A recipient - of a token must identify itself - with an identifier specified in - the audience of the token, and - otherwise should reject the token. - The audience defaults to the identifier - of the apiserver. - type: string - expirationSeconds: - description: expirationSeconds is - the requested duration of validity - of the service account token. - As the token approaches expiration, - the kubelet volume plugin will - proactively rotate the service - account token. The kubelet will - start trying to rotate the token - if the token is older than 80 - percent of its time to live or - if the token is older than 24 - hours.Defaults to 1 hour and must - be at least 10 minutes. - format: int64 - type: integer - path: - description: path is the path relative - to the mount point of the file - to project the token into. - type: string - required: - - path - type: object - type: object - type: array - type: object - quobyte: - description: quobyte represents a Quobyte mount - on the host that shares a pod's lifetime - properties: - group: - description: group to map volume access to - Default is no group - type: string - readOnly: - description: readOnly here will force the - Quobyte volume to be mounted with read-only - permissions. Defaults to false. - type: boolean - registry: - description: registry represents a single - or multiple Quobyte Registry services specified - as a string as host:port pair (multiple - entries are separated with commas) which - acts as the central registry for volumes - type: string - tenant: - description: tenant owning the given Quobyte - volume in the Backend Used with dynamically - provisioned Quobyte volumes, value is set - by the plugin - type: string - user: - description: user to map volume access to - Defaults to serivceaccount user - type: string - volume: - description: volume is a string that references - an already created Quobyte volume by name. - type: string - required: - - registry - - volume - type: object - rbd: - description: 'rbd represents a Rados Block Device - mount on the host that shares a pod''s lifetime. - More info: https://examples.k8s.io/volumes/rbd/README.md' - properties: - fsType: - description: 'fsType is the filesystem type - of the volume that you want to mount. Tip: - Ensure that the filesystem type is supported - by the host operating system. Examples: - "ext4", "xfs", "ntfs". Implicitly inferred - to be "ext4" if unspecified. More info: - https://kubernetes.io/docs/concepts/storage/volumes#rbd - TODO: how do we prevent errors in the filesystem - from compromising the machine' - type: string - image: - description: 'image is the rados image name. - More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' - type: string - keyring: - description: 'keyring is the path to key ring - for RBDUser. Default is /etc/ceph/keyring. - More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' - type: string - monitors: - description: 'monitors is 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: 'pool is the rados pool name. - Default is rbd. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' - type: string - readOnly: - description: 'readOnly here will force the - ReadOnly setting in VolumeMounts. Defaults - to false. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' - type: boolean - secretRef: - description: 'secretRef is name of the authentication - secret for RBDUser. If provided overrides - keyring. Default is nil. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' - properties: - name: - description: 'Name of the referent. More - info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, - kind, uid?' - type: string - type: object - x-kubernetes-map-type: atomic - user: - description: 'user is the rados user name. - Default is admin. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' - type: string - required: - - image - - monitors - type: object - scaleIO: - description: scaleIO represents a ScaleIO persistent - volume attached and mounted on Kubernetes nodes. - properties: - fsType: - description: fsType is the filesystem type - to mount. Must be a filesystem type supported - by the host operating system. Ex. "ext4", - "xfs", "ntfs". Default is "xfs". - type: string - gateway: - description: gateway is the host address of - the ScaleIO API Gateway. - type: string - protectionDomain: - description: protectionDomain is the name - of the ScaleIO Protection Domain for the - configured storage. - type: string - readOnly: - description: readOnly Defaults to false (read/write). - ReadOnly here will force the ReadOnly setting - in VolumeMounts. - type: boolean - secretRef: - description: secretRef references to the secret - for ScaleIO user and other sensitive information. - If this is not provided, Login operation - will fail. - properties: - name: - description: 'Name of the referent. More - info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, - kind, uid?' - type: string - type: object - x-kubernetes-map-type: atomic - sslEnabled: - description: sslEnabled Flag enable/disable - SSL communication with Gateway, default - false - type: boolean - storageMode: - description: storageMode indicates whether - the storage for a volume should be ThickProvisioned - or ThinProvisioned. Default is ThinProvisioned. - type: string - storagePool: - description: storagePool is the ScaleIO Storage - Pool associated with the protection domain. - type: string - system: - description: system is the name of the storage - system as configured in ScaleIO. - type: string - volumeName: - description: volumeName is the name of a volume - already created in the ScaleIO system that - is associated with this volume source. - type: string - required: - - gateway - - secretRef - - system - type: object - secret: - description: 'secret represents a secret that - should populate this volume. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret' - properties: - defaultMode: - description: 'defaultMode is Optional: mode - bits used to set permissions on created - files by default. Must be an octal value - between 0000 and 0777 or a decimal value - between 0 and 511. YAML accepts both octal - and decimal values, JSON requires decimal - values for mode bits. Defaults to 0644. - Directories within the path are not affected - by this setting. This might be in conflict - with other options that affect the file - mode, like fsGroup, and the result can be - other mode bits set.' - format: int32 - type: integer - items: - description: items If unspecified, each key-value - pair in the Data field of the referenced - Secret will be projected into the volume - as a file whose name is the key and content - is the value. If specified, the listed keys - will be projected into the specified paths, - and unlisted keys will not be present. If - a key is specified which is not present - in the Secret, the volume setup will error - unless it is marked optional. Paths must - be relative and may not contain the '..' - path or start with '..'. - items: - description: Maps a string key to a path - within a volume. - properties: - key: - description: key is the key to project. - type: string - mode: - description: 'mode is Optional: mode - bits used to set permissions on this - file. Must be an octal value between - 0000 and 0777 or a decimal value between - 0 and 511. YAML accepts both octal - and decimal values, JSON requires - decimal values for mode bits. If not - specified, the volume defaultMode - will be used. This might be in conflict - with other options that affect the - file mode, like fsGroup, and the result - can be other mode bits set.' - format: int32 - type: integer - path: - description: path is the relative path - of the file to map the key to. May - not be an absolute path. May not contain - the path element '..'. May not start - with the string '..'. - type: string - required: - - key - - path - type: object - type: array - optional: - description: optional field specify whether - the Secret or its keys must be defined - type: boolean - secretName: - description: 'secretName is the name of the - secret in the pod''s namespace to use. More - info: https://kubernetes.io/docs/concepts/storage/volumes#secret' - type: string - type: object - storageos: - description: storageOS represents a StorageOS - volume attached and mounted on Kubernetes nodes. - properties: - fsType: - description: fsType is the filesystem type - to mount. Must be a filesystem type supported - by the host operating system. Ex. "ext4", - "xfs", "ntfs". Implicitly inferred to be - "ext4" if unspecified. - type: string - readOnly: - description: readOnly defaults to false (read/write). - ReadOnly here will force the ReadOnly setting - in VolumeMounts. - type: boolean - secretRef: - description: secretRef specifies the secret - to use for obtaining the StorageOS API credentials. If - not specified, default values will be attempted. - properties: - name: - description: 'Name of the referent. More - info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, - kind, uid?' - type: string - type: object - x-kubernetes-map-type: atomic - volumeName: - description: volumeName is the human-readable - name of the StorageOS volume. Volume names - are only unique within a namespace. - type: string - volumeNamespace: - description: volumeNamespace specifies the - scope of the volume within StorageOS. If - no namespace is specified then the Pod's - namespace will be used. This allows the - Kubernetes name scoping to be mirrored within - StorageOS for tighter integration. Set VolumeName - to any name to override the default behaviour. - Set to "default" if you are not using namespaces - within StorageOS. Namespaces that do not - pre-exist within StorageOS will be created. - type: string - type: object - vsphereVolume: - description: vsphereVolume represents a vSphere - volume attached and mounted on kubelets host - machine - properties: - fsType: - description: fsType is filesystem type to - mount. Must be a filesystem type supported - by the host operating system. Ex. "ext4", - "xfs", "ntfs". Implicitly inferred to be - "ext4" if unspecified. - type: string - storagePolicyID: - description: storagePolicyID is the storage - Policy Based Management (SPBM) profile ID - associated with the StoragePolicyName. - type: string - storagePolicyName: - description: storagePolicyName is the storage - Policy Based Management (SPBM) profile name. - type: string - volumePath: - description: volumePath is the path that identifies - vSphere volume vmdk - type: string - required: - - volumePath - type: object - required: - - name - type: object - type: array - type: object - templateType: - type: string - timeChaos: - description: TimeChaosSpec defines the desired state of - TimeChaos - properties: - clockIds: - description: ClockIds defines all affected clock id - All available options are ["CLOCK_REALTIME","CLOCK_MONOTONIC","CLOCK_PROCESS_CPUTIME_ID","CLOCK_THREAD_CPUTIME_ID", - "CLOCK_MONOTONIC_RAW","CLOCK_REALTIME_COARSE","CLOCK_MONOTONIC_COARSE","CLOCK_BOOTTIME","CLOCK_REALTIME_ALARM", - "CLOCK_BOOTTIME_ALARM"] Default value is ["CLOCK_REALTIME"] - items: - type: string - type: array - containerNames: - description: ContainerNames indicates list of the name - of affected container. If not set, the first container - will be injected - items: - type: string - type: array - duration: - description: Duration represents the duration of the - chaos action - type: string - mode: - description: 'Mode defines the mode to run chaos action. - Supported mode: one / all / fixed / fixed-percent - / random-max-percent' - enum: - - one - - all - - fixed - - fixed-percent - - random-max-percent - type: string - remoteCluster: - description: RemoteCluster represents the remote cluster - where the chaos will be deployed - type: string - selector: - description: Selector is used to select pods that are - used to inject chaos action. - properties: - annotationSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select objects. A selector based - on annotations. - type: object - expressionSelectors: - description: a slice of label selector expressions - that can be used to select objects. A list of - selectors based on set-based label expressions. - items: - description: A label selector requirement is a - selector that contains values, a key, and an - operator that relates the key and values. - properties: - key: - description: key is the label key that the - selector applies to. - type: string - operator: - description: operator represents a key's relationship - to a set of values. Valid operators are - In, NotIn, Exists and DoesNotExist. - type: string - values: - description: values is an array of string - values. If the operator is In or NotIn, - the values array must be non-empty. If the - operator is Exists or DoesNotExist, the - values array must be empty. This array is - replaced during a strategic merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - fieldSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select objects. A selector based - on fields. - type: object - labelSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select objects. A selector based - on labels. - type: object - namespaces: - description: Namespaces is a set of namespace to - which objects belong. - items: - type: string - type: array - nodeSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select nodes. Selector which must - match a node's labels, and objects must belong - to these selected nodes. - type: object - nodes: - description: Nodes is a set of node name and objects - must belong to these nodes. - items: - type: string - type: array - podPhaseSelectors: - description: 'PodPhaseSelectors is a set of condition - of a pod at the current time. supported value: - Pending / Running / Succeeded / Failed / Unknown' - items: - type: string - type: array - pods: - additionalProperties: - items: - type: string - type: array - description: Pods is a map of string keys and a - set values that used to select pods. The key defines - the namespace which pods belong, and the each - values is a set of pod names. - type: object - type: object - timeOffset: - description: TimeOffset defines the delta time of injected - program. It's a possibly signed sequence of decimal - numbers, such as "300ms", "-1.5h" or "2h45m". Valid - time units are "ns", "us" (or "µs"), "ms", "s", "m", - "h". - type: string - value: - description: Value is required when the mode is set - to `FixedMode` / `FixedPercentMode` / `RandomMaxPercentMode`. - If `FixedMode`, provide an integer of pods to do chaos - action. If `FixedPercentMode`, provide a number from - 0-100 to specify the percent of pods the server can - do chaos action. IF `RandomMaxPercentMode`, provide - a number from 0-100 to specify the max percent of - pods to do chaos action - type: string - required: - - mode - - selector - - timeOffset - type: object - required: - - name - - templateType - type: object - type: array - required: - - entry - - templates - type: object - required: - - schedule - - type - type: object - status: - description: ScheduleStatus is the status of a schedule object - properties: - active: - items: - description: "ObjectReference contains enough information to let - you inspect or modify the referred object. --- New uses of this - type are discouraged because of difficulty describing its usage - when embedded in APIs. 1. Ignored fields. It includes many fields - which are not generally honored. For instance, ResourceVersion - and FieldPath are both very rarely valid in actual usage. 2. Invalid - usage help. It is impossible to add specific help for individual - usage. In most embedded usages, there are particular restrictions - like, \"must refer only to types A and B\" or \"UID not honored\" - or \"name must be restricted\". Those cannot be well described - when embedded. 3. Inconsistent validation. Because the usages - are different, the validation rules are different by usage, which - makes it hard for users to predict what will happen. 4. The fields - are both imprecise and overly precise. Kind is not a precise - mapping to a URL. This can produce ambiguity during interpretation - and require a REST mapping. In most cases, the dependency is - on the group,resource tuple and the version of the actual struct - is irrelevant. 5. We cannot easily change it. Because this type - is embedded in many locations, updates to this type will affect - numerous schemas. Don't make new APIs embed an underspecified - API type they do not control. \n Instead of using this type, create - a locally provided and used type that is well-focused on your - reference. For example, ServiceReferences for admission registration: - https://github.com/kubernetes/api/blob/release-1.17/admissionregistration/v1/types.go#L533 - ." - properties: - apiVersion: - description: API version of the referent. - type: string - fieldPath: - description: 'If referring to a piece of an object instead of - an entire object, this string should contain a valid JSON/Go - field access statement, such as desiredState.manifest.containers[2]. - For example, if the object reference is to a container within - a pod, this would take on a value like: "spec.containers{name}" - (where "name" refers to the name of the container that triggered - the event) or if no container name is specified "spec.containers[2]" - (container with index 2 in this pod). This syntax is chosen - only to have some well-defined way of referencing a part of - an object. TODO: this design is not final and this field is - subject to change in the future.' - type: string - kind: - description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' - type: string - namespace: - description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/' - type: string - resourceVersion: - description: 'Specific resourceVersion to which this reference - is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency' - type: string - uid: - description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids' - type: string - type: object - x-kubernetes-map-type: atomic - type: array - time: - format: date-time - nullable: true - type: string - type: object - required: - - spec - type: object - served: true - storage: true - ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.13.0 - name: statuschecks.chaos-mesh.org -spec: - group: chaos-mesh.org - names: - kind: StatusCheck - listKind: StatusCheckList - plural: statuschecks - singular: statuscheck - scope: Namespaced - versions: - - name: v1alpha1 - schema: - openAPIV3Schema: - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - description: Spec defines the behavior of a status check - properties: - duration: - description: Duration defines the duration of the whole status check - if the number of failed execution does not exceed the failure threshold. - Duration is available to both `Synchronous` and `Continuous` mode. - A duration string is a possibly signed sequence of decimal numbers, - each with optional fraction and a unit suffix, such as "300ms", - "-1.5h" or "2h45m". Valid time units are "ns", "us" (or "µs"), "ms", - "s", "m", "h". - type: string - failureThreshold: - default: 3 - description: FailureThreshold defines the minimum consecutive failure - for the status check to be considered failed. - minimum: 1 - type: integer - http: - properties: - body: - type: string - criteria: - description: Criteria defines how to determine the result of the - status check. - properties: - statusCode: - description: StatusCode defines the expected http status code - for the request. A statusCode string could be a single code - (e.g. 200), or an inclusive range (e.g. 200-400, both `200` - and `400` are included). - type: string - required: - - statusCode - type: object - headers: - additionalProperties: - items: - type: string - type: array - description: "A Header represents the key-value pairs in an HTTP - header. \n The keys should be in canonical form, as returned - by CanonicalHeaderKey." - type: object - method: - default: GET - enum: - - GET - - POST - type: string - url: - type: string - required: - - criteria - - url - type: object - intervalSeconds: - default: 10 - description: IntervalSeconds defines how often (in seconds) to perform - an execution of status check. - minimum: 1 - type: integer - mode: - description: 'Mode defines the execution mode of the status check. - Support type: Synchronous / Continuous' - enum: - - Synchronous - - Continuous - type: string - recordsHistoryLimit: - default: 100 - description: RecordsHistoryLimit defines the number of record to retain. - maximum: 1000 - minimum: 1 - type: integer - successThreshold: - default: 1 - description: SuccessThreshold defines the minimum consecutive successes - for the status check to be considered successful. SuccessThreshold - only works for `Synchronous` mode. - minimum: 1 - type: integer - timeoutSeconds: - default: 1 - description: TimeoutSeconds defines the number of seconds after which - an execution of status check times out. - minimum: 1 - type: integer - type: - default: HTTP - description: 'Type defines the specific status check type. Support - type: HTTP' - enum: - - HTTP - type: string - required: - - type - type: object - status: - description: Most recently observed status of status check - properties: - completionTime: - description: CompletionTime represents time when the status check - was completed. - format: date-time - type: string - conditions: - description: Conditions represents the latest available observations - of a StatusCheck's current state. - items: - properties: - lastProbeTime: - format: date-time - type: string - lastTransitionTime: - format: date-time - type: string - reason: - type: string - status: - type: string - type: - type: string - required: - - lastProbeTime - - lastTransitionTime - - reason - - status - - type - type: object - type: array - count: - description: Count represents the total number of the status check - executed. - format: int64 - type: integer - records: - description: Records contains the history of the execution of StatusCheck. - items: - properties: - outcome: - type: string - startTime: - format: date-time - type: string - required: - - outcome - - startTime - type: object - type: array - startTime: - description: StartTime represents time when the status check started - to execute. - format: date-time - type: string - type: object - required: - - spec - type: object - served: true - storage: true - subresources: - status: {} - ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.13.0 - name: stresschaos.chaos-mesh.org -spec: - group: chaos-mesh.org - names: - kind: StressChaos - listKind: StressChaosList - plural: stresschaos - singular: stresschaos - scope: Namespaced - versions: - - additionalPrinterColumns: - - jsonPath: .spec.duration - name: duration - type: string - name: v1alpha1 - schema: - openAPIV3Schema: - description: StressChaos is the Schema for the stresschaos API - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - description: Spec defines the behavior of a time chaos experiment - properties: - containerNames: - description: ContainerNames indicates list of the name of affected - container. If not set, the first container will be injected - items: - type: string - type: array - duration: - description: Duration represents the duration of the chaos action - type: string - mode: - description: 'Mode defines the mode to run chaos action. Supported - mode: one / all / fixed / fixed-percent / random-max-percent' - enum: - - one - - all - - fixed - - fixed-percent - - random-max-percent - type: string - remoteCluster: - description: RemoteCluster represents the remote cluster where the - chaos will be deployed - type: string - selector: - description: Selector is used to select pods that are used to inject - chaos action. - properties: - annotationSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be used to - select objects. A selector based on annotations. - type: object - expressionSelectors: - description: a slice of label selector expressions that can be - used to select objects. A list of selectors based on set-based - label expressions. - items: - description: A label selector requirement is a selector that - contains values, a key, and an operator that relates the key - and values. - properties: - key: - description: key is the label key that the selector applies - to. - type: string - operator: - description: operator represents a key's relationship to - a set of values. Valid operators are In, NotIn, Exists - and DoesNotExist. - type: string - values: - description: values is an array of string values. If the - operator is In or NotIn, the values array must be non-empty. - If the operator is Exists or DoesNotExist, the values - array must be empty. This array is replaced during a strategic - merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - fieldSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be used to - select objects. A selector based on fields. - type: object - labelSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be used to - select objects. A selector based on labels. - type: object - namespaces: - description: Namespaces is a set of namespace to which objects - belong. - items: - type: string - type: array - nodeSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be used to - select nodes. Selector which must match a node's labels, and - objects must belong to these selected nodes. - type: object - nodes: - description: Nodes is a set of node name and objects must belong - to these nodes. - items: - type: string - type: array - podPhaseSelectors: - description: 'PodPhaseSelectors is a set of condition of a pod - at the current time. supported value: Pending / Running / Succeeded - / Failed / Unknown' - items: - type: string - type: array - pods: - additionalProperties: - items: - type: string - type: array - description: Pods is a map of string keys and a set values that - used to select pods. The key defines the namespace which pods - belong, and the each values is a set of pod names. - type: object - type: object - stressngStressors: - description: StressngStressors defines plenty of stressors just like - `Stressors` except that it's an experimental feature and more powerful. - You can define stressors in `stress-ng` (see also `man stress-ng`) - dialect, however not all of the supported stressors are well tested. - It maybe retired in later releases. You should always use `Stressors` - to define the stressors and use this only when you want more stressors - unsupported by `Stressors`. When both `StressngStressors` and `Stressors` - are defined, `StressngStressors` wins. - type: string - stressors: - description: Stressors defines plenty of stressors supported to stress - system components out. You can use one or more of them to make up - various kinds of stresses. At least one of the stressors should - be specified. - properties: - cpu: - description: CPUStressor stresses CPU out - properties: - load: - description: Load specifies P percent loading per CPU worker. - 0 is effectively a sleep (no load) and 100 is full loading. - maximum: 100 - minimum: 0 - type: integer - options: - description: extend stress-ng options - items: - type: string - type: array - workers: - description: Workers specifies N workers to apply the stressor. - Maximum 8192 workers can run by stress-ng - maximum: 8192 - type: integer - required: - - workers - type: object - memory: - description: MemoryStressor stresses virtual memory out - properties: - oomScoreAdj: - default: 0 - description: OOMScoreAdj sets the oom_score_adj of the stress - process. See `man 5 proc` to know more about this option. - maximum: 1000 - minimum: -1000 - type: integer - options: - description: extend stress-ng options - items: - type: string - type: array - size: - description: Size 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 - workers: - description: Workers specifies N workers to apply the stressor. - Maximum 8192 workers can run by stress-ng - maximum: 8192 - type: integer - required: - - workers - type: object - type: object - value: - description: Value is required when the mode is set to `FixedMode` - / `FixedPercentMode` / `RandomMaxPercentMode`. If `FixedMode`, provide - an integer of pods to do chaos action. If `FixedPercentMode`, provide - a number from 0-100 to specify the percent of pods the server can - do chaos action. IF `RandomMaxPercentMode`, provide a number from - 0-100 to specify the max percent of pods to do chaos action - type: string - required: - - mode - - selector - type: object - status: - description: Most recently observed status of the time chaos experiment - properties: - conditions: - description: Conditions represents the current global condition of - the chaos - items: - properties: - reason: - type: string - status: - type: string - type: - type: string - required: - - status - - type - type: object - type: array - experiment: - description: Experiment records the last experiment state. - properties: - containerRecords: - description: Records are used to track the running status - items: - properties: - events: - description: Events are the essential details about the - injections and recoveries - items: - properties: - message: - description: Message is the detail message, e.g. the - reason why we failed to inject the chaos - type: string - operation: - description: Operation represents the operation we - are doing, when we crate this event - type: string - timestamp: - description: Timestamp is time when we create this - event - format: date-time - type: string - type: - description: Type means the stage of this event - type: string - required: - - operation - - timestamp - - type - type: object - type: array - id: - type: string - injectedCount: - description: InjectedCount is a counter to record the sum - of successful injections - type: integer - phase: - type: string - recoveredCount: - description: RecoveredCount is a counter to record the sum - of successful recoveries - type: integer - selectorKey: - type: string - required: - - id - - injectedCount - - phase - - recoveredCount - - selectorKey - type: object - type: array - desiredPhase: - enum: - - Run - - Stop - type: string - type: object - instances: - additionalProperties: - description: StressInstance is an instance generates stresses - properties: - memoryStartTime: - description: MemoryStartTime specifies when the memStress starts - format: date-time - type: string - memoryUid: - description: MemoryUID is the memStress identifier - type: string - startTime: - description: StartTime specifies when the stress-ng starts - format: date-time - type: string - uid: - description: UID is the stress-ng identifier - type: string - type: object - description: Instances always specifies stressing instances - type: object - required: - - experiment - type: object - required: - - spec - type: object - served: true - storage: true - subresources: {} - ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.13.0 - name: timechaos.chaos-mesh.org -spec: - group: chaos-mesh.org - names: - kind: TimeChaos - listKind: TimeChaosList - plural: timechaos - singular: timechaos - scope: Namespaced - versions: - - additionalPrinterColumns: - - jsonPath: .spec.duration - name: duration - type: string - name: v1alpha1 - schema: - openAPIV3Schema: - description: TimeChaos is the Schema for the timechaos API - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - description: Spec defines the behavior of a time chaos experiment - properties: - clockIds: - description: ClockIds defines all affected clock id All available - options are ["CLOCK_REALTIME","CLOCK_MONOTONIC","CLOCK_PROCESS_CPUTIME_ID","CLOCK_THREAD_CPUTIME_ID", - "CLOCK_MONOTONIC_RAW","CLOCK_REALTIME_COARSE","CLOCK_MONOTONIC_COARSE","CLOCK_BOOTTIME","CLOCK_REALTIME_ALARM", - "CLOCK_BOOTTIME_ALARM"] Default value is ["CLOCK_REALTIME"] - items: - type: string - type: array - containerNames: - description: ContainerNames indicates list of the name of affected - container. If not set, the first container will be injected - items: - type: string - type: array - duration: - description: Duration represents the duration of the chaos action - type: string - mode: - description: 'Mode defines the mode to run chaos action. Supported - mode: one / all / fixed / fixed-percent / random-max-percent' - enum: - - one - - all - - fixed - - fixed-percent - - random-max-percent - type: string - remoteCluster: - description: RemoteCluster represents the remote cluster where the - chaos will be deployed - type: string - selector: - description: Selector is used to select pods that are used to inject - chaos action. - properties: - annotationSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be used to - select objects. A selector based on annotations. - type: object - expressionSelectors: - description: a slice of label selector expressions that can be - used to select objects. A list of selectors based on set-based - label expressions. - items: - description: A label selector requirement is a selector that - contains values, a key, and an operator that relates the key - and values. - properties: - key: - description: key is the label key that the selector applies - to. - type: string - operator: - description: operator represents a key's relationship to - a set of values. Valid operators are In, NotIn, Exists - and DoesNotExist. - type: string - values: - description: values is an array of string values. If the - operator is In or NotIn, the values array must be non-empty. - If the operator is Exists or DoesNotExist, the values - array must be empty. This array is replaced during a strategic - merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - fieldSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be used to - select objects. A selector based on fields. - type: object - labelSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be used to - select objects. A selector based on labels. - type: object - namespaces: - description: Namespaces is a set of namespace to which objects - belong. - items: - type: string - type: array - nodeSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be used to - select nodes. Selector which must match a node's labels, and - objects must belong to these selected nodes. - type: object - nodes: - description: Nodes is a set of node name and objects must belong - to these nodes. - items: - type: string - type: array - podPhaseSelectors: - description: 'PodPhaseSelectors is a set of condition of a pod - at the current time. supported value: Pending / Running / Succeeded - / Failed / Unknown' - items: - type: string - type: array - pods: - additionalProperties: - items: - type: string - type: array - description: Pods is a map of string keys and a set values that - used to select pods. The key defines the namespace which pods - belong, and the each values is a set of pod names. - type: object - type: object - timeOffset: - description: TimeOffset defines the delta time of injected program. - It's a possibly signed sequence of decimal numbers, such as "300ms", - "-1.5h" or "2h45m". Valid time units are "ns", "us" (or "µs"), "ms", - "s", "m", "h". - type: string - value: - description: Value is required when the mode is set to `FixedMode` - / `FixedPercentMode` / `RandomMaxPercentMode`. If `FixedMode`, provide - an integer of pods to do chaos action. If `FixedPercentMode`, provide - a number from 0-100 to specify the percent of pods the server can - do chaos action. IF `RandomMaxPercentMode`, provide a number from - 0-100 to specify the max percent of pods to do chaos action - type: string - required: - - mode - - selector - - timeOffset - type: object - status: - description: Most recently observed status of the time chaos experiment - properties: - conditions: - description: Conditions represents the current global condition of - the chaos - items: - properties: - reason: - type: string - status: - type: string - type: - type: string - required: - - status - - type - type: object - type: array - experiment: - description: Experiment records the last experiment state. - properties: - containerRecords: - description: Records are used to track the running status - items: - properties: - events: - description: Events are the essential details about the - injections and recoveries - items: - properties: - message: - description: Message is the detail message, e.g. the - reason why we failed to inject the chaos - type: string - operation: - description: Operation represents the operation we - are doing, when we crate this event - type: string - timestamp: - description: Timestamp is time when we create this - event - format: date-time - type: string - type: - description: Type means the stage of this event - type: string - required: - - operation - - timestamp - - type - type: object - type: array - id: - type: string - injectedCount: - description: InjectedCount is a counter to record the sum - of successful injections - type: integer - phase: - type: string - recoveredCount: - description: RecoveredCount is a counter to record the sum - of successful recoveries - type: integer - selectorKey: - type: string - required: - - id - - injectedCount - - phase - - recoveredCount - - selectorKey - type: object - type: array - desiredPhase: - enum: - - Run - - Stop - type: string - type: object - required: - - experiment - type: object - required: - - spec - type: object - served: true - storage: true - subresources: {} - ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.13.0 - name: workflownodes.chaos-mesh.org -spec: - group: chaos-mesh.org - names: - kind: WorkflowNode - listKind: WorkflowNodeList - plural: workflownodes - shortNames: - - wfn - singular: workflownode - scope: Namespaced - versions: - - name: v1alpha1 - schema: - openAPIV3Schema: - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - description: Spec defines the behavior of a node of workflow - properties: - abortWithStatusCheck: - description: AbortWithStatusCheck describe whether to abort the workflow - when the failure threshold of StatusCheck is exceeded. Only used - when Type is TypeStatusCheck. - type: boolean - awsChaos: - description: AWSChaosSpec is the content of the specification for - an AWSChaos - properties: - action: - description: 'Action defines the specific aws chaos action. Supported - action: ec2-stop / ec2-restart / detach-volume Default action: - ec2-stop' - 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. Needed - in detach-volume. - type: string - duration: - description: Duration represents the duration of the chaos action. - type: string - ec2Instance: - description: Ec2Instance indicates the ID of the ec2 instance. - type: string - endpoint: - description: Endpoint indicates the endpoint of the aws server. - Just used it in test now. - type: string - remoteCluster: - description: RemoteCluster represents the remote cluster where - the chaos will be deployed - type: string - secretName: - description: SecretName defines the name of kubernetes secret. - type: string - volumeID: - description: EbsVolume indicates the ID of the EBS volume. Needed - in detach-volume. - type: string - required: - - action - - awsRegion - - ec2Instance - type: object - azureChaos: - description: AzureChaosSpec is the content of the specification for - an AzureChaos - properties: - action: - description: 'Action defines the specific azure chaos action. - Supported action: vm-stop / vm-restart / disk-detach Default - action: vm-stop' - enum: - - vm-stop - - vm-restart - - disk-detach - type: string - diskName: - description: DiskName indicates the name of the disk. Needed in - disk-detach. - type: string - duration: - description: Duration represents the duration of the chaos action. - type: string - lun: - description: LUN indicates the Logical Unit Number of the data - disk. Needed in disk-detach. - type: integer - remoteCluster: - description: RemoteCluster represents the remote cluster where - the chaos will be deployed - type: string - resourceGroupName: - description: ResourceGroupName defines the name of ResourceGroup - type: string - secretName: - description: SecretName defines the name of kubernetes secret. - It is used for Azure credentials. - type: string - subscriptionID: - description: SubscriptionID defines the id of Azure subscription. - type: string - vmName: - description: VMName defines the name of Virtual Machine - type: string - required: - - action - - resourceGroupName - - subscriptionID - - vmName - type: object - blockChaos: - description: BlockChaosSpec is the content of the specification for - a BlockChaos - properties: - action: - description: 'Action defines the specific block chaos action. - Supported action: delay' - enum: - - delay - type: string - containerNames: - description: ContainerNames indicates list of the name of affected - container. If not set, the first container will be injected - items: - type: string - type: array - delay: - description: Delay defines the delay distribution. - properties: - correlation: - type: string - jitter: - type: string - latency: - description: Latency defines the latency of every io request. - type: string - type: object - duration: - description: Duration represents the duration of the chaos action. - type: string - mode: - description: 'Mode defines the mode to run chaos action. Supported - mode: one / all / fixed / fixed-percent / random-max-percent' - enum: - - one - - all - - fixed - - fixed-percent - - random-max-percent - type: string - remoteCluster: - description: RemoteCluster represents the remote cluster where - the chaos will be deployed - type: string - selector: - description: Selector is used to select pods that are used to - inject chaos action. - properties: - annotationSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be used - to select objects. A selector based on annotations. - type: object - expressionSelectors: - description: a slice of label selector expressions that can - be used to select objects. A list of selectors based on - set-based label expressions. - items: - description: A label selector requirement is a selector - that contains values, a key, and an operator that relates - the key and values. - properties: - key: - description: key is the label key that the selector - applies to. - type: string - operator: - description: operator represents a key's relationship - to a set of values. Valid operators are In, NotIn, - Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. If - the operator is In or NotIn, the values array must - be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. This array is replaced - during a strategic merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - fieldSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be used - to select objects. A selector based on fields. - type: object - labelSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be used - to select objects. A selector based on labels. - type: object - namespaces: - description: Namespaces is a set of namespace to which objects - belong. - items: - type: string - type: array - nodeSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be used - to select nodes. Selector which must match a node's labels, - and objects must belong to these selected nodes. - type: object - nodes: - description: Nodes is a set of node name and objects must - belong to these nodes. - items: - type: string - type: array - podPhaseSelectors: - description: 'PodPhaseSelectors is a set of condition of a - pod at the current time. supported value: Pending / Running - / Succeeded / Failed / Unknown' - items: - type: string - type: array - pods: - additionalProperties: - items: - type: string - type: array - description: Pods is a map of string keys and a set values - that used to select pods. The key defines the namespace - which pods belong, and the each values is a set of pod names. - type: object - type: object - value: - description: Value is required when the mode is set to `FixedMode` - / `FixedPercentMode` / `RandomMaxPercentMode`. If `FixedMode`, - provide an integer of pods to do chaos action. If `FixedPercentMode`, - provide a number from 0-100 to specify the percent of pods the - server can do chaos action. IF `RandomMaxPercentMode`, provide - a number from 0-100 to specify the max percent of pods to do - chaos action - type: string - volumeName: - type: string - required: - - action - - mode - - selector - - volumeName - type: object - children: - items: - type: string - type: array - conditionalBranches: - items: - properties: - expression: - description: Expression is the expression for this conditional - branch, expected type of result is boolean. If expression - is empty, this branch will always be selected/the template - will be spawned. - type: string - target: - description: Target is the name of other template, if expression - is evaluated as true, this template will be spawned. - type: string - required: - - target - type: object - type: array - deadline: - format: date-time - type: string - dnsChaos: - description: DNSChaosSpec defines the desired state of DNSChaos - properties: - action: - description: 'Action defines the specific DNS chaos action. Supported - action: error, random Default action: error' - enum: - - error - - random - type: string - containerNames: - description: ContainerNames indicates list of the name of affected - container. If not set, the first container will be injected - items: - type: string - type: array - duration: - description: Duration represents the duration of the chaos action - type: string - mode: - description: 'Mode defines the mode to run chaos action. Supported - mode: one / all / fixed / fixed-percent / random-max-percent' - enum: - - one - - all - - fixed - - fixed-percent - - random-max-percent - type: string - patterns: - description: 'Choose which domain names to take effect, support - the placeholder ? and wildcard *, or the Specified domain name. - Note: 1. The wildcard * must be at the end of the string. For - example, chaos-*.org is invalid. 2. if the patterns is empty, - will take effect on all the domain names. For example: The value - is ["google.com", "github.*", "chaos-mes?.org"], will take effect - on "google.com", "github.com" and "chaos-mesh.org"' - items: - type: string - type: array - remoteCluster: - description: RemoteCluster represents the remote cluster where - the chaos will be deployed - type: string - selector: - description: Selector is used to select pods that are used to - inject chaos action. - properties: - annotationSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be used - to select objects. A selector based on annotations. - type: object - expressionSelectors: - description: a slice of label selector expressions that can - be used to select objects. A list of selectors based on - set-based label expressions. - items: - description: A label selector requirement is a selector - that contains values, a key, and an operator that relates - the key and values. - properties: - key: - description: key is the label key that the selector - applies to. - type: string - operator: - description: operator represents a key's relationship - to a set of values. Valid operators are In, NotIn, - Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. If - the operator is In or NotIn, the values array must - be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. This array is replaced - during a strategic merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - fieldSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be used - to select objects. A selector based on fields. - type: object - labelSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be used - to select objects. A selector based on labels. - type: object - namespaces: - description: Namespaces is a set of namespace to which objects - belong. - items: - type: string - type: array - nodeSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be used - to select nodes. Selector which must match a node's labels, - and objects must belong to these selected nodes. - type: object - nodes: - description: Nodes is a set of node name and objects must - belong to these nodes. - items: - type: string - type: array - podPhaseSelectors: - description: 'PodPhaseSelectors is a set of condition of a - pod at the current time. supported value: Pending / Running - / Succeeded / Failed / Unknown' - items: - type: string - type: array - pods: - additionalProperties: - items: - type: string - type: array - description: Pods is a map of string keys and a set values - that used to select pods. The key defines the namespace - which pods belong, and the each values is a set of pod names. - type: object - type: object - value: - description: Value is required when the mode is set to `FixedMode` - / `FixedPercentMode` / `RandomMaxPercentMode`. If `FixedMode`, - provide an integer of pods to do chaos action. If `FixedPercentMode`, - provide a number from 0-100 to specify the percent of pods the - server can do chaos action. IF `RandomMaxPercentMode`, provide - a number from 0-100 to specify the max percent of pods to do - chaos action - type: string - required: - - action - - mode - - selector - type: object - gcpChaos: - description: GCPChaosSpec is the content of the specification for - a GCPChaos - properties: - action: - description: 'Action defines the specific gcp chaos action. Supported - action: node-stop / node-reset / disk-loss Default action: node-stop' - enum: - - node-stop - - node-reset - - disk-loss - type: string - deviceNames: - description: The device name of disks to detach. Needed in disk-loss. - items: - type: string - type: array - duration: - description: Duration represents the duration of the chaos action. - type: string - instance: - description: Instance defines the name of the instance - type: string - project: - description: Project defines the ID of gcp project. - type: string - remoteCluster: - description: RemoteCluster represents the remote cluster where - the chaos will be deployed - type: string - secretName: - description: SecretName defines the name of kubernetes secret. - It is used for GCP credentials. - type: string - zone: - description: Zone defines the zone of gcp project. - type: string - required: - - action - - instance - - project - - zone - type: object - httpChaos: - properties: - abort: - description: Abort is a rule to abort a http session. - type: boolean - code: - description: Code is a rule to select target by http status code - in response. - format: int32 - type: integer - delay: - description: Delay represents the delay of the target request/response. - A duration string is a possibly unsigned sequence of decimal - numbers, each with optional fraction and a unit suffix, such - as "300ms", "2h45m". Valid time units are "ns", "us" (or "µs"), - "ms", "s", "m", "h". - type: string - duration: - description: Duration represents the duration of the chaos action. - type: string - method: - description: Method is a rule to select target by http method - in request. - type: string - mode: - description: 'Mode defines the mode to run chaos action. Supported - mode: one / all / fixed / fixed-percent / random-max-percent' - enum: - - one - - all - - fixed - - fixed-percent - - random-max-percent - type: string - patch: - description: Patch is a rule to patch some contents in target. - properties: - body: - description: Body is a rule to patch message body of target. - properties: - type: - description: Type represents the patch type, only support - `JSON` as [merge patch json](https://tools.ietf.org/html/rfc7396) - currently. - type: string - value: - description: Value is the patch contents. - type: string - required: - - type - - value - type: object - headers: - description: 'Headers is a rule to append http headers of - target. For example: `[["Set-Cookie", ""], ["Set-Cookie", - ""]]`.' - items: - items: - type: string - type: array - type: array - queries: - description: 'Queries is a rule to append uri queries of target(Request - only). For example: `[["foo", "bar"], ["foo", "unknown"]]`.' - items: - items: - type: string - type: array - type: array - type: object - path: - description: Path is a rule to select target by uri path in http - request. - type: string - port: - description: Port represents the target port to be proxy of. - format: int32 - type: integer - remoteCluster: - description: RemoteCluster represents the remote cluster where - the chaos will be deployed - type: string - replace: - description: Replace is a rule to replace some contents in target. - properties: - body: - description: Body is a rule to replace http message body in - target. - format: byte - type: string - code: - description: Code is a rule to replace http status code in - response. - format: int32 - type: integer - headers: - additionalProperties: - type: string - description: Headers is a rule to replace http headers of - target. The key-value pairs represent header name and header - value pairs. - type: object - method: - description: Method is a rule to replace http method in request. - type: string - path: - description: Path is rule to to replace uri path in http request. - type: string - queries: - additionalProperties: - type: string - description: 'Queries is a rule to replace uri queries in - http request. For example, with value `{ "foo": "unknown" - }`, the `/?foo=bar` will be altered to `/?foo=unknown`,' - type: object - type: object - request_headers: - additionalProperties: - type: string - description: RequestHeaders is a rule to select target by http - headers in request. The key-value pairs represent header name - and header value pairs. - type: object - response_headers: - additionalProperties: - type: string - description: ResponseHeaders is a rule to select target by http - headers in response. The key-value pairs represent header name - and header value pairs. - type: object - selector: - description: Selector is used to select pods that are used to - inject chaos action. - properties: - annotationSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be used - to select objects. A selector based on annotations. - type: object - expressionSelectors: - description: a slice of label selector expressions that can - be used to select objects. A list of selectors based on - set-based label expressions. - items: - description: A label selector requirement is a selector - that contains values, a key, and an operator that relates - the key and values. - properties: - key: - description: key is the label key that the selector - applies to. - type: string - operator: - description: operator represents a key's relationship - to a set of values. Valid operators are In, NotIn, - Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. If - the operator is In or NotIn, the values array must - be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. This array is replaced - during a strategic merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - fieldSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be used - to select objects. A selector based on fields. - type: object - labelSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be used - to select objects. A selector based on labels. - type: object - namespaces: - description: Namespaces is a set of namespace to which objects - belong. - items: - type: string - type: array - nodeSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be used - to select nodes. Selector which must match a node's labels, - and objects must belong to these selected nodes. - type: object - nodes: - description: Nodes is a set of node name and objects must - belong to these nodes. - items: - type: string - type: array - podPhaseSelectors: - description: 'PodPhaseSelectors is a set of condition of a - pod at the current time. supported value: Pending / Running - / Succeeded / Failed / Unknown' - items: - type: string - type: array - pods: - additionalProperties: - items: - type: string - type: array - description: Pods is a map of string keys and a set values - that used to select pods. The key defines the namespace - which pods belong, and the each values is a set of pod names. - type: object - type: object - target: - description: Target is the object to be selected and injected. - enum: - - Request - - Response - type: string - tls: - description: TLS is the tls config, will override PodHttpChaos - if there are multiple HTTPChaos experiments are applied - properties: - caName: - description: CAName represents the data name of ca file in - secret, `ca.crt` for example - type: string - certName: - description: CertName represents the data name of cert file - in secret, `tls.crt` for example - type: string - keyName: - description: KeyName represents the data name of key file - in secret, `tls.key` for example - type: string - secretName: - description: SecretName represents the name of required secret - resource - type: string - secretNamespace: - description: SecretNamespace represents the namespace of required - secret resource - type: string - required: - - certName - - keyName - - secretName - - secretNamespace - type: object - value: - description: Value is required when the mode is set to `FixedMode` - / `FixedPercentMode` / `RandomMaxPercentMode`. If `FixedMode`, - provide an integer of pods to do chaos action. If `FixedPercentMode`, - provide a number from 0-100 to specify the percent of pods the - server can do chaos action. IF `RandomMaxPercentMode`, provide - a number from 0-100 to specify the max percent of pods to do - chaos action - type: string - required: - - mode - - selector - - target - type: object - ioChaos: - description: IOChaosSpec defines the desired state of IOChaos - properties: - action: - description: 'Action defines the specific pod chaos action. Supported - action: latency / fault / attrOverride / mistake' - enum: - - latency - - fault - - attrOverride - - mistake - type: string - attr: - description: Attr defines the overrided attribution - properties: - atime: - description: Timespec represents a time - properties: - nsec: - format: int64 - type: integer - sec: - format: int64 - type: integer - required: - - nsec - - sec - type: object - blocks: - format: int64 - type: integer - ctime: - description: Timespec represents a time - properties: - nsec: - format: int64 - type: integer - sec: - format: int64 - type: integer - required: - - nsec - - sec - type: object - gid: - format: int32 - type: integer - ino: - format: int64 - type: integer - kind: - description: FileType represents type of file - type: string - mtime: - description: Timespec represents a time - properties: - nsec: - format: int64 - type: integer - sec: - format: int64 - type: integer - required: - - nsec - - sec - type: object - nlink: - format: int32 - type: integer - perm: - type: integer - rdev: - format: int32 - type: integer - size: - format: int64 - type: integer - uid: - format: int32 - type: integer - type: object - containerNames: - description: ContainerNames indicates list of the name of affected - container. If not set, the first container will be injected - items: - type: string - type: array - delay: - description: Delay defines the value of I/O chaos action delay. - A delay string is a possibly signed sequence of decimal numbers, - each with optional fraction and a unit suffix, such as "300ms". - Valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h". - type: string - duration: - description: Duration represents the duration of the chaos action. - It is required when the action is `PodFailureAction`. A duration - string is a possibly signed sequence of decimal numbers, each - with optional fraction and a unit suffix, such as "300ms", "-1.5h" - or "2h45m". Valid time units are "ns", "us" (or "µs"), "ms", - "s", "m", "h". - type: string - errno: - description: 'Errno defines the error code that returned by I/O - action. refer to: https://www-numi.fnal.gov/offline_software/srt_public_context/WebDocs/Errors/unix_system_errors.html' - format: int32 - type: integer - methods: - description: 'Methods defines the I/O methods for injecting I/O - chaos action. default: all I/O methods.' - items: - type: string - type: array - mistake: - description: Mistake defines what types of incorrectness are injected - to IO operations - properties: - filling: - description: Filling determines what is filled in the mistake - data. - enum: - - zero - - random - type: string - maxLength: - description: Max length of each wrong data segment in bytes - format: int64 - minimum: 1 - type: integer - maxOccurrences: - description: There will be [1, MaxOccurrences] segments of - wrong data. - format: int64 - minimum: 1 - type: integer - type: object - mode: - description: 'Mode defines the mode to run chaos action. Supported - mode: one / all / fixed / fixed-percent / random-max-percent' - enum: - - one - - all - - fixed - - fixed-percent - - random-max-percent - type: string - path: - description: Path defines the path of files for injecting I/O - chaos action. - type: string - percent: - default: 100 - description: 'Percent defines the percentage of injection errors - and provides a number from 0-100. default: 100.' - type: integer - remoteCluster: - description: RemoteCluster represents the remote cluster where - the chaos will be deployed - type: string - selector: - description: Selector is used to select pods that are used to - inject chaos action. - properties: - annotationSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be used - to select objects. A selector based on annotations. - type: object - expressionSelectors: - description: a slice of label selector expressions that can - be used to select objects. A list of selectors based on - set-based label expressions. - items: - description: A label selector requirement is a selector - that contains values, a key, and an operator that relates - the key and values. - properties: - key: - description: key is the label key that the selector - applies to. - type: string - operator: - description: operator represents a key's relationship - to a set of values. Valid operators are In, NotIn, - Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. If - the operator is In or NotIn, the values array must - be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. This array is replaced - during a strategic merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - fieldSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be used - to select objects. A selector based on fields. - type: object - labelSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be used - to select objects. A selector based on labels. - type: object - namespaces: - description: Namespaces is a set of namespace to which objects - belong. - items: - type: string - type: array - nodeSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be used - to select nodes. Selector which must match a node's labels, - and objects must belong to these selected nodes. - type: object - nodes: - description: Nodes is a set of node name and objects must - belong to these nodes. - items: - type: string - type: array - podPhaseSelectors: - description: 'PodPhaseSelectors is a set of condition of a - pod at the current time. supported value: Pending / Running - / Succeeded / Failed / Unknown' - items: - type: string - type: array - pods: - additionalProperties: - items: - type: string - type: array - description: Pods is a map of string keys and a set values - that used to select pods. The key defines the namespace - which pods belong, and the each values is a set of pod names. - type: object - type: object - value: - description: Value is required when the mode is set to `FixedMode` - / `FixedPercentMode` / `RandomMaxPercentMode`. If `FixedMode`, - provide an integer of pods to do chaos action. If `FixedPercentMode`, - provide a number from 0-100 to specify the percent of pods the - server can do chaos action. IF `RandomMaxPercentMode`, provide - a number from 0-100 to specify the max percent of pods to do - chaos action - type: string - volumePath: - description: VolumePath represents the mount path of injected - volume - type: string - required: - - action - - mode - - selector - - volumePath - type: object - jvmChaos: - description: JVMChaosSpec defines the desired state of JVMChaos - properties: - action: - description: 'Action defines the specific jvm chaos action. Supported - action: latency;return;exception;stress;gc;ruleData' - enum: - - latency - - return - - exception - - stress - - gc - - ruleData - - mysql - type: string - class: - description: Java class - type: string - containerNames: - description: ContainerNames indicates list of the name of affected - container. If not set, the first container will be injected - items: - type: string - type: array - cpuCount: - description: the CPU core number needs to use, only set it when - action is stress - type: integer - database: - description: the match database default value is "", means match - all database - type: string - duration: - description: Duration represents the duration of the chaos action - type: string - exception: - description: the exception which needs to throw for action `exception` - or the exception message needs to throw in action `mysql` - type: string - latency: - description: the latency duration for action 'latency', unit ms - or the latency duration in action `mysql` - type: integer - memType: - description: the memory type needs to locate, only set it when - action is stress, the value can be 'stack' or 'heap' - type: string - method: - description: the method in Java class - type: string - mode: - description: 'Mode defines the mode to run chaos action. Supported - mode: one / all / fixed / fixed-percent / random-max-percent' - enum: - - one - - all - - fixed - - fixed-percent - - random-max-percent - type: string - mysqlConnectorVersion: - description: the version of mysql-connector-java, only support - 5.X.X(set to "5") and 8.X.X(set to "8") now - type: string - name: - description: byteman rule name, should be unique, and will generate - one if not set - type: string - pid: - description: the pid of Java process which needs to attach - type: integer - port: - description: the port of agent server, default 9277 - format: int32 - type: integer - remoteCluster: - description: RemoteCluster represents the remote cluster where - the chaos will be deployed - type: string - ruleData: - description: the byteman rule's data for action 'ruleData' - type: string - selector: - description: Selector is used to select pods that are used to - inject chaos action. - properties: - annotationSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be used - to select objects. A selector based on annotations. - type: object - expressionSelectors: - description: a slice of label selector expressions that can - be used to select objects. A list of selectors based on - set-based label expressions. - items: - description: A label selector requirement is a selector - that contains values, a key, and an operator that relates - the key and values. - properties: - key: - description: key is the label key that the selector - applies to. - type: string - operator: - description: operator represents a key's relationship - to a set of values. Valid operators are In, NotIn, - Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. If - the operator is In or NotIn, the values array must - be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. This array is replaced - during a strategic merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - fieldSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be used - to select objects. A selector based on fields. - type: object - labelSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be used - to select objects. A selector based on labels. - type: object - namespaces: - description: Namespaces is a set of namespace to which objects - belong. - items: - type: string - type: array - nodeSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be used - to select nodes. Selector which must match a node's labels, - and objects must belong to these selected nodes. - type: object - nodes: - description: Nodes is a set of node name and objects must - belong to these nodes. - items: - type: string - type: array - podPhaseSelectors: - description: 'PodPhaseSelectors is a set of condition of a - pod at the current time. supported value: Pending / Running - / Succeeded / Failed / Unknown' - items: - type: string - type: array - pods: - additionalProperties: - items: - type: string - type: array - description: Pods is a map of string keys and a set values - that used to select pods. The key defines the namespace - which pods belong, and the each values is a set of pod names. - type: object - type: object - sqlType: - description: the match sql type default value is "", means match - all SQL type. The value can be 'select', 'insert', 'update', - 'delete', 'replace'. - type: string - table: - description: the match table default value is "", means match - all table - type: string - value: - description: Value is required when the mode is set to `FixedMode` - / `FixedPercentMode` / `RandomMaxPercentMode`. If `FixedMode`, - provide an integer of pods to do chaos action. If `FixedPercentMode`, - provide a number from 0-100 to specify the percent of pods the - server can do chaos action. IF `RandomMaxPercentMode`, provide - a number from 0-100 to specify the max percent of pods to do - chaos action - type: string - required: - - action - - mode - - selector - type: object - kernelChaos: - description: KernelChaosSpec defines the desired state of KernelChaos - properties: - containerNames: - description: ContainerNames indicates list of the name of affected - container. If not set, the first container will be injected - items: - type: string - type: array - duration: - description: Duration represents the duration of the chaos action - type: string - failKernRequest: - description: FailKernRequest defines the request of kernel injection - properties: - callchain: - description: 'Callchain indicate a special call chain, such - as: ext4_mount -> mount_subtree -> ... -> should_failslab - With an optional set of predicates and an optional set of - parameters, which used with predicates. You can read call - chan and predicate examples from https://github.com/chaos-mesh/bpfki/tree/develop/examples - to learn more. If no special call chain, just keep Callchain - empty, which means it will fail at any call chain with slab - alloc (eg: kmalloc).' - items: - description: Frame defines the function signature and predicate - in function's body - properties: - funcname: - description: Funcname can be find from kernel source - or `/proc/kallsyms`, such as `ext4_mount` - type: string - parameters: - description: Parameters is used with predicate, for - example, if you want to inject slab error in `d_alloc_parallel(struct - dentry *parent, const struct qstr *name)` with a special - name `bananas`, you need to set it to `struct dentry - *parent, const struct qstr *name` otherwise omit it. - type: string - predicate: - description: Predicate will access the arguments of - this Frame, example with Parameters's, you can set - it to `STRNCMP(name->name, "bananas", 8)` to make - inject only with it, or omit it to inject for all - d_alloc_parallel call chain. - type: string - type: object - type: array - failtype: - description: 'FailType indicates what to fail, can be set - to ''0'' / ''1'' / ''2'' If `0`, indicates slab to fail - (should_failslab) If `1`, indicates alloc_page to fail (should_fail_alloc_page) - If `2`, indicates bio to fail (should_fail_bio) You can - read: 1. https://www.kernel.org/doc/html/latest/fault-injection/fault-injection.html - 2. http://github.com/iovisor/bcc/blob/master/tools/inject_example.txt - to learn more' - format: int32 - maximum: 2 - minimum: 0 - type: integer - headers: - description: 'Headers indicates the appropriate kernel headers - you need. Eg: "linux/mmzone.h", "linux/blkdev.h" and so - on' - items: - type: string - type: array - probability: - description: Probability indicates the fails with probability. - If you want 1%, please set this field with 1. - format: int32 - maximum: 100 - minimum: 0 - type: integer - times: - description: Times indicates the max times of fails. - format: int32 - minimum: 0 - type: integer - required: - - failtype - type: object - mode: - description: 'Mode defines the mode to run chaos action. Supported - mode: one / all / fixed / fixed-percent / random-max-percent' - enum: - - one - - all - - fixed - - fixed-percent - - random-max-percent - type: string - remoteCluster: - description: RemoteCluster represents the remote cluster where - the chaos will be deployed - type: string - selector: - description: Selector is used to select pods that are used to - inject chaos action. - properties: - annotationSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be used - to select objects. A selector based on annotations. - type: object - expressionSelectors: - description: a slice of label selector expressions that can - be used to select objects. A list of selectors based on - set-based label expressions. - items: - description: A label selector requirement is a selector - that contains values, a key, and an operator that relates - the key and values. - properties: - key: - description: key is the label key that the selector - applies to. - type: string - operator: - description: operator represents a key's relationship - to a set of values. Valid operators are In, NotIn, - Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. If - the operator is In or NotIn, the values array must - be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. This array is replaced - during a strategic merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - fieldSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be used - to select objects. A selector based on fields. - type: object - labelSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be used - to select objects. A selector based on labels. - type: object - namespaces: - description: Namespaces is a set of namespace to which objects - belong. - items: - type: string - type: array - nodeSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be used - to select nodes. Selector which must match a node's labels, - and objects must belong to these selected nodes. - type: object - nodes: - description: Nodes is a set of node name and objects must - belong to these nodes. - items: - type: string - type: array - podPhaseSelectors: - description: 'PodPhaseSelectors is a set of condition of a - pod at the current time. supported value: Pending / Running - / Succeeded / Failed / Unknown' - items: - type: string - type: array - pods: - additionalProperties: - items: - type: string - type: array - description: Pods is a map of string keys and a set values - that used to select pods. The key defines the namespace - which pods belong, and the each values is a set of pod names. - type: object - type: object - value: - description: Value is required when the mode is set to `FixedMode` - / `FixedPercentMode` / `RandomMaxPercentMode`. If `FixedMode`, - provide an integer of pods to do chaos action. If `FixedPercentMode`, - provide a number from 0-100 to specify the percent of pods the - server can do chaos action. IF `RandomMaxPercentMode`, provide - a number from 0-100 to specify the max percent of pods to do - chaos action - type: string - required: - - failKernRequest - - mode - - selector - type: object - networkChaos: - description: NetworkChaosSpec defines the desired state of NetworkChaos - properties: - action: - description: 'Action defines the specific network chaos action. - Supported action: partition, netem, delay, loss, duplicate, - corrupt Default action: delay' - enum: - - netem - - delay - - loss - - duplicate - - corrupt - - partition - - bandwidth - type: string - bandwidth: - description: Bandwidth represents the detail about bandwidth control - action - properties: - buffer: - description: Buffer is the maximum amount of bytes that tokens - can be available for instantaneously. - format: int32 - minimum: 1 - type: integer - limit: - description: Limit is the number of bytes that can be queued - waiting for tokens to become available. - format: int32 - minimum: 1 - type: integer - minburst: - description: Minburst specifies the size of the peakrate bucket. - For perfect accuracy, should be set to the MTU of the interface. If - a peakrate is needed, but some burstiness is acceptable, - this size can be raised. A 3000 byte minburst allows around - 3mbit/s of peakrate, given 1000 byte packets. - format: int32 - minimum: 0 - type: integer - peakrate: - description: Peakrate is the maximum depletion rate of the - bucket. The peakrate does not need to be set, it is only - necessary if perfect millisecond timescale shaping is required. - format: int64 - minimum: 0 - type: integer - rate: - description: Rate is the speed knob. Allows bit, kbit, mbit, - gbit, tbit, bps, kbps, mbps, gbps, tbps unit. bps means - bytes per second. - type: string - required: - - buffer - - limit - - rate - type: object - corrupt: - description: Corrupt represents the detail about corrupt action - properties: - correlation: - type: string - corrupt: - type: string - required: - - corrupt - type: object - delay: - description: Delay represents the detail about delay action - properties: - correlation: - type: string - jitter: - type: string - latency: - type: string - reorder: - description: ReorderSpec defines details of packet reorder. - properties: - correlation: - type: string - gap: - type: integer - reorder: - type: string - required: - - gap - - reorder - type: object - required: - - latency - type: object - device: - description: Device represents the network device to be affected. - type: string - direction: - default: to - description: Direction represents the direction, this applies - on netem and network partition action - enum: - - to - - from - - both - type: string - duplicate: - description: DuplicateSpec represents the detail about loss action - properties: - correlation: - type: string - duplicate: - type: string - required: - - duplicate - type: object - duration: - description: Duration represents the duration of the chaos action - type: string - externalTargets: - description: ExternalTargets represents network targets outside - k8s - items: - type: string - type: array - loss: - description: Loss represents the detail about loss action - properties: - correlation: - type: string - loss: - type: string - required: - - loss - type: object - mode: - description: 'Mode defines the mode to run chaos action. Supported - mode: one / all / fixed / fixed-percent / random-max-percent' - enum: - - one - - all - - fixed - - fixed-percent - - random-max-percent - type: string - rate: - description: Rate represents the detail about rate control action - properties: - rate: - description: Rate is the speed knob. Allows bit, kbit, mbit, - gbit, tbit, bps, kbps, mbps, gbps, tbps unit. bps means - bytes per second. - type: string - required: - - rate - type: object - remoteCluster: - description: RemoteCluster represents the remote cluster where - the chaos will be deployed - type: string - selector: - description: Selector is used to select pods that are used to - inject chaos action. - properties: - annotationSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be used - to select objects. A selector based on annotations. - type: object - expressionSelectors: - description: a slice of label selector expressions that can - be used to select objects. A list of selectors based on - set-based label expressions. - items: - description: A label selector requirement is a selector - that contains values, a key, and an operator that relates - the key and values. - properties: - key: - description: key is the label key that the selector - applies to. - type: string - operator: - description: operator represents a key's relationship - to a set of values. Valid operators are In, NotIn, - Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. If - the operator is In or NotIn, the values array must - be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. This array is replaced - during a strategic merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - fieldSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be used - to select objects. A selector based on fields. - type: object - labelSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be used - to select objects. A selector based on labels. - type: object - namespaces: - description: Namespaces is a set of namespace to which objects - belong. - items: - type: string - type: array - nodeSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be used - to select nodes. Selector which must match a node's labels, - and objects must belong to these selected nodes. - type: object - nodes: - description: Nodes is a set of node name and objects must - belong to these nodes. - items: - type: string - type: array - podPhaseSelectors: - description: 'PodPhaseSelectors is a set of condition of a - pod at the current time. supported value: Pending / Running - / Succeeded / Failed / Unknown' - items: - type: string - type: array - pods: - additionalProperties: - items: - type: string - type: array - description: Pods is a map of string keys and a set values - that used to select pods. The key defines the namespace - which pods belong, and the each values is a set of pod names. - type: object - type: object - target: - description: Target represents network target, this applies on - netem and network partition action - properties: - mode: - description: 'Mode defines the mode to run chaos action. Supported - mode: one / all / fixed / fixed-percent / random-max-percent' - enum: - - one - - all - - fixed - - fixed-percent - - random-max-percent - type: string - selector: - description: Selector is used to select pods that are used - to inject chaos action. - properties: - annotationSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be - used to select objects. A selector based on annotations. - type: object - expressionSelectors: - description: a slice of label selector expressions that - can be used to select objects. A list of selectors based - on set-based label expressions. - items: - description: A label selector requirement is a selector - that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the label key that the selector - applies to. - type: string - operator: - description: operator represents a key's relationship - to a set of values. Valid operators are In, NotIn, - Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. - If the operator is In or NotIn, the values array - must be non-empty. If the operator is Exists or - DoesNotExist, the values array must be empty. - This array is replaced during a strategic merge - patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - fieldSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be - used to select objects. A selector based on fields. - type: object - labelSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be - used to select objects. A selector based on labels. - type: object - namespaces: - description: Namespaces is a set of namespace to which - objects belong. - items: - type: string - type: array - nodeSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be - used to select nodes. Selector which must match a node's - labels, and objects must belong to these selected nodes. - type: object - nodes: - description: Nodes is a set of node name and objects must - belong to these nodes. - items: - type: string - type: array - podPhaseSelectors: - description: 'PodPhaseSelectors is a set of condition - of a pod at the current time. supported value: Pending - / Running / Succeeded / Failed / Unknown' - items: - type: string - type: array - pods: - additionalProperties: - items: - type: string - type: array - description: Pods is a map of string keys and a set values - that used to select pods. The key defines the namespace - which pods belong, and the each values is a set of pod - names. - type: object - type: object - value: - description: Value is required when the mode is set to `FixedMode` - / `FixedPercentMode` / `RandomMaxPercentMode`. If `FixedMode`, - provide an integer of pods to do chaos action. If `FixedPercentMode`, - provide a number from 0-100 to specify the percent of pods - the server can do chaos action. IF `RandomMaxPercentMode`, provide - a number from 0-100 to specify the max percent of pods to - do chaos action - type: string - required: - - mode - - selector - type: object - targetDevice: - description: TargetDevice represents the network device to be - affected in target scope. - type: string - value: - description: Value is required when the mode is set to `FixedMode` - / `FixedPercentMode` / `RandomMaxPercentMode`. If `FixedMode`, - provide an integer of pods to do chaos action. If `FixedPercentMode`, - provide a number from 0-100 to specify the percent of pods the - server can do chaos action. IF `RandomMaxPercentMode`, provide - a number from 0-100 to specify the max percent of pods to do - chaos action - type: string - required: - - action - - mode - - selector - type: object - physicalmachineChaos: - description: PhysicalMachineChaosSpec defines the desired state of - PhysicalMachineChaos - properties: - action: - description: the subAction, generate automatically - enum: - - stress-cpu - - stress-mem - - disk-read-payload - - disk-write-payload - - disk-fill - - network-corrupt - - network-duplicate - - network-loss - - network-delay - - network-partition - - network-dns - - network-bandwidth - - network-flood - - network-down - - process - - jvm-exception - - jvm-gc - - jvm-latency - - jvm-return - - jvm-stress - - jvm-rule-data - - jvm-mysql - - clock - - redis-expiration - - redis-penetration - - redis-cacheLimit - - redis-restart - - redis-stop - - kafka-fill - - kafka-flood - - kafka-io - - file-create - - file-modify - - file-delete - - file-rename - - file-append - - file-replace - - vm - - user_defined - type: string - address: - description: 'DEPRECATED: Use Selector instead. Only one of Address - and Selector could be specified.' - items: - type: string - type: array - clock: - properties: - clock-ids-slice: - description: the identifier of the particular clock on which - to act. More clock description in linux kernel can be found - in man page of clock_getres, clock_gettime, clock_settime. - Muti clock ids should be split with "," - type: string - pid: - description: the pid of target program. - type: integer - time-offset: - description: specifies the length of time offset. - type: string - type: object - disk-fill: - properties: - fill-by-fallocate: - description: fill disk by fallocate - type: boolean - path: - description: specifies the location to fill data in. if path - not provided, payload will read/write from/into a temp file, - temp file will be deleted after writing - type: string - size: - description: 'specifies how many units of data will write - into the file path. support unit: c=1, w=2, b=512, kB=1000, - K=1024, MB=1000*1000, M=1024*1024, GB=1000*1000*1000, G=1024*1024*1024 - BYTES. example : 1M | 512kB' - type: string - type: object - disk-read-payload: - properties: - path: - description: specifies the location to fill data in. if path - not provided, payload will read/write from/into a temp file, - temp file will be deleted after writing - type: string - payload-process-num: - description: specifies the number of process work on writing, - default 1, only 1-255 is valid value - type: integer - size: - description: 'specifies how many units of data will write - into the file path. support unit: c=1, w=2, b=512, kB=1000, - K=1024, MB=1000*1000, M=1024*1024, GB=1000*1000*1000, G=1024*1024*1024 - BYTES. example : 1M | 512kB' - type: string - type: object - disk-write-payload: - properties: - path: - description: specifies the location to fill data in. if path - not provided, payload will read/write from/into a temp file, - temp file will be deleted after writing - type: string - payload-process-num: - description: specifies the number of process work on writing, - default 1, only 1-255 is valid value - type: integer - size: - description: 'specifies how many units of data will write - into the file path. support unit: c=1, w=2, b=512, kB=1000, - K=1024, MB=1000*1000, M=1024*1024, GB=1000*1000*1000, G=1024*1024*1024 - BYTES. example : 1M | 512kB' - type: string - type: object - duration: - description: Duration represents the duration of the chaos action - type: string - file-append: - properties: - count: - description: Count is the number of times to append the data. - type: integer - data: - description: Data is the data for append. - type: string - file-name: - description: FileName is the name of the file to be created, - modified, deleted, renamed, or appended. - type: string - type: object - file-create: - properties: - dir-name: - description: DirName is the directory name to create or delete. - type: string - file-name: - description: FileName is the name of the file to be created, - modified, deleted, renamed, or appended. - type: string - type: object - file-delete: - properties: - dir-name: - description: DirName is the directory name to create or delete. - type: string - file-name: - description: FileName is the name of the file to be created, - modified, deleted, renamed, or appended. - type: string - type: object - file-modify: - properties: - file-name: - description: FileName is the name of the file to be created, - modified, deleted, renamed, or appended. - type: string - privilege: - description: Privilege is the file privilege to be set. - format: int32 - type: integer - type: object - file-rename: - properties: - dest-file: - description: DestFile is the name to be renamed. - type: string - source-file: - description: SourceFile is the name need to be renamed. - type: string - type: object - file-replace: - properties: - dest-string: - description: DestStr is the destination string of the file. - type: string - file-name: - description: FileName is the name of the file to be created, - modified, deleted, renamed, or appended. - type: string - line: - description: Line is the line number of the file to be replaced. - type: integer - origin-string: - description: OriginStr is the origin string of the file. - type: string - type: object - http-abort: - properties: - code: - description: Code is a rule to select target by http status - code in response - type: string - method: - description: HTTP method - type: string - path: - description: Match path of Uri with wildcard matches - type: string - port: - description: The TCP port that the target service listens - on - format: int32 - type: integer - proxy_ports: - description: Composed with one of the port of HTTP connection, - we will only attack HTTP connection with port inside proxy_ports - items: - type: integer - type: array - target: - description: 'HTTP target: Request or Response' - type: string - required: - - proxy_ports - - target - type: object - http-config: - properties: - file_path: - description: The config file path - type: string - type: object - http-delay: - properties: - code: - description: Code is a rule to select target by http status - code in response - type: string - delay: - description: Delay represents the delay of the target request/response - type: string - method: - description: HTTP method - type: string - path: - description: Match path of Uri with wildcard matches - type: string - port: - description: The TCP port that the target service listens - on - format: int32 - type: integer - proxy_ports: - description: Composed with one of the port of HTTP connection, - we will only attack HTTP connection with port inside proxy_ports - items: - type: integer - type: array - target: - description: 'HTTP target: Request or Response' - type: string - required: - - delay - - proxy_ports - - target - type: object - http-request: - description: used for HTTP request, now only support GET - properties: - count: - description: The number of requests to send - type: integer - enable-conn-pool: - description: Enable connection pool - type: boolean - url: - description: Request to send" - type: string - type: object - jvm-exception: - properties: - class: - description: Java class - type: string - exception: - description: the exception which needs to throw for action - `exception` - type: string - method: - description: the method in Java class - type: string - pid: - description: the pid of Java process which needs to attach - type: integer - port: - description: the port of agent server, default 9277 - format: int32 - type: integer - type: object - jvm-gc: - properties: - pid: - description: the pid of Java process which needs to attach - type: integer - port: - description: the port of agent server, default 9277 - format: int32 - type: integer - type: object - jvm-latency: - properties: - class: - description: Java class - type: string - latency: - description: the latency duration for action 'latency', unit - ms - type: integer - method: - description: the method in Java class - type: string - pid: - description: the pid of Java process which needs to attach - type: integer - port: - description: the port of agent server, default 9277 - format: int32 - type: integer - type: object - jvm-mysql: - properties: - database: - description: the match database default value is "", means - match all database - type: string - exception: - description: The exception which needs to throw for action - `exception` or the exception message needs to throw in action - `mysql` - type: string - latency: - description: The latency duration for action 'latency' or - the latency duration in action `mysql` - type: integer - mysqlConnectorVersion: - description: the version of mysql-connector-java, only support - 5.X.X(set to "5") and 8.X.X(set to "8") now - type: string - pid: - description: the pid of Java process which needs to attach - type: integer - port: - description: the port of agent server, default 9277 - format: int32 - type: integer - sqlType: - description: the match sql type default value is "", means - match all SQL type. The value can be 'select', 'insert', - 'update', 'delete', 'replace'. - type: string - table: - description: the match table default value is "", means match - all table - type: string - type: object - jvm-return: - properties: - class: - description: Java class - type: string - method: - description: the method in Java class - type: string - pid: - description: the pid of Java process which needs to attach - type: integer - port: - description: the port of agent server, default 9277 - format: int32 - type: integer - value: - description: the return value for action 'return' - type: string - type: object - jvm-rule-data: - properties: - pid: - description: the pid of Java process which needs to attach - type: integer - port: - description: the port of agent server, default 9277 - format: int32 - type: integer - rule-data: - description: RuleData used to save the rule file's data, will - use it when recover - type: string - type: object - jvm-stress: - properties: - cpu-count: - description: the CPU core number need to use, only set it - when action is stress - type: integer - mem-type: - description: the memory type need to locate, only set it when - action is stress, the value can be 'stack' or 'heap' - type: string - pid: - description: the pid of Java process which needs to attach - type: integer - port: - description: the port of agent server, default 9277 - format: int32 - type: integer - type: object - kafka-fill: - properties: - host: - description: The host of kafka server - type: string - maxBytes: - description: The max bytes to fill - format: int64 - type: integer - messageSize: - description: The size of each message - type: integer - password: - description: The password of kafka client - type: string - port: - description: The port of kafka server - type: integer - reloadCommand: - description: The command to reload kafka config - type: string - topic: - description: The topic to attack - type: string - username: - description: The username of kafka client - type: string - type: object - kafka-flood: - properties: - host: - description: The host of kafka server - type: string - messageSize: - description: The size of each message - type: integer - password: - description: The password of kafka client - type: string - port: - description: The port of kafka server - type: integer - threads: - description: The number of worker threads - type: integer - topic: - description: The topic to attack - type: string - username: - description: The username of kafka client - type: string - type: object - kafka-io: - properties: - configFile: - description: The path of server config - type: string - nonReadable: - description: Make kafka cluster non-readable - type: boolean - nonWritable: - description: Make kafka cluster non-writable - type: boolean - topic: - description: The topic to attack - type: string - type: object - mode: - description: 'Mode defines the mode to run chaos action. Supported - mode: one / all / fixed / fixed-percent / random-max-percent' - enum: - - one - - all - - fixed - - fixed-percent - - random-max-percent - type: string - network-bandwidth: - properties: - buffer: - format: int32 - minimum: 1 - type: integer - device: - type: string - hostname: - type: string - ip-address: - type: string - limit: - format: int32 - minimum: 1 - type: integer - minburst: - format: int32 - type: integer - peakrate: - format: int64 - type: integer - rate: - type: string - required: - - buffer - - limit - - rate - type: object - network-corrupt: - properties: - correlation: - description: correlation is percentage (10 is 10%) - type: string - device: - description: the network interface to impact - type: string - egress-port: - description: only impact egress traffic to these destination - ports, use a ',' to separate or to indicate the range, such - as 80, 8001:8010. it can only be used in conjunction with - -p tcp or -p udp - type: string - hostname: - description: only impact traffic to these hostnames - type: string - ip-address: - description: only impact egress traffic to these IP addresses - type: string - ip-protocol: - description: 'only impact traffic using this IP protocol, - supported: tcp, udp, icmp, all' - type: string - percent: - description: percentage of packets to corrupt (10 is 10%) - type: string - source-port: - description: only impact egress traffic from these source - ports, use a ',' to separate or to indicate the range, such - as 80, 8001:8010. it can only be used in conjunction with - -p tcp or -p udp - type: string - type: object - network-delay: - properties: - accept-tcp-flags: - description: only the packet which match the tcp flag can - be accepted, others will be dropped. only set when the IPProtocol - is tcp, used for partition. - type: string - correlation: - description: correlation is percentage (10 is 10%) - type: string - device: - description: the network interface to impact - type: string - egress-port: - description: only impact egress traffic to these destination - ports, use a ',' to separate or to indicate the range, such - as 80, 8001:8010. it can only be used in conjunction with - -p tcp or -p udp - type: string - hostname: - description: only impact traffic to these hostnames - type: string - ip-address: - description: only impact egress traffic to these IP addresses - type: string - ip-protocol: - description: 'only impact traffic using this IP protocol, - supported: tcp, udp, icmp, all' - type: string - jitter: - description: 'jitter time, time units: ns, us (or µs), ms, - s, m, h.' - type: string - latency: - description: 'delay egress time, time units: ns, us (or µs), - ms, s, m, h.' - type: string - source-port: - description: only impact egress traffic from these source - ports, use a ',' to separate or to indicate the range, such - as 80, 8001:8010. it can only be used in conjunction with - -p tcp or -p udp - type: string - type: object - network-dns: - properties: - dns-domain-name: - description: map this host to specified IP - type: string - dns-ip: - description: map specified host to this IP address - type: string - dns-server: - description: update the DNS server in /etc/resolv.conf with - this value - type: string - type: object - network-down: - properties: - device: - description: The network interface to impact - type: string - duration: - description: 'NIC down time, time units: ns, us (or µs), ms, - s, m, h.' - type: string - type: object - network-duplicate: - properties: - correlation: - description: correlation is percentage (10 is 10%) - type: string - device: - description: the network interface to impact - type: string - egress-port: - description: only impact egress traffic to these destination - ports, use a ',' to separate or to indicate the range, such - as 80, 8001:8010. it can only be used in conjunction with - -p tcp or -p udp - type: string - hostname: - description: only impact traffic to these hostnames - type: string - ip-address: - description: only impact egress traffic to these IP addresses - type: string - ip-protocol: - description: 'only impact traffic using this IP protocol, - supported: tcp, udp, icmp, all' - type: string - percent: - description: percentage of packets to duplicate (10 is 10%) - type: string - source-port: - description: only impact egress traffic from these source - ports, use a ',' to separate or to indicate the range, such - as 80, 8001:8010. it can only be used in conjunction with - -p tcp or -p udp - type: string - type: object - network-flood: - properties: - duration: - description: The number of seconds to run the iperf test - type: string - ip-address: - description: Generate traffic to this IP address - type: string - parallel: - description: The number of iperf parallel client threads to - run - format: int32 - type: integer - port: - description: Generate traffic to this port on the IP address - type: string - rate: - description: The speed of network traffic, allows bps, kbps, - mbps, gbps, tbps unit. bps means bytes per second - type: string - required: - - duration - - rate - type: object - network-loss: - properties: - correlation: - description: correlation is percentage (10 is 10%) - type: string - device: - description: the network interface to impact - type: string - egress-port: - description: only impact egress traffic to these destination - ports, use a ',' to separate or to indicate the range, such - as 80, 8001:8010. it can only be used in conjunction with - -p tcp or -p udp - type: string - hostname: - description: only impact traffic to these hostnames - type: string - ip-address: - description: only impact egress traffic to these IP addresses - type: string - ip-protocol: - description: 'only impact traffic using this IP protocol, - supported: tcp, udp, icmp, all' - type: string - percent: - description: percentage of packets to loss (10 is 10%) - type: string - source-port: - description: only impact egress traffic from these source - ports, use a ',' to separate or to indicate the range, such - as 80, 8001:8010. it can only be used in conjunction with - -p tcp or -p udp - type: string - type: object - network-partition: - properties: - accept-tcp-flags: - description: only the packet which match the tcp flag can - be accepted, others will be dropped. only set when the IPProtocol - is tcp, used for partition. - type: string - device: - description: the network interface to impact - type: string - direction: - description: specifies the partition direction, values can - be 'from', 'to'. 'from' means packets coming from the 'IPAddress' - or 'Hostname' and going to your server, 'to' means packets - originating from your server and going to the 'IPAddress' - or 'Hostname'. - type: string - hostname: - description: only impact traffic to these hostnames - type: string - ip-address: - description: only impact egress traffic to these IP addresses - type: string - ip-protocol: - description: only impact egress traffic to these IP addresses - type: string - type: object - process: - properties: - process: - description: the process name or the process ID - type: string - recoverCmd: - description: the command to be run when recovering experiment - type: string - signal: - description: the signal number to send - type: integer - type: object - redis-cacheLimit: - properties: - addr: - description: The adress of Redis server - type: string - cacheSize: - description: The size of `maxmemory` - type: string - password: - description: The password of Redis server - type: string - percent: - description: Specifies maxmemory as a percentage of the original - value - type: string - type: object - redis-expiration: - properties: - addr: - description: The adress of Redis server - type: string - expiration: - description: The expiration of the keys - type: string - key: - description: The keys to be expired - type: string - option: - description: Additional options for `expiration` - type: string - password: - description: The password of Redis server - type: string - type: object - redis-penetration: - properties: - addr: - description: The adress of Redis server - type: string - password: - description: The password of Redis server - type: string - requestNum: - description: The number of requests to be sent - type: integer - type: object - redis-restart: - properties: - addr: - description: The adress of Redis server - type: string - conf: - description: The path of Sentinel conf - type: string - flushConfig: - description: The control flag determines whether to flush - config - type: boolean - password: - description: The password of Redis server - type: string - redisPath: - description: The path of `redis-server` command-line tool - type: boolean - type: object - redis-stop: - properties: - addr: - description: The adress of Redis server - type: string - conf: - description: The path of Sentinel conf - type: string - flushConfig: - description: The control flag determines whether to flush - config - type: boolean - password: - description: The password of Redis server - type: string - redisPath: - description: The path of `redis-server` command-line tool - type: boolean - type: object - remoteCluster: - description: RemoteCluster represents the remote cluster where - the chaos will be deployed - type: string - selector: - description: Selector is used to select physical machines that - are used to inject chaos action. - properties: - annotationSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be used - to select objects. A selector based on annotations. - type: object - expressionSelectors: - description: a slice of label selector expressions that can - be used to select objects. A list of selectors based on - set-based label expressions. - items: - description: A label selector requirement is a selector - that contains values, a key, and an operator that relates - the key and values. - properties: - key: - description: key is the label key that the selector - applies to. - type: string - operator: - description: operator represents a key's relationship - to a set of values. Valid operators are In, NotIn, - Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. If - the operator is In or NotIn, the values array must - be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. This array is replaced - during a strategic merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - fieldSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be used - to select objects. A selector based on fields. - type: object - labelSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be used - to select objects. A selector based on labels. - type: object - namespaces: - description: Namespaces is a set of namespace to which objects - belong. - items: - type: string - type: array - physicalMachines: - additionalProperties: - items: - type: string - type: array - description: PhysicalMachines is a map of string keys and - a set values that used to select physical machines. The - key defines the namespace which physical machine belong, - and each value is a set of physical machine names. - type: object - type: object - stress-cpu: - properties: - load: - description: specifies P percent loading per CPU worker. 0 - is effectively a sleep (no load) and 100 is full loading. - type: integer - options: - description: extend stress-ng options - items: - type: string - type: array - workers: - description: specifies N workers to apply the stressor. - type: integer - type: object - stress-mem: - properties: - options: - description: extend stress-ng options - items: - type: string - type: array - size: - description: 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 - type: object - uid: - description: the experiment ID - type: string - user_defined: - properties: - attackCmd: - description: The command to be executed when attack - type: string - recoverCmd: - description: The command to be executed when recover - type: string - type: object - value: - description: Value is required when the mode is set to `FixedMode` - / `FixedPercentMode` / `RandomMaxPercentMode`. If `FixedMode`, - provide an integer of physical machines to do chaos action. - If `FixedPercentMode`, provide a number from 0-100 to specify - the percent of physical machines the server can do chaos action. - IF `RandomMaxPercentMode`, provide a number from 0-100 to specify - the max percent of pods to do chaos action - type: string - vm: - properties: - vm-name: - description: The name of the VM to be injected - type: string - type: object - required: - - action - - mode - type: object - podChaos: - description: PodChaosSpec defines the attributes that a user creates - on a chaos experiment about pods. - properties: - action: - description: 'Action defines the specific pod chaos action. Supported - action: pod-kill / pod-failure / container-kill Default action: - pod-kill' - enum: - - pod-kill - - pod-failure - - container-kill - type: string - containerNames: - description: ContainerNames indicates list of the name of affected - container. If not set, the first container will be injected - items: - type: string - type: array - duration: - description: Duration represents the duration of the chaos action. - It is required when the action is `PodFailureAction`. A duration - string is a possibly signed sequence of decimal numbers, each - with optional fraction and a unit suffix, such as "300ms", "-1.5h" - or "2h45m". Valid time units are "ns", "us" (or "µs"), "ms", - "s", "m", "h". - type: string - gracePeriod: - description: GracePeriod is used in pod-kill action. It represents - the duration in seconds before the pod should be deleted. Value - must be non-negative integer. The default value is zero that - indicates delete immediately. - format: int64 - minimum: 0 - type: integer - mode: - description: 'Mode defines the mode to run chaos action. Supported - mode: one / all / fixed / fixed-percent / random-max-percent' - enum: - - one - - all - - fixed - - fixed-percent - - random-max-percent - type: string - remoteCluster: - description: RemoteCluster represents the remote cluster where - the chaos will be deployed - type: string - selector: - description: Selector is used to select pods that are used to - inject chaos action. - properties: - annotationSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be used - to select objects. A selector based on annotations. - type: object - expressionSelectors: - description: a slice of label selector expressions that can - be used to select objects. A list of selectors based on - set-based label expressions. - items: - description: A label selector requirement is a selector - that contains values, a key, and an operator that relates - the key and values. - properties: - key: - description: key is the label key that the selector - applies to. - type: string - operator: - description: operator represents a key's relationship - to a set of values. Valid operators are In, NotIn, - Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. If - the operator is In or NotIn, the values array must - be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. This array is replaced - during a strategic merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - fieldSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be used - to select objects. A selector based on fields. - type: object - labelSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be used - to select objects. A selector based on labels. - type: object - namespaces: - description: Namespaces is a set of namespace to which objects - belong. - items: - type: string - type: array - nodeSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be used - to select nodes. Selector which must match a node's labels, - and objects must belong to these selected nodes. - type: object - nodes: - description: Nodes is a set of node name and objects must - belong to these nodes. - items: - type: string - type: array - podPhaseSelectors: - description: 'PodPhaseSelectors is a set of condition of a - pod at the current time. supported value: Pending / Running - / Succeeded / Failed / Unknown' - items: - type: string - type: array - pods: - additionalProperties: - items: - type: string - type: array - description: Pods is a map of string keys and a set values - that used to select pods. The key defines the namespace - which pods belong, and the each values is a set of pod names. - type: object - type: object - value: - description: Value is required when the mode is set to `FixedMode` - / `FixedPercentMode` / `RandomMaxPercentMode`. If `FixedMode`, - provide an integer of pods to do chaos action. If `FixedPercentMode`, - provide a number from 0-100 to specify the percent of pods the - server can do chaos action. IF `RandomMaxPercentMode`, provide - a number from 0-100 to specify the max percent of pods to do - chaos action - type: string - required: - - action - - mode - - selector - type: object - schedule: - description: ScheduleSpec is the specification of a schedule object - properties: - awsChaos: - description: AWSChaosSpec is the content of the specification - for an AWSChaos - properties: - action: - description: 'Action defines the specific aws chaos action. - Supported action: ec2-stop / ec2-restart / detach-volume - Default action: ec2-stop' - 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. - Needed in detach-volume. - type: string - duration: - description: Duration represents the duration of the chaos - action. - type: string - ec2Instance: - description: Ec2Instance indicates the ID of the ec2 instance. - type: string - endpoint: - description: Endpoint indicates the endpoint of the aws server. - Just used it in test now. - type: string - remoteCluster: - description: RemoteCluster represents the remote cluster where - the chaos will be deployed - type: string - secretName: - description: SecretName defines the name of kubernetes secret. - type: string - volumeID: - description: EbsVolume indicates the ID of the EBS volume. - Needed in detach-volume. - type: string - required: - - action - - awsRegion - - ec2Instance - type: object - azureChaos: - description: AzureChaosSpec is the content of the specification - for an AzureChaos - properties: - action: - description: 'Action defines the specific azure chaos action. - Supported action: vm-stop / vm-restart / disk-detach Default - action: vm-stop' - enum: - - vm-stop - - vm-restart - - disk-detach - type: string - diskName: - description: DiskName indicates the name of the disk. Needed - in disk-detach. - type: string - duration: - description: Duration represents the duration of the chaos - action. - type: string - lun: - description: LUN indicates the Logical Unit Number of the - data disk. Needed in disk-detach. - type: integer - remoteCluster: - description: RemoteCluster represents the remote cluster where - the chaos will be deployed - type: string - resourceGroupName: - description: ResourceGroupName defines the name of ResourceGroup - type: string - secretName: - description: SecretName defines the name of kubernetes secret. - It is used for Azure credentials. - type: string - subscriptionID: - description: SubscriptionID defines the id of Azure subscription. - type: string - vmName: - description: VMName defines the name of Virtual Machine - type: string - required: - - action - - resourceGroupName - - subscriptionID - - vmName - type: object - blockChaos: - description: BlockChaosSpec is the content of the specification - for a BlockChaos - properties: - action: - description: 'Action defines the specific block chaos action. - Supported action: delay' - enum: - - delay - type: string - containerNames: - description: ContainerNames indicates list of the name of - affected container. If not set, the first container will - be injected - items: - type: string - type: array - delay: - description: Delay defines the delay distribution. - properties: - correlation: - type: string - jitter: - type: string - latency: - description: Latency defines the latency of every io request. - type: string - type: object - duration: - description: Duration represents the duration of the chaos - action. - type: string - mode: - description: 'Mode defines the mode to run chaos action. Supported - mode: one / all / fixed / fixed-percent / random-max-percent' - enum: - - one - - all - - fixed - - fixed-percent - - random-max-percent - type: string - remoteCluster: - description: RemoteCluster represents the remote cluster where - the chaos will be deployed - type: string - selector: - description: Selector is used to select pods that are used - to inject chaos action. - properties: - annotationSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be - used to select objects. A selector based on annotations. - type: object - expressionSelectors: - description: a slice of label selector expressions that - can be used to select objects. A list of selectors based - on set-based label expressions. - items: - description: A label selector requirement is a selector - that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the label key that the selector - applies to. - type: string - operator: - description: operator represents a key's relationship - to a set of values. Valid operators are In, NotIn, - Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. - If the operator is In or NotIn, the values array - must be non-empty. If the operator is Exists or - DoesNotExist, the values array must be empty. - This array is replaced during a strategic merge - patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - fieldSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be - used to select objects. A selector based on fields. - type: object - labelSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be - used to select objects. A selector based on labels. - type: object - namespaces: - description: Namespaces is a set of namespace to which - objects belong. - items: - type: string - type: array - nodeSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be - used to select nodes. Selector which must match a node's - labels, and objects must belong to these selected nodes. - type: object - nodes: - description: Nodes is a set of node name and objects must - belong to these nodes. - items: - type: string - type: array - podPhaseSelectors: - description: 'PodPhaseSelectors is a set of condition - of a pod at the current time. supported value: Pending - / Running / Succeeded / Failed / Unknown' - items: - type: string - type: array - pods: - additionalProperties: - items: - type: string - type: array - description: Pods is a map of string keys and a set values - that used to select pods. The key defines the namespace - which pods belong, and the each values is a set of pod - names. - type: object - type: object - value: - description: Value is required when the mode is set to `FixedMode` - / `FixedPercentMode` / `RandomMaxPercentMode`. If `FixedMode`, - provide an integer of pods to do chaos action. If `FixedPercentMode`, - provide a number from 0-100 to specify the percent of pods - the server can do chaos action. IF `RandomMaxPercentMode`, provide - a number from 0-100 to specify the max percent of pods to - do chaos action - type: string - volumeName: - type: string - required: - - action - - mode - - selector - - volumeName - type: object - concurrencyPolicy: - default: Forbid - enum: - - Forbid - - Allow - type: string - dnsChaos: - description: DNSChaosSpec defines the desired state of DNSChaos - properties: - action: - description: 'Action defines the specific DNS chaos action. - Supported action: error, random Default action: error' - enum: - - error - - random - type: string - containerNames: - description: ContainerNames indicates list of the name of - affected container. If not set, the first container will - be injected - items: - type: string - type: array - duration: - description: Duration represents the duration of the chaos - action - type: string - mode: - description: 'Mode defines the mode to run chaos action. Supported - mode: one / all / fixed / fixed-percent / random-max-percent' - enum: - - one - - all - - fixed - - fixed-percent - - random-max-percent - type: string - patterns: - description: 'Choose which domain names to take effect, support - the placeholder ? and wildcard *, or the Specified domain - name. Note: 1. The wildcard * must be at the end of the - string. For example, chaos-*.org is invalid. 2. if the patterns - is empty, will take effect on all the domain names. For - example: The value is ["google.com", "github.*", "chaos-mes?.org"], - will take effect on "google.com", "github.com" and "chaos-mesh.org"' - items: - type: string - type: array - remoteCluster: - description: RemoteCluster represents the remote cluster where - the chaos will be deployed - type: string - selector: - description: Selector is used to select pods that are used - to inject chaos action. - properties: - annotationSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be - used to select objects. A selector based on annotations. - type: object - expressionSelectors: - description: a slice of label selector expressions that - can be used to select objects. A list of selectors based - on set-based label expressions. - items: - description: A label selector requirement is a selector - that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the label key that the selector - applies to. - type: string - operator: - description: operator represents a key's relationship - to a set of values. Valid operators are In, NotIn, - Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. - If the operator is In or NotIn, the values array - must be non-empty. If the operator is Exists or - DoesNotExist, the values array must be empty. - This array is replaced during a strategic merge - patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - fieldSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be - used to select objects. A selector based on fields. - type: object - labelSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be - used to select objects. A selector based on labels. - type: object - namespaces: - description: Namespaces is a set of namespace to which - objects belong. - items: - type: string - type: array - nodeSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be - used to select nodes. Selector which must match a node's - labels, and objects must belong to these selected nodes. - type: object - nodes: - description: Nodes is a set of node name and objects must - belong to these nodes. - items: - type: string - type: array - podPhaseSelectors: - description: 'PodPhaseSelectors is a set of condition - of a pod at the current time. supported value: Pending - / Running / Succeeded / Failed / Unknown' - items: - type: string - type: array - pods: - additionalProperties: - items: - type: string - type: array - description: Pods is a map of string keys and a set values - that used to select pods. The key defines the namespace - which pods belong, and the each values is a set of pod - names. - type: object - type: object - value: - description: Value is required when the mode is set to `FixedMode` - / `FixedPercentMode` / `RandomMaxPercentMode`. If `FixedMode`, - provide an integer of pods to do chaos action. If `FixedPercentMode`, - provide a number from 0-100 to specify the percent of pods - the server can do chaos action. IF `RandomMaxPercentMode`, provide - a number from 0-100 to specify the max percent of pods to - do chaos action - type: string - required: - - action - - mode - - selector - type: object - gcpChaos: - description: GCPChaosSpec is the content of the specification - for a GCPChaos - properties: - action: - description: 'Action defines the specific gcp chaos action. - Supported action: node-stop / node-reset / disk-loss Default - action: node-stop' - enum: - - node-stop - - node-reset - - disk-loss - type: string - deviceNames: - description: The device name of disks to detach. Needed in - disk-loss. - items: - type: string - type: array - duration: - description: Duration represents the duration of the chaos - action. - type: string - instance: - description: Instance defines the name of the instance - type: string - project: - description: Project defines the ID of gcp project. - type: string - remoteCluster: - description: RemoteCluster represents the remote cluster where - the chaos will be deployed - type: string - secretName: - description: SecretName defines the name of kubernetes secret. - It is used for GCP credentials. - type: string - zone: - description: Zone defines the zone of gcp project. - type: string - required: - - action - - instance - - project - - zone - type: object - historyLimit: - minimum: 1 - type: integer - httpChaos: - properties: - abort: - description: Abort is a rule to abort a http session. - type: boolean - code: - description: Code is a rule to select target by http status - code in response. - format: int32 - type: integer - delay: - description: Delay represents the delay of the target request/response. - A duration string is a possibly unsigned sequence of decimal - numbers, each with optional fraction and a unit suffix, - such as "300ms", "2h45m". Valid time units are "ns", "us" - (or "µs"), "ms", "s", "m", "h". - type: string - duration: - description: Duration represents the duration of the chaos - action. - type: string - method: - description: Method is a rule to select target by http method - in request. - type: string - mode: - description: 'Mode defines the mode to run chaos action. Supported - mode: one / all / fixed / fixed-percent / random-max-percent' - enum: - - one - - all - - fixed - - fixed-percent - - random-max-percent - type: string - patch: - description: Patch is a rule to patch some contents in target. - properties: - body: - description: Body is a rule to patch message body of target. - properties: - type: - description: Type represents the patch type, only - support `JSON` as [merge patch json](https://tools.ietf.org/html/rfc7396) - currently. - type: string - value: - description: Value is the patch contents. - type: string - required: - - type - - value - type: object - headers: - description: 'Headers is a rule to append http headers - of target. For example: `[["Set-Cookie", ""], - ["Set-Cookie", ""]]`.' - items: - items: - type: string - type: array - type: array - queries: - description: 'Queries is a rule to append uri queries - of target(Request only). For example: `[["foo", "bar"], - ["foo", "unknown"]]`.' - items: - items: - type: string - type: array - type: array - type: object - path: - description: Path is a rule to select target by uri path in - http request. - type: string - port: - description: Port represents the target port to be proxy of. - format: int32 - type: integer - remoteCluster: - description: RemoteCluster represents the remote cluster where - the chaos will be deployed - type: string - replace: - description: Replace is a rule to replace some contents in - target. - properties: - body: - description: Body is a rule to replace http message body - in target. - format: byte - type: string - code: - description: Code is a rule to replace http status code - in response. - format: int32 - type: integer - headers: - additionalProperties: - type: string - description: Headers is a rule to replace http headers - of target. The key-value pairs represent header name - and header value pairs. - type: object - method: - description: Method is a rule to replace http method in - request. - type: string - path: - description: Path is rule to to replace uri path in http - request. - type: string - queries: - additionalProperties: - type: string - description: 'Queries is a rule to replace uri queries - in http request. For example, with value `{ "foo": "unknown" - }`, the `/?foo=bar` will be altered to `/?foo=unknown`,' - type: object - type: object - request_headers: - additionalProperties: - type: string - description: RequestHeaders is a rule to select target by - http headers in request. The key-value pairs represent header - name and header value pairs. - type: object - response_headers: - additionalProperties: - type: string - description: ResponseHeaders is a rule to select target by - http headers in response. The key-value pairs represent - header name and header value pairs. - type: object - selector: - description: Selector is used to select pods that are used - to inject chaos action. - properties: - annotationSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be - used to select objects. A selector based on annotations. - type: object - expressionSelectors: - description: a slice of label selector expressions that - can be used to select objects. A list of selectors based - on set-based label expressions. - items: - description: A label selector requirement is a selector - that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the label key that the selector - applies to. - type: string - operator: - description: operator represents a key's relationship - to a set of values. Valid operators are In, NotIn, - Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. - If the operator is In or NotIn, the values array - must be non-empty. If the operator is Exists or - DoesNotExist, the values array must be empty. - This array is replaced during a strategic merge - patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - fieldSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be - used to select objects. A selector based on fields. - type: object - labelSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be - used to select objects. A selector based on labels. - type: object - namespaces: - description: Namespaces is a set of namespace to which - objects belong. - items: - type: string - type: array - nodeSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be - used to select nodes. Selector which must match a node's - labels, and objects must belong to these selected nodes. - type: object - nodes: - description: Nodes is a set of node name and objects must - belong to these nodes. - items: - type: string - type: array - podPhaseSelectors: - description: 'PodPhaseSelectors is a set of condition - of a pod at the current time. supported value: Pending - / Running / Succeeded / Failed / Unknown' - items: - type: string - type: array - pods: - additionalProperties: - items: - type: string - type: array - description: Pods is a map of string keys and a set values - that used to select pods. The key defines the namespace - which pods belong, and the each values is a set of pod - names. - type: object - type: object - target: - description: Target is the object to be selected and injected. - enum: - - Request - - Response - type: string - tls: - description: TLS is the tls config, will override PodHttpChaos - if there are multiple HTTPChaos experiments are applied - properties: - caName: - description: CAName represents the data name of ca file - in secret, `ca.crt` for example - type: string - certName: - description: CertName represents the data name of cert - file in secret, `tls.crt` for example - type: string - keyName: - description: KeyName represents the data name of key file - in secret, `tls.key` for example - type: string - secretName: - description: SecretName represents the name of required - secret resource - type: string - secretNamespace: - description: SecretNamespace represents the namespace - of required secret resource - type: string - required: - - certName - - keyName - - secretName - - secretNamespace - type: object - value: - description: Value is required when the mode is set to `FixedMode` - / `FixedPercentMode` / `RandomMaxPercentMode`. If `FixedMode`, - provide an integer of pods to do chaos action. If `FixedPercentMode`, - provide a number from 0-100 to specify the percent of pods - the server can do chaos action. IF `RandomMaxPercentMode`, provide - a number from 0-100 to specify the max percent of pods to - do chaos action - type: string - required: - - mode - - selector - - target - type: object - ioChaos: - description: IOChaosSpec defines the desired state of IOChaos - properties: - action: - description: 'Action defines the specific pod chaos action. - Supported action: latency / fault / attrOverride / mistake' - enum: - - latency - - fault - - attrOverride - - mistake - type: string - attr: - description: Attr defines the overrided attribution - properties: - atime: - description: Timespec represents a time - properties: - nsec: - format: int64 - type: integer - sec: - format: int64 - type: integer - required: - - nsec - - sec - type: object - blocks: - format: int64 - type: integer - ctime: - description: Timespec represents a time - properties: - nsec: - format: int64 - type: integer - sec: - format: int64 - type: integer - required: - - nsec - - sec - type: object - gid: - format: int32 - type: integer - ino: - format: int64 - type: integer - kind: - description: FileType represents type of file - type: string - mtime: - description: Timespec represents a time - properties: - nsec: - format: int64 - type: integer - sec: - format: int64 - type: integer - required: - - nsec - - sec - type: object - nlink: - format: int32 - type: integer - perm: - type: integer - rdev: - format: int32 - type: integer - size: - format: int64 - type: integer - uid: - format: int32 - type: integer - type: object - containerNames: - description: ContainerNames indicates list of the name of - affected container. If not set, the first container will - be injected - items: - type: string - type: array - delay: - description: Delay defines the value of I/O chaos action delay. - A delay string is a possibly signed sequence of decimal - numbers, each with optional fraction and a unit suffix, - such as "300ms". Valid time units are "ns", "us" (or "µs"), - "ms", "s", "m", "h". - type: string - duration: - description: Duration represents the duration of the chaos - action. It is required when the action is `PodFailureAction`. - A duration string is a possibly signed sequence of decimal - numbers, each with optional fraction and a unit suffix, - such as "300ms", "-1.5h" or "2h45m". Valid time units are - "ns", "us" (or "µs"), "ms", "s", "m", "h". - type: string - errno: - description: 'Errno defines the error code that returned by - I/O action. refer to: https://www-numi.fnal.gov/offline_software/srt_public_context/WebDocs/Errors/unix_system_errors.html' - format: int32 - type: integer - methods: - description: 'Methods defines the I/O methods for injecting - I/O chaos action. default: all I/O methods.' - items: - type: string - type: array - mistake: - description: Mistake defines what types of incorrectness are - injected to IO operations - properties: - filling: - description: Filling determines what is filled in the - mistake data. - enum: - - zero - - random - type: string - maxLength: - description: Max length of each wrong data segment in - bytes - format: int64 - minimum: 1 - type: integer - maxOccurrences: - description: There will be [1, MaxOccurrences] segments - of wrong data. - format: int64 - minimum: 1 - type: integer - type: object - mode: - description: 'Mode defines the mode to run chaos action. Supported - mode: one / all / fixed / fixed-percent / random-max-percent' - enum: - - one - - all - - fixed - - fixed-percent - - random-max-percent - type: string - path: - description: Path defines the path of files for injecting - I/O chaos action. - type: string - percent: - default: 100 - description: 'Percent defines the percentage of injection - errors and provides a number from 0-100. default: 100.' - type: integer - remoteCluster: - description: RemoteCluster represents the remote cluster where - the chaos will be deployed - type: string - selector: - description: Selector is used to select pods that are used - to inject chaos action. - properties: - annotationSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be - used to select objects. A selector based on annotations. - type: object - expressionSelectors: - description: a slice of label selector expressions that - can be used to select objects. A list of selectors based - on set-based label expressions. - items: - description: A label selector requirement is a selector - that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the label key that the selector - applies to. - type: string - operator: - description: operator represents a key's relationship - to a set of values. Valid operators are In, NotIn, - Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. - If the operator is In or NotIn, the values array - must be non-empty. If the operator is Exists or - DoesNotExist, the values array must be empty. - This array is replaced during a strategic merge - patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - fieldSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be - used to select objects. A selector based on fields. - type: object - labelSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be - used to select objects. A selector based on labels. - type: object - namespaces: - description: Namespaces is a set of namespace to which - objects belong. - items: - type: string - type: array - nodeSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be - used to select nodes. Selector which must match a node's - labels, and objects must belong to these selected nodes. - type: object - nodes: - description: Nodes is a set of node name and objects must - belong to these nodes. - items: - type: string - type: array - podPhaseSelectors: - description: 'PodPhaseSelectors is a set of condition - of a pod at the current time. supported value: Pending - / Running / Succeeded / Failed / Unknown' - items: - type: string - type: array - pods: - additionalProperties: - items: - type: string - type: array - description: Pods is a map of string keys and a set values - that used to select pods. The key defines the namespace - which pods belong, and the each values is a set of pod - names. - type: object - type: object - value: - description: Value is required when the mode is set to `FixedMode` - / `FixedPercentMode` / `RandomMaxPercentMode`. If `FixedMode`, - provide an integer of pods to do chaos action. If `FixedPercentMode`, - provide a number from 0-100 to specify the percent of pods - the server can do chaos action. IF `RandomMaxPercentMode`, provide - a number from 0-100 to specify the max percent of pods to - do chaos action - type: string - volumePath: - description: VolumePath represents the mount path of injected - volume - type: string - required: - - action - - mode - - selector - - volumePath - type: object - jvmChaos: - description: JVMChaosSpec defines the desired state of JVMChaos - properties: - action: - description: 'Action defines the specific jvm chaos action. - Supported action: latency;return;exception;stress;gc;ruleData' - enum: - - latency - - return - - exception - - stress - - gc - - ruleData - - mysql - type: string - class: - description: Java class - type: string - containerNames: - description: ContainerNames indicates list of the name of - affected container. If not set, the first container will - be injected - items: - type: string - type: array - cpuCount: - description: the CPU core number needs to use, only set it - when action is stress - type: integer - database: - description: the match database default value is "", means - match all database - type: string - duration: - description: Duration represents the duration of the chaos - action - type: string - exception: - description: the exception which needs to throw for action - `exception` or the exception message needs to throw in action - `mysql` - type: string - latency: - description: the latency duration for action 'latency', unit - ms or the latency duration in action `mysql` - type: integer - memType: - description: the memory type needs to locate, only set it - when action is stress, the value can be 'stack' or 'heap' - type: string - method: - description: the method in Java class - type: string - mode: - description: 'Mode defines the mode to run chaos action. Supported - mode: one / all / fixed / fixed-percent / random-max-percent' - enum: - - one - - all - - fixed - - fixed-percent - - random-max-percent - type: string - mysqlConnectorVersion: - description: the version of mysql-connector-java, only support - 5.X.X(set to "5") and 8.X.X(set to "8") now - type: string - name: - description: byteman rule name, should be unique, and will - generate one if not set - type: string - pid: - description: the pid of Java process which needs to attach - type: integer - port: - description: the port of agent server, default 9277 - format: int32 - type: integer - remoteCluster: - description: RemoteCluster represents the remote cluster where - the chaos will be deployed - type: string - ruleData: - description: the byteman rule's data for action 'ruleData' - type: string - selector: - description: Selector is used to select pods that are used - to inject chaos action. - properties: - annotationSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be - used to select objects. A selector based on annotations. - type: object - expressionSelectors: - description: a slice of label selector expressions that - can be used to select objects. A list of selectors based - on set-based label expressions. - items: - description: A label selector requirement is a selector - that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the label key that the selector - applies to. - type: string - operator: - description: operator represents a key's relationship - to a set of values. Valid operators are In, NotIn, - Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. - If the operator is In or NotIn, the values array - must be non-empty. If the operator is Exists or - DoesNotExist, the values array must be empty. - This array is replaced during a strategic merge - patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - fieldSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be - used to select objects. A selector based on fields. - type: object - labelSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be - used to select objects. A selector based on labels. - type: object - namespaces: - description: Namespaces is a set of namespace to which - objects belong. - items: - type: string - type: array - nodeSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be - used to select nodes. Selector which must match a node's - labels, and objects must belong to these selected nodes. - type: object - nodes: - description: Nodes is a set of node name and objects must - belong to these nodes. - items: - type: string - type: array - podPhaseSelectors: - description: 'PodPhaseSelectors is a set of condition - of a pod at the current time. supported value: Pending - / Running / Succeeded / Failed / Unknown' - items: - type: string - type: array - pods: - additionalProperties: - items: - type: string - type: array - description: Pods is a map of string keys and a set values - that used to select pods. The key defines the namespace - which pods belong, and the each values is a set of pod - names. - type: object - type: object - sqlType: - description: the match sql type default value is "", means - match all SQL type. The value can be 'select', 'insert', - 'update', 'delete', 'replace'. - type: string - table: - description: the match table default value is "", means match - all table - type: string - value: - description: Value is required when the mode is set to `FixedMode` - / `FixedPercentMode` / `RandomMaxPercentMode`. If `FixedMode`, - provide an integer of pods to do chaos action. If `FixedPercentMode`, - provide a number from 0-100 to specify the percent of pods - the server can do chaos action. IF `RandomMaxPercentMode`, provide - a number from 0-100 to specify the max percent of pods to - do chaos action - type: string - required: - - action - - mode - - selector - type: object - kernelChaos: - description: KernelChaosSpec defines the desired state of KernelChaos - properties: - containerNames: - description: ContainerNames indicates list of the name of - affected container. If not set, the first container will - be injected - items: - type: string - type: array - duration: - description: Duration represents the duration of the chaos - action - type: string - failKernRequest: - description: FailKernRequest defines the request of kernel - injection - properties: - callchain: - description: 'Callchain indicate a special call chain, - such as: ext4_mount -> mount_subtree -> ... -> should_failslab - With an optional set of predicates and an optional set - of parameters, which used with predicates. You can read - call chan and predicate examples from https://github.com/chaos-mesh/bpfki/tree/develop/examples - to learn more. If no special call chain, just keep Callchain - empty, which means it will fail at any call chain with - slab alloc (eg: kmalloc).' - items: - description: Frame defines the function signature and - predicate in function's body - properties: - funcname: - description: Funcname can be find from kernel source - or `/proc/kallsyms`, such as `ext4_mount` - type: string - parameters: - description: Parameters is used with predicate, - for example, if you want to inject slab error - in `d_alloc_parallel(struct dentry *parent, const - struct qstr *name)` with a special name `bananas`, - you need to set it to `struct dentry *parent, - const struct qstr *name` otherwise omit it. - type: string - predicate: - description: Predicate will access the arguments - of this Frame, example with Parameters's, you - can set it to `STRNCMP(name->name, "bananas", - 8)` to make inject only with it, or omit it to - inject for all d_alloc_parallel call chain. - type: string - type: object - type: array - failtype: - description: 'FailType indicates what to fail, can be - set to ''0'' / ''1'' / ''2'' If `0`, indicates slab - to fail (should_failslab) If `1`, indicates alloc_page - to fail (should_fail_alloc_page) If `2`, indicates bio - to fail (should_fail_bio) You can read: 1. https://www.kernel.org/doc/html/latest/fault-injection/fault-injection.html - 2. http://github.com/iovisor/bcc/blob/master/tools/inject_example.txt - to learn more' - format: int32 - maximum: 2 - minimum: 0 - type: integer - headers: - description: 'Headers indicates the appropriate kernel - headers you need. Eg: "linux/mmzone.h", "linux/blkdev.h" - and so on' - items: - type: string - type: array - probability: - description: Probability indicates the fails with probability. - If you want 1%, please set this field with 1. - format: int32 - maximum: 100 - minimum: 0 - type: integer - times: - description: Times indicates the max times of fails. - format: int32 - minimum: 0 - type: integer - required: - - failtype - type: object - mode: - description: 'Mode defines the mode to run chaos action. Supported - mode: one / all / fixed / fixed-percent / random-max-percent' - enum: - - one - - all - - fixed - - fixed-percent - - random-max-percent - type: string - remoteCluster: - description: RemoteCluster represents the remote cluster where - the chaos will be deployed - type: string - selector: - description: Selector is used to select pods that are used - to inject chaos action. - properties: - annotationSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be - used to select objects. A selector based on annotations. - type: object - expressionSelectors: - description: a slice of label selector expressions that - can be used to select objects. A list of selectors based - on set-based label expressions. - items: - description: A label selector requirement is a selector - that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the label key that the selector - applies to. - type: string - operator: - description: operator represents a key's relationship - to a set of values. Valid operators are In, NotIn, - Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. - If the operator is In or NotIn, the values array - must be non-empty. If the operator is Exists or - DoesNotExist, the values array must be empty. - This array is replaced during a strategic merge - patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - fieldSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be - used to select objects. A selector based on fields. - type: object - labelSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be - used to select objects. A selector based on labels. - type: object - namespaces: - description: Namespaces is a set of namespace to which - objects belong. - items: - type: string - type: array - nodeSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be - used to select nodes. Selector which must match a node's - labels, and objects must belong to these selected nodes. - type: object - nodes: - description: Nodes is a set of node name and objects must - belong to these nodes. - items: - type: string - type: array - podPhaseSelectors: - description: 'PodPhaseSelectors is a set of condition - of a pod at the current time. supported value: Pending - / Running / Succeeded / Failed / Unknown' - items: - type: string - type: array - pods: - additionalProperties: - items: - type: string - type: array - description: Pods is a map of string keys and a set values - that used to select pods. The key defines the namespace - which pods belong, and the each values is a set of pod - names. - type: object - type: object - value: - description: Value is required when the mode is set to `FixedMode` - / `FixedPercentMode` / `RandomMaxPercentMode`. If `FixedMode`, - provide an integer of pods to do chaos action. If `FixedPercentMode`, - provide a number from 0-100 to specify the percent of pods - the server can do chaos action. IF `RandomMaxPercentMode`, provide - a number from 0-100 to specify the max percent of pods to - do chaos action - type: string - required: - - failKernRequest - - mode - - selector - type: object - networkChaos: - description: NetworkChaosSpec defines the desired state of NetworkChaos - properties: - action: - description: 'Action defines the specific network chaos action. - Supported action: partition, netem, delay, loss, duplicate, - corrupt Default action: delay' - enum: - - netem - - delay - - loss - - duplicate - - corrupt - - partition - - bandwidth - type: string - bandwidth: - description: Bandwidth represents the detail about bandwidth - control action - properties: - buffer: - description: Buffer is the maximum amount of bytes that - tokens can be available for instantaneously. - format: int32 - minimum: 1 - type: integer - limit: - description: Limit is the number of bytes that can be - queued waiting for tokens to become available. - format: int32 - minimum: 1 - type: integer - minburst: - description: Minburst specifies the size of the peakrate - bucket. For perfect accuracy, should be set to the MTU - of the interface. If a peakrate is needed, but some - burstiness is acceptable, this size can be raised. A - 3000 byte minburst allows around 3mbit/s of peakrate, - given 1000 byte packets. - format: int32 - minimum: 0 - type: integer - peakrate: - description: Peakrate is the maximum depletion rate of - the bucket. The peakrate does not need to be set, it - is only necessary if perfect millisecond timescale shaping - is required. - format: int64 - minimum: 0 - type: integer - rate: - description: Rate is the speed knob. Allows bit, kbit, - mbit, gbit, tbit, bps, kbps, mbps, gbps, tbps unit. - bps means bytes per second. - type: string - required: - - buffer - - limit - - rate - type: object - corrupt: - description: Corrupt represents the detail about corrupt action - properties: - correlation: - type: string - corrupt: - type: string - required: - - corrupt - type: object - delay: - description: Delay represents the detail about delay action - properties: - correlation: - type: string - jitter: - type: string - latency: - type: string - reorder: - description: ReorderSpec defines details of packet reorder. - properties: - correlation: - type: string - gap: - type: integer - reorder: - type: string - required: - - gap - - reorder - type: object - required: - - latency - type: object - device: - description: Device represents the network device to be affected. - type: string - direction: - default: to - description: Direction represents the direction, this applies - on netem and network partition action - enum: - - to - - from - - both - type: string - duplicate: - description: DuplicateSpec represents the detail about loss - action - properties: - correlation: - type: string - duplicate: - type: string - required: - - duplicate - type: object - duration: - description: Duration represents the duration of the chaos - action - type: string - externalTargets: - description: ExternalTargets represents network targets outside - k8s - items: - type: string - type: array - loss: - description: Loss represents the detail about loss action - properties: - correlation: - type: string - loss: - type: string - required: - - loss - type: object - mode: - description: 'Mode defines the mode to run chaos action. Supported - mode: one / all / fixed / fixed-percent / random-max-percent' - enum: - - one - - all - - fixed - - fixed-percent - - random-max-percent - type: string - rate: - description: Rate represents the detail about rate control - action - properties: - rate: - description: Rate is the speed knob. Allows bit, kbit, - mbit, gbit, tbit, bps, kbps, mbps, gbps, tbps unit. - bps means bytes per second. - type: string - required: - - rate - type: object - remoteCluster: - description: RemoteCluster represents the remote cluster where - the chaos will be deployed - type: string - selector: - description: Selector is used to select pods that are used - to inject chaos action. - properties: - annotationSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be - used to select objects. A selector based on annotations. - type: object - expressionSelectors: - description: a slice of label selector expressions that - can be used to select objects. A list of selectors based - on set-based label expressions. - items: - description: A label selector requirement is a selector - that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the label key that the selector - applies to. - type: string - operator: - description: operator represents a key's relationship - to a set of values. Valid operators are In, NotIn, - Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. - If the operator is In or NotIn, the values array - must be non-empty. If the operator is Exists or - DoesNotExist, the values array must be empty. - This array is replaced during a strategic merge - patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - fieldSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be - used to select objects. A selector based on fields. - type: object - labelSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be - used to select objects. A selector based on labels. - type: object - namespaces: - description: Namespaces is a set of namespace to which - objects belong. - items: - type: string - type: array - nodeSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be - used to select nodes. Selector which must match a node's - labels, and objects must belong to these selected nodes. - type: object - nodes: - description: Nodes is a set of node name and objects must - belong to these nodes. - items: - type: string - type: array - podPhaseSelectors: - description: 'PodPhaseSelectors is a set of condition - of a pod at the current time. supported value: Pending - / Running / Succeeded / Failed / Unknown' - items: - type: string - type: array - pods: - additionalProperties: - items: - type: string - type: array - description: Pods is a map of string keys and a set values - that used to select pods. The key defines the namespace - which pods belong, and the each values is a set of pod - names. - type: object - type: object - target: - description: Target represents network target, this applies - on netem and network partition action - properties: - mode: - description: 'Mode defines the mode to run chaos action. - Supported mode: one / all / fixed / fixed-percent / - random-max-percent' - enum: - - one - - all - - fixed - - fixed-percent - - random-max-percent - type: string - selector: - description: Selector is used to select pods that are - used to inject chaos action. - properties: - annotationSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can - be used to select objects. A selector based on annotations. - type: object - expressionSelectors: - description: a slice of label selector expressions - that can be used to select objects. A list of selectors - based on set-based label expressions. - items: - description: A label selector requirement is a selector - that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the label key that the selector - applies to. - type: string - operator: - description: operator represents a key's relationship - to a set of values. Valid operators are In, - NotIn, Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. - If the operator is In or NotIn, the values - array must be non-empty. If the operator is - Exists or DoesNotExist, the values array must - be empty. This array is replaced during a - strategic merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - fieldSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can - be used to select objects. A selector based on fields. - type: object - labelSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can - be used to select objects. A selector based on labels. - type: object - namespaces: - description: Namespaces is a set of namespace to which - objects belong. - items: - type: string - type: array - nodeSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can - be used to select nodes. Selector which must match - a node's labels, and objects must belong to these - selected nodes. - type: object - nodes: - description: Nodes is a set of node name and objects - must belong to these nodes. - items: - type: string - type: array - podPhaseSelectors: - description: 'PodPhaseSelectors is a set of condition - of a pod at the current time. supported value: Pending - / Running / Succeeded / Failed / Unknown' - items: - type: string - type: array - pods: - additionalProperties: - items: - type: string - type: array - description: Pods is a map of string keys and a set - values that used to select pods. The key defines - the namespace which pods belong, and the each values - is a set of pod names. - type: object - type: object - value: - description: Value is required when the mode is set to - `FixedMode` / `FixedPercentMode` / `RandomMaxPercentMode`. - If `FixedMode`, provide an integer of pods to do chaos - action. If `FixedPercentMode`, provide a number from - 0-100 to specify the percent of pods the server can - do chaos action. IF `RandomMaxPercentMode`, provide - a number from 0-100 to specify the max percent of pods - to do chaos action - type: string - required: - - mode - - selector - type: object - targetDevice: - description: TargetDevice represents the network device to - be affected in target scope. - type: string - value: - description: Value is required when the mode is set to `FixedMode` - / `FixedPercentMode` / `RandomMaxPercentMode`. If `FixedMode`, - provide an integer of pods to do chaos action. If `FixedPercentMode`, - provide a number from 0-100 to specify the percent of pods - the server can do chaos action. IF `RandomMaxPercentMode`, provide - a number from 0-100 to specify the max percent of pods to - do chaos action - type: string - required: - - action - - mode - - selector - type: object - physicalmachineChaos: - description: PhysicalMachineChaosSpec defines the desired state - of PhysicalMachineChaos - properties: - action: - description: the subAction, generate automatically - enum: - - stress-cpu - - stress-mem - - disk-read-payload - - disk-write-payload - - disk-fill - - network-corrupt - - network-duplicate - - network-loss - - network-delay - - network-partition - - network-dns - - network-bandwidth - - network-flood - - network-down - - process - - jvm-exception - - jvm-gc - - jvm-latency - - jvm-return - - jvm-stress - - jvm-rule-data - - jvm-mysql - - clock - - redis-expiration - - redis-penetration - - redis-cacheLimit - - redis-restart - - redis-stop - - kafka-fill - - kafka-flood - - kafka-io - - file-create - - file-modify - - file-delete - - file-rename - - file-append - - file-replace - - vm - - user_defined - type: string - address: - description: 'DEPRECATED: Use Selector instead. Only one of - Address and Selector could be specified.' - items: - type: string - type: array - clock: - properties: - clock-ids-slice: - description: the identifier of the particular clock on - which to act. More clock description in linux kernel - can be found in man page of clock_getres, clock_gettime, - clock_settime. Muti clock ids should be split with "," - type: string - pid: - description: the pid of target program. - type: integer - time-offset: - description: specifies the length of time offset. - type: string - type: object - disk-fill: - properties: - fill-by-fallocate: - description: fill disk by fallocate - type: boolean - path: - description: specifies the location to fill data in. if - path not provided, payload will read/write from/into - a temp file, temp file will be deleted after writing - type: string - size: - description: 'specifies how many units of data will write - into the file path. support unit: c=1, w=2, b=512, kB=1000, - K=1024, MB=1000*1000, M=1024*1024, GB=1000*1000*1000, - G=1024*1024*1024 BYTES. example : 1M | 512kB' - type: string - type: object - disk-read-payload: - properties: - path: - description: specifies the location to fill data in. if - path not provided, payload will read/write from/into - a temp file, temp file will be deleted after writing - type: string - payload-process-num: - description: specifies the number of process work on writing, - default 1, only 1-255 is valid value - type: integer - size: - description: 'specifies how many units of data will write - into the file path. support unit: c=1, w=2, b=512, kB=1000, - K=1024, MB=1000*1000, M=1024*1024, GB=1000*1000*1000, - G=1024*1024*1024 BYTES. example : 1M | 512kB' - type: string - type: object - disk-write-payload: - properties: - path: - description: specifies the location to fill data in. if - path not provided, payload will read/write from/into - a temp file, temp file will be deleted after writing - type: string - payload-process-num: - description: specifies the number of process work on writing, - default 1, only 1-255 is valid value - type: integer - size: - description: 'specifies how many units of data will write - into the file path. support unit: c=1, w=2, b=512, kB=1000, - K=1024, MB=1000*1000, M=1024*1024, GB=1000*1000*1000, - G=1024*1024*1024 BYTES. example : 1M | 512kB' - type: string - type: object - duration: - description: Duration represents the duration of the chaos - action - type: string - file-append: - properties: - count: - description: Count is the number of times to append the - data. - type: integer - data: - description: Data is the data for append. - type: string - file-name: - description: FileName is the name of the file to be created, - modified, deleted, renamed, or appended. - type: string - type: object - file-create: - properties: - dir-name: - description: DirName is the directory name to create or - delete. - type: string - file-name: - description: FileName is the name of the file to be created, - modified, deleted, renamed, or appended. - type: string - type: object - file-delete: - properties: - dir-name: - description: DirName is the directory name to create or - delete. - type: string - file-name: - description: FileName is the name of the file to be created, - modified, deleted, renamed, or appended. - type: string - type: object - file-modify: - properties: - file-name: - description: FileName is the name of the file to be created, - modified, deleted, renamed, or appended. - type: string - privilege: - description: Privilege is the file privilege to be set. - format: int32 - type: integer - type: object - file-rename: - properties: - dest-file: - description: DestFile is the name to be renamed. - type: string - source-file: - description: SourceFile is the name need to be renamed. - type: string - type: object - file-replace: - properties: - dest-string: - description: DestStr is the destination string of the - file. - type: string - file-name: - description: FileName is the name of the file to be created, - modified, deleted, renamed, or appended. - type: string - line: - description: Line is the line number of the file to be - replaced. - type: integer - origin-string: - description: OriginStr is the origin string of the file. - type: string - type: object - http-abort: - properties: - code: - description: Code is a rule to select target by http status - code in response - type: string - method: - description: HTTP method - type: string - path: - description: Match path of Uri with wildcard matches - type: string - port: - description: The TCP port that the target service listens - on - format: int32 - type: integer - proxy_ports: - description: Composed with one of the port of HTTP connection, - we will only attack HTTP connection with port inside - proxy_ports - items: - type: integer - type: array - target: - description: 'HTTP target: Request or Response' - type: string - required: - - proxy_ports - - target - type: object - http-config: - properties: - file_path: - description: The config file path - type: string - type: object - http-delay: - properties: - code: - description: Code is a rule to select target by http status - code in response - type: string - delay: - description: Delay represents the delay of the target - request/response - type: string - method: - description: HTTP method - type: string - path: - description: Match path of Uri with wildcard matches - type: string - port: - description: The TCP port that the target service listens - on - format: int32 - type: integer - proxy_ports: - description: Composed with one of the port of HTTP connection, - we will only attack HTTP connection with port inside - proxy_ports - items: - type: integer - type: array - target: - description: 'HTTP target: Request or Response' - type: string - required: - - delay - - proxy_ports - - target - type: object - http-request: - description: used for HTTP request, now only support GET - properties: - count: - description: The number of requests to send - type: integer - enable-conn-pool: - description: Enable connection pool - type: boolean - url: - description: Request to send" - type: string - type: object - jvm-exception: - properties: - class: - description: Java class - type: string - exception: - description: the exception which needs to throw for action - `exception` - type: string - method: - description: the method in Java class - type: string - pid: - description: the pid of Java process which needs to attach - type: integer - port: - description: the port of agent server, default 9277 - format: int32 - type: integer - type: object - jvm-gc: - properties: - pid: - description: the pid of Java process which needs to attach - type: integer - port: - description: the port of agent server, default 9277 - format: int32 - type: integer - type: object - jvm-latency: - properties: - class: - description: Java class - type: string - latency: - description: the latency duration for action 'latency', - unit ms - type: integer - method: - description: the method in Java class - type: string - pid: - description: the pid of Java process which needs to attach - type: integer - port: - description: the port of agent server, default 9277 - format: int32 - type: integer - type: object - jvm-mysql: - properties: - database: - description: the match database default value is "", means - match all database - type: string - exception: - description: The exception which needs to throw for action - `exception` or the exception message needs to throw - in action `mysql` - type: string - latency: - description: The latency duration for action 'latency' - or the latency duration in action `mysql` - type: integer - mysqlConnectorVersion: - description: the version of mysql-connector-java, only - support 5.X.X(set to "5") and 8.X.X(set to "8") now - type: string - pid: - description: the pid of Java process which needs to attach - type: integer - port: - description: the port of agent server, default 9277 - format: int32 - type: integer - sqlType: - description: the match sql type default value is "", means - match all SQL type. The value can be 'select', 'insert', - 'update', 'delete', 'replace'. - type: string - table: - description: the match table default value is "", means - match all table - type: string - type: object - jvm-return: - properties: - class: - description: Java class - type: string - method: - description: the method in Java class - type: string - pid: - description: the pid of Java process which needs to attach - type: integer - port: - description: the port of agent server, default 9277 - format: int32 - type: integer - value: - description: the return value for action 'return' - type: string - type: object - jvm-rule-data: - properties: - pid: - description: the pid of Java process which needs to attach - type: integer - port: - description: the port of agent server, default 9277 - format: int32 - type: integer - rule-data: - description: RuleData used to save the rule file's data, - will use it when recover - type: string - type: object - jvm-stress: - properties: - cpu-count: - description: the CPU core number need to use, only set - it when action is stress - type: integer - mem-type: - description: the memory type need to locate, only set - it when action is stress, the value can be 'stack' or - 'heap' - type: string - pid: - description: the pid of Java process which needs to attach - type: integer - port: - description: the port of agent server, default 9277 - format: int32 - type: integer - type: object - kafka-fill: - properties: - host: - description: The host of kafka server - type: string - maxBytes: - description: The max bytes to fill - format: int64 - type: integer - messageSize: - description: The size of each message - type: integer - password: - description: The password of kafka client - type: string - port: - description: The port of kafka server - type: integer - reloadCommand: - description: The command to reload kafka config - type: string - topic: - description: The topic to attack - type: string - username: - description: The username of kafka client - type: string - type: object - kafka-flood: - properties: - host: - description: The host of kafka server - type: string - messageSize: - description: The size of each message - type: integer - password: - description: The password of kafka client - type: string - port: - description: The port of kafka server - type: integer - threads: - description: The number of worker threads - type: integer - topic: - description: The topic to attack - type: string - username: - description: The username of kafka client - type: string - type: object - kafka-io: - properties: - configFile: - description: The path of server config - type: string - nonReadable: - description: Make kafka cluster non-readable - type: boolean - nonWritable: - description: Make kafka cluster non-writable - type: boolean - topic: - description: The topic to attack - type: string - type: object - mode: - description: 'Mode defines the mode to run chaos action. Supported - mode: one / all / fixed / fixed-percent / random-max-percent' - enum: - - one - - all - - fixed - - fixed-percent - - random-max-percent - type: string - network-bandwidth: - properties: - buffer: - format: int32 - minimum: 1 - type: integer - device: - type: string - hostname: - type: string - ip-address: - type: string - limit: - format: int32 - minimum: 1 - type: integer - minburst: - format: int32 - type: integer - peakrate: - format: int64 - type: integer - rate: - type: string - required: - - buffer - - limit - - rate - type: object - network-corrupt: - properties: - correlation: - description: correlation is percentage (10 is 10%) - type: string - device: - description: the network interface to impact - type: string - egress-port: - description: only impact egress traffic to these destination - ports, use a ',' to separate or to indicate the range, - such as 80, 8001:8010. it can only be used in conjunction - with -p tcp or -p udp - type: string - hostname: - description: only impact traffic to these hostnames - type: string - ip-address: - description: only impact egress traffic to these IP addresses - type: string - ip-protocol: - description: 'only impact traffic using this IP protocol, - supported: tcp, udp, icmp, all' - type: string - percent: - description: percentage of packets to corrupt (10 is 10%) - type: string - source-port: - description: only impact egress traffic from these source - ports, use a ',' to separate or to indicate the range, - such as 80, 8001:8010. it can only be used in conjunction - with -p tcp or -p udp - type: string - type: object - network-delay: - properties: - accept-tcp-flags: - description: only the packet which match the tcp flag - can be accepted, others will be dropped. only set when - the IPProtocol is tcp, used for partition. - type: string - correlation: - description: correlation is percentage (10 is 10%) - type: string - device: - description: the network interface to impact - type: string - egress-port: - description: only impact egress traffic to these destination - ports, use a ',' to separate or to indicate the range, - such as 80, 8001:8010. it can only be used in conjunction - with -p tcp or -p udp - type: string - hostname: - description: only impact traffic to these hostnames - type: string - ip-address: - description: only impact egress traffic to these IP addresses - type: string - ip-protocol: - description: 'only impact traffic using this IP protocol, - supported: tcp, udp, icmp, all' - type: string - jitter: - description: 'jitter time, time units: ns, us (or µs), - ms, s, m, h.' - type: string - latency: - description: 'delay egress time, time units: ns, us (or - µs), ms, s, m, h.' - type: string - source-port: - description: only impact egress traffic from these source - ports, use a ',' to separate or to indicate the range, - such as 80, 8001:8010. it can only be used in conjunction - with -p tcp or -p udp - type: string - type: object - network-dns: - properties: - dns-domain-name: - description: map this host to specified IP - type: string - dns-ip: - description: map specified host to this IP address - type: string - dns-server: - description: update the DNS server in /etc/resolv.conf - with this value - type: string - type: object - network-down: - properties: - device: - description: The network interface to impact - type: string - duration: - description: 'NIC down time, time units: ns, us (or µs), - ms, s, m, h.' - type: string - type: object - network-duplicate: - properties: - correlation: - description: correlation is percentage (10 is 10%) - type: string - device: - description: the network interface to impact - type: string - egress-port: - description: only impact egress traffic to these destination - ports, use a ',' to separate or to indicate the range, - such as 80, 8001:8010. it can only be used in conjunction - with -p tcp or -p udp - type: string - hostname: - description: only impact traffic to these hostnames - type: string - ip-address: - description: only impact egress traffic to these IP addresses - type: string - ip-protocol: - description: 'only impact traffic using this IP protocol, - supported: tcp, udp, icmp, all' - type: string - percent: - description: percentage of packets to duplicate (10 is - 10%) - type: string - source-port: - description: only impact egress traffic from these source - ports, use a ',' to separate or to indicate the range, - such as 80, 8001:8010. it can only be used in conjunction - with -p tcp or -p udp - type: string - type: object - network-flood: - properties: - duration: - description: The number of seconds to run the iperf test - type: string - ip-address: - description: Generate traffic to this IP address - type: string - parallel: - description: The number of iperf parallel client threads - to run - format: int32 - type: integer - port: - description: Generate traffic to this port on the IP address - type: string - rate: - description: The speed of network traffic, allows bps, - kbps, mbps, gbps, tbps unit. bps means bytes per second - type: string - required: - - duration - - rate - type: object - network-loss: - properties: - correlation: - description: correlation is percentage (10 is 10%) - type: string - device: - description: the network interface to impact - type: string - egress-port: - description: only impact egress traffic to these destination - ports, use a ',' to separate or to indicate the range, - such as 80, 8001:8010. it can only be used in conjunction - with -p tcp or -p udp - type: string - hostname: - description: only impact traffic to these hostnames - type: string - ip-address: - description: only impact egress traffic to these IP addresses - type: string - ip-protocol: - description: 'only impact traffic using this IP protocol, - supported: tcp, udp, icmp, all' - type: string - percent: - description: percentage of packets to loss (10 is 10%) - type: string - source-port: - description: only impact egress traffic from these source - ports, use a ',' to separate or to indicate the range, - such as 80, 8001:8010. it can only be used in conjunction - with -p tcp or -p udp - type: string - type: object - network-partition: - properties: - accept-tcp-flags: - description: only the packet which match the tcp flag - can be accepted, others will be dropped. only set when - the IPProtocol is tcp, used for partition. - type: string - device: - description: the network interface to impact - type: string - direction: - description: specifies the partition direction, values - can be 'from', 'to'. 'from' means packets coming from - the 'IPAddress' or 'Hostname' and going to your server, - 'to' means packets originating from your server and - going to the 'IPAddress' or 'Hostname'. - type: string - hostname: - description: only impact traffic to these hostnames - type: string - ip-address: - description: only impact egress traffic to these IP addresses - type: string - ip-protocol: - description: only impact egress traffic to these IP addresses - type: string - type: object - process: - properties: - process: - description: the process name or the process ID - type: string - recoverCmd: - description: the command to be run when recovering experiment - type: string - signal: - description: the signal number to send - type: integer - type: object - redis-cacheLimit: - properties: - addr: - description: The adress of Redis server - type: string - cacheSize: - description: The size of `maxmemory` - type: string - password: - description: The password of Redis server - type: string - percent: - description: Specifies maxmemory as a percentage of the - original value - type: string - type: object - redis-expiration: - properties: - addr: - description: The adress of Redis server - type: string - expiration: - description: The expiration of the keys - type: string - key: - description: The keys to be expired - type: string - option: - description: Additional options for `expiration` - type: string - password: - description: The password of Redis server - type: string - type: object - redis-penetration: - properties: - addr: - description: The adress of Redis server - type: string - password: - description: The password of Redis server - type: string - requestNum: - description: The number of requests to be sent - type: integer - type: object - redis-restart: - properties: - addr: - description: The adress of Redis server - type: string - conf: - description: The path of Sentinel conf - type: string - flushConfig: - description: The control flag determines whether to flush - config - type: boolean - password: - description: The password of Redis server - type: string - redisPath: - description: The path of `redis-server` command-line tool - type: boolean - type: object - redis-stop: - properties: - addr: - description: The adress of Redis server - type: string - conf: - description: The path of Sentinel conf - type: string - flushConfig: - description: The control flag determines whether to flush - config - type: boolean - password: - description: The password of Redis server - type: string - redisPath: - description: The path of `redis-server` command-line tool - type: boolean - type: object - remoteCluster: - description: RemoteCluster represents the remote cluster where - the chaos will be deployed - type: string - selector: - description: Selector is used to select physical machines - that are used to inject chaos action. - properties: - annotationSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be - used to select objects. A selector based on annotations. - type: object - expressionSelectors: - description: a slice of label selector expressions that - can be used to select objects. A list of selectors based - on set-based label expressions. - items: - description: A label selector requirement is a selector - that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the label key that the selector - applies to. - type: string - operator: - description: operator represents a key's relationship - to a set of values. Valid operators are In, NotIn, - Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. - If the operator is In or NotIn, the values array - must be non-empty. If the operator is Exists or - DoesNotExist, the values array must be empty. - This array is replaced during a strategic merge - patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - fieldSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be - used to select objects. A selector based on fields. - type: object - labelSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be - used to select objects. A selector based on labels. - type: object - namespaces: - description: Namespaces is a set of namespace to which - objects belong. - items: - type: string - type: array - physicalMachines: - additionalProperties: - items: - type: string - type: array - description: PhysicalMachines is a map of string keys - and a set values that used to select physical machines. - The key defines the namespace which physical machine - belong, and each value is a set of physical machine - names. - type: object - type: object - stress-cpu: - properties: - load: - description: specifies P percent loading per CPU worker. - 0 is effectively a sleep (no load) and 100 is full loading. - type: integer - options: - description: extend stress-ng options - items: - type: string - type: array - workers: - description: specifies N workers to apply the stressor. - type: integer - type: object - stress-mem: - properties: - options: - description: extend stress-ng options - items: - type: string - type: array - size: - description: 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 - type: object - uid: - description: the experiment ID - type: string - user_defined: - properties: - attackCmd: - description: The command to be executed when attack - type: string - recoverCmd: - description: The command to be executed when recover - type: string - type: object - value: - description: Value is required when the mode is set to `FixedMode` - / `FixedPercentMode` / `RandomMaxPercentMode`. If `FixedMode`, - provide an integer of physical machines to do chaos action. - If `FixedPercentMode`, provide a number from 0-100 to specify - the percent of physical machines the server can do chaos - action. IF `RandomMaxPercentMode`, provide a number from - 0-100 to specify the max percent of pods to do chaos action - type: string - vm: - properties: - vm-name: - description: The name of the VM to be injected - type: string - type: object - required: - - action - - mode - type: object - podChaos: - description: PodChaosSpec defines the attributes that a user creates - on a chaos experiment about pods. - properties: - action: - description: 'Action defines the specific pod chaos action. - Supported action: pod-kill / pod-failure / container-kill - Default action: pod-kill' - enum: - - pod-kill - - pod-failure - - container-kill - type: string - containerNames: - description: ContainerNames indicates list of the name of - affected container. If not set, the first container will - be injected - items: - type: string - type: array - duration: - description: Duration represents the duration of the chaos - action. It is required when the action is `PodFailureAction`. - A duration string is a possibly signed sequence of decimal - numbers, each with optional fraction and a unit suffix, - such as "300ms", "-1.5h" or "2h45m". Valid time units are - "ns", "us" (or "µs"), "ms", "s", "m", "h". - type: string - gracePeriod: - description: GracePeriod is used in pod-kill action. It represents - the duration in seconds before the pod should be deleted. - Value must be non-negative integer. The default value is - zero that indicates delete immediately. - format: int64 - minimum: 0 - type: integer - mode: - description: 'Mode defines the mode to run chaos action. Supported - mode: one / all / fixed / fixed-percent / random-max-percent' - enum: - - one - - all - - fixed - - fixed-percent - - random-max-percent - type: string - remoteCluster: - description: RemoteCluster represents the remote cluster where - the chaos will be deployed - type: string - selector: - description: Selector is used to select pods that are used - to inject chaos action. - properties: - annotationSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be - used to select objects. A selector based on annotations. - type: object - expressionSelectors: - description: a slice of label selector expressions that - can be used to select objects. A list of selectors based - on set-based label expressions. - items: - description: A label selector requirement is a selector - that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the label key that the selector - applies to. - type: string - operator: - description: operator represents a key's relationship - to a set of values. Valid operators are In, NotIn, - Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. - If the operator is In or NotIn, the values array - must be non-empty. If the operator is Exists or - DoesNotExist, the values array must be empty. - This array is replaced during a strategic merge - patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - fieldSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be - used to select objects. A selector based on fields. - type: object - labelSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be - used to select objects. A selector based on labels. - type: object - namespaces: - description: Namespaces is a set of namespace to which - objects belong. - items: - type: string - type: array - nodeSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be - used to select nodes. Selector which must match a node's - labels, and objects must belong to these selected nodes. - type: object - nodes: - description: Nodes is a set of node name and objects must - belong to these nodes. - items: - type: string - type: array - podPhaseSelectors: - description: 'PodPhaseSelectors is a set of condition - of a pod at the current time. supported value: Pending - / Running / Succeeded / Failed / Unknown' - items: - type: string - type: array - pods: - additionalProperties: - items: - type: string - type: array - description: Pods is a map of string keys and a set values - that used to select pods. The key defines the namespace - which pods belong, and the each values is a set of pod - names. - type: object - type: object - value: - description: Value is required when the mode is set to `FixedMode` - / `FixedPercentMode` / `RandomMaxPercentMode`. If `FixedMode`, - provide an integer of pods to do chaos action. If `FixedPercentMode`, - provide a number from 0-100 to specify the percent of pods - the server can do chaos action. IF `RandomMaxPercentMode`, provide - a number from 0-100 to specify the max percent of pods to - do chaos action - type: string - required: - - action - - mode - - selector - type: object - schedule: - type: string - startingDeadlineSeconds: - exclusiveMinimum: true - format: int64 - minimum: 0 - nullable: true - type: integer - stressChaos: - description: StressChaosSpec defines the desired state of StressChaos - properties: - containerNames: - description: ContainerNames indicates list of the name of - affected container. If not set, the first container will - be injected - items: - type: string - type: array - duration: - description: Duration represents the duration of the chaos - action - type: string - mode: - description: 'Mode defines the mode to run chaos action. Supported - mode: one / all / fixed / fixed-percent / random-max-percent' - enum: - - one - - all - - fixed - - fixed-percent - - random-max-percent - type: string - remoteCluster: - description: RemoteCluster represents the remote cluster where - the chaos will be deployed - type: string - selector: - description: Selector is used to select pods that are used - to inject chaos action. - properties: - annotationSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be - used to select objects. A selector based on annotations. - type: object - expressionSelectors: - description: a slice of label selector expressions that - can be used to select objects. A list of selectors based - on set-based label expressions. - items: - description: A label selector requirement is a selector - that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the label key that the selector - applies to. - type: string - operator: - description: operator represents a key's relationship - to a set of values. Valid operators are In, NotIn, - Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. - If the operator is In or NotIn, the values array - must be non-empty. If the operator is Exists or - DoesNotExist, the values array must be empty. - This array is replaced during a strategic merge - patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - fieldSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be - used to select objects. A selector based on fields. - type: object - labelSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be - used to select objects. A selector based on labels. - type: object - namespaces: - description: Namespaces is a set of namespace to which - objects belong. - items: - type: string - type: array - nodeSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be - used to select nodes. Selector which must match a node's - labels, and objects must belong to these selected nodes. - type: object - nodes: - description: Nodes is a set of node name and objects must - belong to these nodes. - items: - type: string - type: array - podPhaseSelectors: - description: 'PodPhaseSelectors is a set of condition - of a pod at the current time. supported value: Pending - / Running / Succeeded / Failed / Unknown' - items: - type: string - type: array - pods: - additionalProperties: - items: - type: string - type: array - description: Pods is a map of string keys and a set values - that used to select pods. The key defines the namespace - which pods belong, and the each values is a set of pod - names. - type: object - type: object - stressngStressors: - description: StressngStressors defines plenty of stressors - just like `Stressors` except that it's an experimental feature - and more powerful. You can define stressors in `stress-ng` - (see also `man stress-ng`) dialect, however not all of the - supported stressors are well tested. It maybe retired in - later releases. You should always use `Stressors` to define - the stressors and use this only when you want more stressors - unsupported by `Stressors`. When both `StressngStressors` - and `Stressors` are defined, `StressngStressors` wins. - type: string - stressors: - description: Stressors defines plenty of stressors supported - to stress system components out. You can use one or more - of them to make up various kinds of stresses. At least one - of the stressors should be specified. - properties: - cpu: - description: CPUStressor stresses CPU out - properties: - load: - description: Load specifies P percent loading per - CPU worker. 0 is effectively a sleep (no load) and - 100 is full loading. - maximum: 100 - minimum: 0 - type: integer - options: - description: extend stress-ng options - items: - type: string - type: array - workers: - description: Workers specifies N workers to apply - the stressor. Maximum 8192 workers can run by stress-ng - maximum: 8192 - type: integer - required: - - workers - type: object - memory: - description: MemoryStressor stresses virtual memory out - properties: - oomScoreAdj: - default: 0 - description: OOMScoreAdj sets the oom_score_adj of - the stress process. See `man 5 proc` to know more - about this option. - maximum: 1000 - minimum: -1000 - type: integer - options: - description: extend stress-ng options - items: - type: string - type: array - size: - description: Size 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 - workers: - description: Workers specifies N workers to apply - the stressor. Maximum 8192 workers can run by stress-ng - maximum: 8192 - type: integer - required: - - workers - type: object - type: object - value: - description: Value is required when the mode is set to `FixedMode` - / `FixedPercentMode` / `RandomMaxPercentMode`. If `FixedMode`, - provide an integer of pods to do chaos action. If `FixedPercentMode`, - provide a number from 0-100 to specify the percent of pods - the server can do chaos action. IF `RandomMaxPercentMode`, provide - a number from 0-100 to specify the max percent of pods to - do chaos action - type: string - required: - - mode - - selector - type: object - timeChaos: - description: TimeChaosSpec defines the desired state of TimeChaos - properties: - clockIds: - description: ClockIds defines all affected clock id All available - options are ["CLOCK_REALTIME","CLOCK_MONOTONIC","CLOCK_PROCESS_CPUTIME_ID","CLOCK_THREAD_CPUTIME_ID", - "CLOCK_MONOTONIC_RAW","CLOCK_REALTIME_COARSE","CLOCK_MONOTONIC_COARSE","CLOCK_BOOTTIME","CLOCK_REALTIME_ALARM", - "CLOCK_BOOTTIME_ALARM"] Default value is ["CLOCK_REALTIME"] - items: - type: string - type: array - containerNames: - description: ContainerNames indicates list of the name of - affected container. If not set, the first container will - be injected - items: - type: string - type: array - duration: - description: Duration represents the duration of the chaos - action - type: string - mode: - description: 'Mode defines the mode to run chaos action. Supported - mode: one / all / fixed / fixed-percent / random-max-percent' - enum: - - one - - all - - fixed - - fixed-percent - - random-max-percent - type: string - remoteCluster: - description: RemoteCluster represents the remote cluster where - the chaos will be deployed - type: string - selector: - description: Selector is used to select pods that are used - to inject chaos action. - properties: - annotationSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be - used to select objects. A selector based on annotations. - type: object - expressionSelectors: - description: a slice of label selector expressions that - can be used to select objects. A list of selectors based - on set-based label expressions. - items: - description: A label selector requirement is a selector - that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the label key that the selector - applies to. - type: string - operator: - description: operator represents a key's relationship - to a set of values. Valid operators are In, NotIn, - Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. - If the operator is In or NotIn, the values array - must be non-empty. If the operator is Exists or - DoesNotExist, the values array must be empty. - This array is replaced during a strategic merge - patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - fieldSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be - used to select objects. A selector based on fields. - type: object - labelSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be - used to select objects. A selector based on labels. - type: object - namespaces: - description: Namespaces is a set of namespace to which - objects belong. - items: - type: string - type: array - nodeSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be - used to select nodes. Selector which must match a node's - labels, and objects must belong to these selected nodes. - type: object - nodes: - description: Nodes is a set of node name and objects must - belong to these nodes. - items: - type: string - type: array - podPhaseSelectors: - description: 'PodPhaseSelectors is a set of condition - of a pod at the current time. supported value: Pending - / Running / Succeeded / Failed / Unknown' - items: - type: string - type: array - pods: - additionalProperties: - items: - type: string - type: array - description: Pods is a map of string keys and a set values - that used to select pods. The key defines the namespace - which pods belong, and the each values is a set of pod - names. - type: object - type: object - timeOffset: - description: TimeOffset defines the delta time of injected - program. It's a possibly signed sequence of decimal numbers, - such as "300ms", "-1.5h" or "2h45m". Valid time units are - "ns", "us" (or "µs"), "ms", "s", "m", "h". - type: string - value: - description: Value is required when the mode is set to `FixedMode` - / `FixedPercentMode` / `RandomMaxPercentMode`. If `FixedMode`, - provide an integer of pods to do chaos action. If `FixedPercentMode`, - provide a number from 0-100 to specify the percent of pods - the server can do chaos action. IF `RandomMaxPercentMode`, provide - a number from 0-100 to specify the max percent of pods to - do chaos action - type: string - required: - - mode - - selector - - timeOffset - type: object - type: - type: string - workflow: - properties: - entry: - type: string - templates: - items: - properties: - abortWithStatusCheck: - description: AbortWithStatusCheck describe whether to - abort the workflow when the failure threshold of StatusCheck - is exceeded. Only used when Type is TypeStatusCheck. - type: boolean - awsChaos: - description: AWSChaosSpec is the content of the specification - for an AWSChaos - properties: - action: - description: 'Action defines the specific aws chaos - action. Supported action: ec2-stop / ec2-restart - / detach-volume Default action: ec2-stop' - 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. Needed in detach-volume. - type: string - duration: - description: Duration represents the duration of - the chaos action. - type: string - ec2Instance: - description: Ec2Instance indicates the ID of the - ec2 instance. - type: string - endpoint: - description: Endpoint indicates the endpoint of - the aws server. Just used it in test now. - type: string - remoteCluster: - description: RemoteCluster represents the remote - cluster where the chaos will be deployed - type: string - secretName: - description: SecretName defines the name of kubernetes - secret. - type: string - volumeID: - description: EbsVolume indicates the ID of the EBS - volume. Needed in detach-volume. - type: string - required: - - action - - awsRegion - - ec2Instance - type: object - azureChaos: - description: AzureChaosSpec is the content of the specification - for an AzureChaos - properties: - action: - description: 'Action defines the specific azure - chaos action. Supported action: vm-stop / vm-restart - / disk-detach Default action: vm-stop' - enum: - - vm-stop - - vm-restart - - disk-detach - type: string - diskName: - description: DiskName indicates the name of the - disk. Needed in disk-detach. - type: string - duration: - description: Duration represents the duration of - the chaos action. - type: string - lun: - description: LUN indicates the Logical Unit Number - of the data disk. Needed in disk-detach. - type: integer - remoteCluster: - description: RemoteCluster represents the remote - cluster where the chaos will be deployed - type: string - resourceGroupName: - description: ResourceGroupName defines the name - of ResourceGroup - type: string - secretName: - description: SecretName defines the name of kubernetes - secret. It is used for Azure credentials. - type: string - subscriptionID: - description: SubscriptionID defines the id of Azure - subscription. - type: string - vmName: - description: VMName defines the name of Virtual - Machine - type: string - required: - - action - - resourceGroupName - - subscriptionID - - vmName - type: object - blockChaos: - description: BlockChaosSpec is the content of the specification - for a BlockChaos - properties: - action: - description: 'Action defines the specific block - chaos action. Supported action: delay' - enum: - - delay - type: string - containerNames: - description: ContainerNames indicates list of the - name of affected container. If not set, the first - container will be injected - items: - type: string - type: array - delay: - description: Delay defines the delay distribution. - properties: - correlation: - type: string - jitter: - type: string - latency: - description: Latency defines the latency of - every io request. - type: string - type: object - duration: - description: Duration represents the duration of - the chaos action. - type: string - mode: - description: 'Mode defines the mode to run chaos - action. Supported mode: one / all / fixed / fixed-percent - / random-max-percent' - enum: - - one - - all - - fixed - - fixed-percent - - random-max-percent - type: string - remoteCluster: - description: RemoteCluster represents the remote - cluster where the chaos will be deployed - type: string - selector: - description: Selector is used to select pods that - are used to inject chaos action. - properties: - annotationSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select objects. A selector - based on annotations. - type: object - expressionSelectors: - description: a slice of label selector expressions - that can be used to select objects. A list - of selectors based on set-based label expressions. - items: - description: A label selector requirement - is a selector that contains values, a key, - and an operator that relates the key and - values. - properties: - key: - description: key is the label key that - the selector applies to. - type: string - operator: - description: operator represents a key's - relationship to a set of values. Valid - operators are In, NotIn, Exists and - DoesNotExist. - type: string - values: - description: values is an array of string - values. If the operator is In or NotIn, - the values array must be non-empty. - If the operator is Exists or DoesNotExist, - the values array must be empty. This - array is replaced during a strategic - merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - fieldSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select objects. A selector - based on fields. - type: object - labelSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select objects. A selector - based on labels. - type: object - namespaces: - description: Namespaces is a set of namespace - to which objects belong. - items: - type: string - type: array - nodeSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select nodes. Selector which - must match a node's labels, and objects must - belong to these selected nodes. - type: object - nodes: - description: Nodes is a set of node name and - objects must belong to these nodes. - items: - type: string - type: array - podPhaseSelectors: - description: 'PodPhaseSelectors is a set of - condition of a pod at the current time. supported - value: Pending / Running / Succeeded / Failed - / Unknown' - items: - type: string - type: array - pods: - additionalProperties: - items: - type: string - type: array - description: Pods is a map of string keys and - a set values that used to select pods. The - key defines the namespace which pods belong, - and the each values is a set of pod names. - type: object - type: object - value: - description: Value is required when the mode is - set to `FixedMode` / `FixedPercentMode` / `RandomMaxPercentMode`. - If `FixedMode`, provide an integer of pods to - do chaos action. If `FixedPercentMode`, provide - a number from 0-100 to specify the percent of - pods the server can do chaos action. IF `RandomMaxPercentMode`, provide - a number from 0-100 to specify the max percent - of pods to do chaos action - type: string - volumeName: - type: string - required: - - action - - mode - - selector - - volumeName - type: object - children: - description: Children describes the children steps of - serial or parallel node. Only used when Type is TypeSerial - or TypeParallel. - items: - type: string - type: array - conditionalBranches: - description: ConditionalBranches describes the conditional - branches of custom tasks. Only used when Type is TypeTask. - items: - properties: - expression: - description: Expression is the expression for - this conditional branch, expected type of result - is boolean. If expression is empty, this branch - will always be selected/the template will be - spawned. - type: string - target: - description: Target is the name of other template, - if expression is evaluated as true, this template - will be spawned. - type: string - required: - - target - type: object - type: array - deadline: - type: string - dnsChaos: - description: DNSChaosSpec defines the desired state - of DNSChaos - properties: - action: - description: 'Action defines the specific DNS chaos - action. Supported action: error, random Default - action: error' - enum: - - error - - random - type: string - containerNames: - description: ContainerNames indicates list of the - name of affected container. If not set, the first - container will be injected - items: - type: string - type: array - duration: - description: Duration represents the duration of - the chaos action - type: string - mode: - description: 'Mode defines the mode to run chaos - action. Supported mode: one / all / fixed / fixed-percent - / random-max-percent' - enum: - - one - - all - - fixed - - fixed-percent - - random-max-percent - type: string - patterns: - description: 'Choose which domain names to take - effect, support the placeholder ? and wildcard - *, or the Specified domain name. Note: 1. The - wildcard * must be at the end of the string. For - example, chaos-*.org is invalid. 2. if the patterns - is empty, will take effect on all the domain names. - For example: The value is ["google.com", "github.*", - "chaos-mes?.org"], will take effect on "google.com", - "github.com" and "chaos-mesh.org"' - items: - type: string - type: array - remoteCluster: - description: RemoteCluster represents the remote - cluster where the chaos will be deployed - type: string - selector: - description: Selector is used to select pods that - are used to inject chaos action. - properties: - annotationSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select objects. A selector - based on annotations. - type: object - expressionSelectors: - description: a slice of label selector expressions - that can be used to select objects. A list - of selectors based on set-based label expressions. - items: - description: A label selector requirement - is a selector that contains values, a key, - and an operator that relates the key and - values. - properties: - key: - description: key is the label key that - the selector applies to. - type: string - operator: - description: operator represents a key's - relationship to a set of values. Valid - operators are In, NotIn, Exists and - DoesNotExist. - type: string - values: - description: values is an array of string - values. If the operator is In or NotIn, - the values array must be non-empty. - If the operator is Exists or DoesNotExist, - the values array must be empty. This - array is replaced during a strategic - merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - fieldSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select objects. A selector - based on fields. - type: object - labelSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select objects. A selector - based on labels. - type: object - namespaces: - description: Namespaces is a set of namespace - to which objects belong. - items: - type: string - type: array - nodeSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select nodes. Selector which - must match a node's labels, and objects must - belong to these selected nodes. - type: object - nodes: - description: Nodes is a set of node name and - objects must belong to these nodes. - items: - type: string - type: array - podPhaseSelectors: - description: 'PodPhaseSelectors is a set of - condition of a pod at the current time. supported - value: Pending / Running / Succeeded / Failed - / Unknown' - items: - type: string - type: array - pods: - additionalProperties: - items: - type: string - type: array - description: Pods is a map of string keys and - a set values that used to select pods. The - key defines the namespace which pods belong, - and the each values is a set of pod names. - type: object - type: object - value: - description: Value is required when the mode is - set to `FixedMode` / `FixedPercentMode` / `RandomMaxPercentMode`. - If `FixedMode`, provide an integer of pods to - do chaos action. If `FixedPercentMode`, provide - a number from 0-100 to specify the percent of - pods the server can do chaos action. IF `RandomMaxPercentMode`, provide - a number from 0-100 to specify the max percent - of pods to do chaos action - type: string - required: - - action - - mode - - selector - type: object - gcpChaos: - description: GCPChaosSpec is the content of the specification - for a GCPChaos - properties: - action: - description: 'Action defines the specific gcp chaos - action. Supported action: node-stop / node-reset - / disk-loss Default action: node-stop' - enum: - - node-stop - - node-reset - - disk-loss - type: string - deviceNames: - description: The device name of disks to detach. - Needed in disk-loss. - items: - type: string - type: array - duration: - description: Duration represents the duration of - the chaos action. - type: string - instance: - description: Instance defines the name of the instance - type: string - project: - description: Project defines the ID of gcp project. - type: string - remoteCluster: - description: RemoteCluster represents the remote - cluster where the chaos will be deployed - type: string - secretName: - description: SecretName defines the name of kubernetes - secret. It is used for GCP credentials. - type: string - zone: - description: Zone defines the zone of gcp project. - type: string - required: - - action - - instance - - project - - zone - type: object - httpChaos: - properties: - abort: - description: Abort is a rule to abort a http session. - type: boolean - code: - description: Code is a rule to select target by - http status code in response. - format: int32 - type: integer - delay: - description: Delay represents the delay of the target - request/response. A duration string is a possibly - unsigned sequence of decimal numbers, each with - optional fraction and a unit suffix, such as "300ms", - "2h45m". Valid time units are "ns", "us" (or "µs"), - "ms", "s", "m", "h". - type: string - duration: - description: Duration represents the duration of - the chaos action. - type: string - method: - description: Method is a rule to select target by - http method in request. - type: string - mode: - description: 'Mode defines the mode to run chaos - action. Supported mode: one / all / fixed / fixed-percent - / random-max-percent' - enum: - - one - - all - - fixed - - fixed-percent - - random-max-percent - type: string - patch: - description: Patch is a rule to patch some contents - in target. - properties: - body: - description: Body is a rule to patch message - body of target. - properties: - type: - description: Type represents the patch type, - only support `JSON` as [merge patch json](https://tools.ietf.org/html/rfc7396) - currently. - type: string - value: - description: Value is the patch contents. - type: string - required: - - type - - value - type: object - headers: - description: 'Headers is a rule to append http - headers of target. For example: `[["Set-Cookie", - ""], ["Set-Cookie", ""]]`.' - items: - items: - type: string - type: array - type: array - queries: - description: 'Queries is a rule to append uri - queries of target(Request only). For example: - `[["foo", "bar"], ["foo", "unknown"]]`.' - items: - items: - type: string - type: array - type: array - type: object - path: - description: Path is a rule to select target by - uri path in http request. - type: string - port: - description: Port represents the target port to - be proxy of. - format: int32 - type: integer - remoteCluster: - description: RemoteCluster represents the remote - cluster where the chaos will be deployed - type: string - replace: - description: Replace is a rule to replace some contents - in target. - properties: - body: - description: Body is a rule to replace http - message body in target. - format: byte - type: string - code: - description: Code is a rule to replace http - status code in response. - format: int32 - type: integer - headers: - additionalProperties: - type: string - description: Headers is a rule to replace http - headers of target. The key-value pairs represent - header name and header value pairs. - type: object - method: - description: Method is a rule to replace http - method in request. - type: string - path: - description: Path is rule to to replace uri - path in http request. - type: string - queries: - additionalProperties: - type: string - description: 'Queries is a rule to replace uri - queries in http request. For example, with - value `{ "foo": "unknown" }`, the `/?foo=bar` - will be altered to `/?foo=unknown`,' - type: object - type: object - request_headers: - additionalProperties: - type: string - description: RequestHeaders is a rule to select - target by http headers in request. The key-value - pairs represent header name and header value pairs. - type: object - response_headers: - additionalProperties: - type: string - description: ResponseHeaders is a rule to select - target by http headers in response. The key-value - pairs represent header name and header value pairs. - type: object - selector: - description: Selector is used to select pods that - are used to inject chaos action. - properties: - annotationSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select objects. A selector - based on annotations. - type: object - expressionSelectors: - description: a slice of label selector expressions - that can be used to select objects. A list - of selectors based on set-based label expressions. - items: - description: A label selector requirement - is a selector that contains values, a key, - and an operator that relates the key and - values. - properties: - key: - description: key is the label key that - the selector applies to. - type: string - operator: - description: operator represents a key's - relationship to a set of values. Valid - operators are In, NotIn, Exists and - DoesNotExist. - type: string - values: - description: values is an array of string - values. If the operator is In or NotIn, - the values array must be non-empty. - If the operator is Exists or DoesNotExist, - the values array must be empty. This - array is replaced during a strategic - merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - fieldSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select objects. A selector - based on fields. - type: object - labelSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select objects. A selector - based on labels. - type: object - namespaces: - description: Namespaces is a set of namespace - to which objects belong. - items: - type: string - type: array - nodeSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select nodes. Selector which - must match a node's labels, and objects must - belong to these selected nodes. - type: object - nodes: - description: Nodes is a set of node name and - objects must belong to these nodes. - items: - type: string - type: array - podPhaseSelectors: - description: 'PodPhaseSelectors is a set of - condition of a pod at the current time. supported - value: Pending / Running / Succeeded / Failed - / Unknown' - items: - type: string - type: array - pods: - additionalProperties: - items: - type: string - type: array - description: Pods is a map of string keys and - a set values that used to select pods. The - key defines the namespace which pods belong, - and the each values is a set of pod names. - type: object - type: object - target: - description: Target is the object to be selected - and injected. - enum: - - Request - - Response - type: string - tls: - description: TLS is the tls config, will override - PodHttpChaos if there are multiple HTTPChaos experiments - are applied - properties: - caName: - description: CAName represents the data name - of ca file in secret, `ca.crt` for example - type: string - certName: - description: CertName represents the data name - of cert file in secret, `tls.crt` for example - type: string - keyName: - description: KeyName represents the data name - of key file in secret, `tls.key` for example - type: string - secretName: - description: SecretName represents the name - of required secret resource - type: string - secretNamespace: - description: SecretNamespace represents the - namespace of required secret resource - type: string - required: - - certName - - keyName - - secretName - - secretNamespace - type: object - value: - description: Value is required when the mode is - set to `FixedMode` / `FixedPercentMode` / `RandomMaxPercentMode`. - If `FixedMode`, provide an integer of pods to - do chaos action. If `FixedPercentMode`, provide - a number from 0-100 to specify the percent of - pods the server can do chaos action. IF `RandomMaxPercentMode`, provide - a number from 0-100 to specify the max percent - of pods to do chaos action - type: string - required: - - mode - - selector - - target - type: object - ioChaos: - description: IOChaosSpec defines the desired state of - IOChaos - properties: - action: - description: 'Action defines the specific pod chaos - action. Supported action: latency / fault / attrOverride - / mistake' - enum: - - latency - - fault - - attrOverride - - mistake - type: string - attr: - description: Attr defines the overrided attribution - properties: - atime: - description: Timespec represents a time - properties: - nsec: - format: int64 - type: integer - sec: - format: int64 - type: integer - required: - - nsec - - sec - type: object - blocks: - format: int64 - type: integer - ctime: - description: Timespec represents a time - properties: - nsec: - format: int64 - type: integer - sec: - format: int64 - type: integer - required: - - nsec - - sec - type: object - gid: - format: int32 - type: integer - ino: - format: int64 - type: integer - kind: - description: FileType represents type of file - type: string - mtime: - description: Timespec represents a time - properties: - nsec: - format: int64 - type: integer - sec: - format: int64 - type: integer - required: - - nsec - - sec - type: object - nlink: - format: int32 - type: integer - perm: - type: integer - rdev: - format: int32 - type: integer - size: - format: int64 - type: integer - uid: - format: int32 - type: integer - type: object - containerNames: - description: ContainerNames indicates list of the - name of affected container. If not set, the first - container will be injected - items: - type: string - type: array - delay: - description: Delay defines the value of I/O chaos - action delay. A delay string is a possibly signed - sequence of decimal numbers, each with optional - fraction and a unit suffix, such as "300ms". Valid - time units are "ns", "us" (or "µs"), "ms", "s", - "m", "h". - type: string - duration: - description: Duration represents the duration of - the chaos action. It is required when the action - is `PodFailureAction`. A duration string is a - possibly signed sequence of decimal numbers, each - with optional fraction and a unit suffix, such - as "300ms", "-1.5h" or "2h45m". Valid time units - are "ns", "us" (or "µs"), "ms", "s", "m", "h". - type: string - errno: - description: 'Errno defines the error code that - returned by I/O action. refer to: https://www-numi.fnal.gov/offline_software/srt_public_context/WebDocs/Errors/unix_system_errors.html' - format: int32 - type: integer - methods: - description: 'Methods defines the I/O methods for - injecting I/O chaos action. default: all I/O methods.' - items: - type: string - type: array - mistake: - description: Mistake defines what types of incorrectness - are injected to IO operations - properties: - filling: - description: Filling determines what is filled - in the mistake data. - enum: - - zero - - random - type: string - maxLength: - description: Max length of each wrong data segment - in bytes - format: int64 - minimum: 1 - type: integer - maxOccurrences: - description: There will be [1, MaxOccurrences] - segments of wrong data. - format: int64 - minimum: 1 - type: integer - type: object - mode: - description: 'Mode defines the mode to run chaos - action. Supported mode: one / all / fixed / fixed-percent - / random-max-percent' - enum: - - one - - all - - fixed - - fixed-percent - - random-max-percent - type: string - path: - description: Path defines the path of files for - injecting I/O chaos action. - type: string - percent: - default: 100 - description: 'Percent defines the percentage of - injection errors and provides a number from 0-100. - default: 100.' - type: integer - remoteCluster: - description: RemoteCluster represents the remote - cluster where the chaos will be deployed - type: string - selector: - description: Selector is used to select pods that - are used to inject chaos action. - properties: - annotationSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select objects. A selector - based on annotations. - type: object - expressionSelectors: - description: a slice of label selector expressions - that can be used to select objects. A list - of selectors based on set-based label expressions. - items: - description: A label selector requirement - is a selector that contains values, a key, - and an operator that relates the key and - values. - properties: - key: - description: key is the label key that - the selector applies to. - type: string - operator: - description: operator represents a key's - relationship to a set of values. Valid - operators are In, NotIn, Exists and - DoesNotExist. - type: string - values: - description: values is an array of string - values. If the operator is In or NotIn, - the values array must be non-empty. - If the operator is Exists or DoesNotExist, - the values array must be empty. This - array is replaced during a strategic - merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - fieldSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select objects. A selector - based on fields. - type: object - labelSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select objects. A selector - based on labels. - type: object - namespaces: - description: Namespaces is a set of namespace - to which objects belong. - items: - type: string - type: array - nodeSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select nodes. Selector which - must match a node's labels, and objects must - belong to these selected nodes. - type: object - nodes: - description: Nodes is a set of node name and - objects must belong to these nodes. - items: - type: string - type: array - podPhaseSelectors: - description: 'PodPhaseSelectors is a set of - condition of a pod at the current time. supported - value: Pending / Running / Succeeded / Failed - / Unknown' - items: - type: string - type: array - pods: - additionalProperties: - items: - type: string - type: array - description: Pods is a map of string keys and - a set values that used to select pods. The - key defines the namespace which pods belong, - and the each values is a set of pod names. - type: object - type: object - value: - description: Value is required when the mode is - set to `FixedMode` / `FixedPercentMode` / `RandomMaxPercentMode`. - If `FixedMode`, provide an integer of pods to - do chaos action. If `FixedPercentMode`, provide - a number from 0-100 to specify the percent of - pods the server can do chaos action. IF `RandomMaxPercentMode`, provide - a number from 0-100 to specify the max percent - of pods to do chaos action - type: string - volumePath: - description: VolumePath represents the mount path - of injected volume - type: string - required: - - action - - mode - - selector - - volumePath - type: object - jvmChaos: - description: JVMChaosSpec defines the desired state - of JVMChaos - properties: - action: - description: 'Action defines the specific jvm chaos - action. Supported action: latency;return;exception;stress;gc;ruleData' - enum: - - latency - - return - - exception - - stress - - gc - - ruleData - - mysql - type: string - class: - description: Java class - type: string - containerNames: - description: ContainerNames indicates list of the - name of affected container. If not set, the first - container will be injected - items: - type: string - type: array - cpuCount: - description: the CPU core number needs to use, only - set it when action is stress - type: integer - database: - description: the match database default value is - "", means match all database - type: string - duration: - description: Duration represents the duration of - the chaos action - type: string - exception: - description: the exception which needs to throw - for action `exception` or the exception message - needs to throw in action `mysql` - type: string - latency: - description: the latency duration for action 'latency', - unit ms or the latency duration in action `mysql` - type: integer - memType: - description: the memory type needs to locate, only - set it when action is stress, the value can be - 'stack' or 'heap' - type: string - method: - description: the method in Java class - type: string - mode: - description: 'Mode defines the mode to run chaos - action. Supported mode: one / all / fixed / fixed-percent - / random-max-percent' - enum: - - one - - all - - fixed - - fixed-percent - - random-max-percent - type: string - mysqlConnectorVersion: - description: the version of mysql-connector-java, - only support 5.X.X(set to "5") and 8.X.X(set to - "8") now - type: string - name: - description: byteman rule name, should be unique, - and will generate one if not set - type: string - pid: - description: the pid of Java process which needs - to attach - type: integer - port: - description: the port of agent server, default 9277 - format: int32 - type: integer - remoteCluster: - description: RemoteCluster represents the remote - cluster where the chaos will be deployed - type: string - ruleData: - description: the byteman rule's data for action - 'ruleData' - type: string - selector: - description: Selector is used to select pods that - are used to inject chaos action. - properties: - annotationSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select objects. A selector - based on annotations. - type: object - expressionSelectors: - description: a slice of label selector expressions - that can be used to select objects. A list - of selectors based on set-based label expressions. - items: - description: A label selector requirement - is a selector that contains values, a key, - and an operator that relates the key and - values. - properties: - key: - description: key is the label key that - the selector applies to. - type: string - operator: - description: operator represents a key's - relationship to a set of values. Valid - operators are In, NotIn, Exists and - DoesNotExist. - type: string - values: - description: values is an array of string - values. If the operator is In or NotIn, - the values array must be non-empty. - If the operator is Exists or DoesNotExist, - the values array must be empty. This - array is replaced during a strategic - merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - fieldSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select objects. A selector - based on fields. - type: object - labelSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select objects. A selector - based on labels. - type: object - namespaces: - description: Namespaces is a set of namespace - to which objects belong. - items: - type: string - type: array - nodeSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select nodes. Selector which - must match a node's labels, and objects must - belong to these selected nodes. - type: object - nodes: - description: Nodes is a set of node name and - objects must belong to these nodes. - items: - type: string - type: array - podPhaseSelectors: - description: 'PodPhaseSelectors is a set of - condition of a pod at the current time. supported - value: Pending / Running / Succeeded / Failed - / Unknown' - items: - type: string - type: array - pods: - additionalProperties: - items: - type: string - type: array - description: Pods is a map of string keys and - a set values that used to select pods. The - key defines the namespace which pods belong, - and the each values is a set of pod names. - type: object - type: object - sqlType: - description: the match sql type default value is - "", means match all SQL type. The value can be - 'select', 'insert', 'update', 'delete', 'replace'. - type: string - table: - description: the match table default value is "", - means match all table - type: string - value: - description: Value is required when the mode is - set to `FixedMode` / `FixedPercentMode` / `RandomMaxPercentMode`. - If `FixedMode`, provide an integer of pods to - do chaos action. If `FixedPercentMode`, provide - a number from 0-100 to specify the percent of - pods the server can do chaos action. IF `RandomMaxPercentMode`, provide - a number from 0-100 to specify the max percent - of pods to do chaos action - type: string - required: - - action - - mode - - selector - type: object - kernelChaos: - description: KernelChaosSpec defines the desired state - of KernelChaos - properties: - containerNames: - description: ContainerNames indicates list of the - name of affected container. If not set, the first - container will be injected - items: - type: string - type: array - duration: - description: Duration represents the duration of - the chaos action - type: string - failKernRequest: - description: FailKernRequest defines the request - of kernel injection - properties: - callchain: - description: 'Callchain indicate a special call - chain, such as: ext4_mount -> mount_subtree - -> ... -> should_failslab With an optional - set of predicates and an optional set of parameters, - which used with predicates. You can read call - chan and predicate examples from https://github.com/chaos-mesh/bpfki/tree/develop/examples - to learn more. If no special call chain, just - keep Callchain empty, which means it will - fail at any call chain with slab alloc (eg: - kmalloc).' - items: - description: Frame defines the function signature - and predicate in function's body - properties: - funcname: - description: Funcname can be find from - kernel source or `/proc/kallsyms`, such - as `ext4_mount` - type: string - parameters: - description: Parameters is used with predicate, - for example, if you want to inject slab - error in `d_alloc_parallel(struct dentry - *parent, const struct qstr *name)` with - a special name `bananas`, you need to - set it to `struct dentry *parent, const - struct qstr *name` otherwise omit it. - type: string - predicate: - description: Predicate will access the - arguments of this Frame, example with - Parameters's, you can set it to `STRNCMP(name->name, - "bananas", 8)` to make inject only with - it, or omit it to inject for all d_alloc_parallel - call chain. - type: string - type: object - type: array - failtype: - description: 'FailType indicates what to fail, - can be set to ''0'' / ''1'' / ''2'' If `0`, - indicates slab to fail (should_failslab) If - `1`, indicates alloc_page to fail (should_fail_alloc_page) - If `2`, indicates bio to fail (should_fail_bio) - You can read: 1. https://www.kernel.org/doc/html/latest/fault-injection/fault-injection.html - 2. http://github.com/iovisor/bcc/blob/master/tools/inject_example.txt - to learn more' - format: int32 - maximum: 2 - minimum: 0 - type: integer - headers: - description: 'Headers indicates the appropriate - kernel headers you need. Eg: "linux/mmzone.h", - "linux/blkdev.h" and so on' - items: - type: string - type: array - probability: - description: Probability indicates the fails - with probability. If you want 1%, please set - this field with 1. - format: int32 - maximum: 100 - minimum: 0 - type: integer - times: - description: Times indicates the max times of - fails. - format: int32 - minimum: 0 - type: integer - required: - - failtype - type: object - mode: - description: 'Mode defines the mode to run chaos - action. Supported mode: one / all / fixed / fixed-percent - / random-max-percent' - enum: - - one - - all - - fixed - - fixed-percent - - random-max-percent - type: string - remoteCluster: - description: RemoteCluster represents the remote - cluster where the chaos will be deployed - type: string - selector: - description: Selector is used to select pods that - are used to inject chaos action. - properties: - annotationSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select objects. A selector - based on annotations. - type: object - expressionSelectors: - description: a slice of label selector expressions - that can be used to select objects. A list - of selectors based on set-based label expressions. - items: - description: A label selector requirement - is a selector that contains values, a key, - and an operator that relates the key and - values. - properties: - key: - description: key is the label key that - the selector applies to. - type: string - operator: - description: operator represents a key's - relationship to a set of values. Valid - operators are In, NotIn, Exists and - DoesNotExist. - type: string - values: - description: values is an array of string - values. If the operator is In or NotIn, - the values array must be non-empty. - If the operator is Exists or DoesNotExist, - the values array must be empty. This - array is replaced during a strategic - merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - fieldSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select objects. A selector - based on fields. - type: object - labelSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select objects. A selector - based on labels. - type: object - namespaces: - description: Namespaces is a set of namespace - to which objects belong. - items: - type: string - type: array - nodeSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select nodes. Selector which - must match a node's labels, and objects must - belong to these selected nodes. - type: object - nodes: - description: Nodes is a set of node name and - objects must belong to these nodes. - items: - type: string - type: array - podPhaseSelectors: - description: 'PodPhaseSelectors is a set of - condition of a pod at the current time. supported - value: Pending / Running / Succeeded / Failed - / Unknown' - items: - type: string - type: array - pods: - additionalProperties: - items: - type: string - type: array - description: Pods is a map of string keys and - a set values that used to select pods. The - key defines the namespace which pods belong, - and the each values is a set of pod names. - type: object - type: object - value: - description: Value is required when the mode is - set to `FixedMode` / `FixedPercentMode` / `RandomMaxPercentMode`. - If `FixedMode`, provide an integer of pods to - do chaos action. If `FixedPercentMode`, provide - a number from 0-100 to specify the percent of - pods the server can do chaos action. IF `RandomMaxPercentMode`, provide - a number from 0-100 to specify the max percent - of pods to do chaos action - type: string - required: - - failKernRequest - - mode - - selector - type: object - name: - type: string - networkChaos: - description: NetworkChaosSpec defines the desired state - of NetworkChaos - properties: - action: - description: 'Action defines the specific network - chaos action. Supported action: partition, netem, - delay, loss, duplicate, corrupt Default action: - delay' - enum: - - netem - - delay - - loss - - duplicate - - corrupt - - partition - - bandwidth - type: string - bandwidth: - description: Bandwidth represents the detail about - bandwidth control action - properties: - buffer: - description: Buffer is the maximum amount of - bytes that tokens can be available for instantaneously. - format: int32 - minimum: 1 - type: integer - limit: - description: Limit is the number of bytes that - can be queued waiting for tokens to become - available. - format: int32 - minimum: 1 - type: integer - minburst: - description: Minburst specifies the size of - the peakrate bucket. For perfect accuracy, - should be set to the MTU of the interface. If - a peakrate is needed, but some burstiness - is acceptable, this size can be raised. A - 3000 byte minburst allows around 3mbit/s of - peakrate, given 1000 byte packets. - format: int32 - minimum: 0 - type: integer - peakrate: - description: Peakrate is the maximum depletion - rate of the bucket. The peakrate does not - need to be set, it is only necessary if perfect - millisecond timescale shaping is required. - format: int64 - minimum: 0 - type: integer - rate: - description: Rate is the speed knob. Allows - bit, kbit, mbit, gbit, tbit, bps, kbps, mbps, - gbps, tbps unit. bps means bytes per second. - type: string - required: - - buffer - - limit - - rate - type: object - corrupt: - description: Corrupt represents the detail about - corrupt action - properties: - correlation: - type: string - corrupt: - type: string - required: - - corrupt - type: object - delay: - description: Delay represents the detail about delay - action - properties: - correlation: - type: string - jitter: - type: string - latency: - type: string - reorder: - description: ReorderSpec defines details of - packet reorder. - properties: - correlation: - type: string - gap: - type: integer - reorder: - type: string - required: - - gap - - reorder - type: object - required: - - latency - type: object - device: - description: Device represents the network device - to be affected. - type: string - direction: - default: to - description: Direction represents the direction, - this applies on netem and network partition action - enum: - - to - - from - - both - type: string - duplicate: - description: DuplicateSpec represents the detail - about loss action - properties: - correlation: - type: string - duplicate: - type: string - required: - - duplicate - type: object - duration: - description: Duration represents the duration of - the chaos action - type: string - externalTargets: - description: ExternalTargets represents network - targets outside k8s - items: - type: string - type: array - loss: - description: Loss represents the detail about loss - action - properties: - correlation: - type: string - loss: - type: string - required: - - loss - type: object - mode: - description: 'Mode defines the mode to run chaos - action. Supported mode: one / all / fixed / fixed-percent - / random-max-percent' - enum: - - one - - all - - fixed - - fixed-percent - - random-max-percent - type: string - rate: - description: Rate represents the detail about rate - control action - properties: - rate: - description: Rate is the speed knob. Allows - bit, kbit, mbit, gbit, tbit, bps, kbps, mbps, - gbps, tbps unit. bps means bytes per second. - type: string - required: - - rate - type: object - remoteCluster: - description: RemoteCluster represents the remote - cluster where the chaos will be deployed - type: string - selector: - description: Selector is used to select pods that - are used to inject chaos action. - properties: - annotationSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select objects. A selector - based on annotations. - type: object - expressionSelectors: - description: a slice of label selector expressions - that can be used to select objects. A list - of selectors based on set-based label expressions. - items: - description: A label selector requirement - is a selector that contains values, a key, - and an operator that relates the key and - values. - properties: - key: - description: key is the label key that - the selector applies to. - type: string - operator: - description: operator represents a key's - relationship to a set of values. Valid - operators are In, NotIn, Exists and - DoesNotExist. - type: string - values: - description: values is an array of string - values. If the operator is In or NotIn, - the values array must be non-empty. - If the operator is Exists or DoesNotExist, - the values array must be empty. This - array is replaced during a strategic - merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - fieldSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select objects. A selector - based on fields. - type: object - labelSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select objects. A selector - based on labels. - type: object - namespaces: - description: Namespaces is a set of namespace - to which objects belong. - items: - type: string - type: array - nodeSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select nodes. Selector which - must match a node's labels, and objects must - belong to these selected nodes. - type: object - nodes: - description: Nodes is a set of node name and - objects must belong to these nodes. - items: - type: string - type: array - podPhaseSelectors: - description: 'PodPhaseSelectors is a set of - condition of a pod at the current time. supported - value: Pending / Running / Succeeded / Failed - / Unknown' - items: - type: string - type: array - pods: - additionalProperties: - items: - type: string - type: array - description: Pods is a map of string keys and - a set values that used to select pods. The - key defines the namespace which pods belong, - and the each values is a set of pod names. - type: object - type: object - target: - description: Target represents network target, this - applies on netem and network partition action - properties: - mode: - description: 'Mode defines the mode to run chaos - action. Supported mode: one / all / fixed - / fixed-percent / random-max-percent' - enum: - - one - - all - - fixed - - fixed-percent - - random-max-percent - type: string - selector: - description: Selector is used to select pods - that are used to inject chaos action. - properties: - annotationSelectors: - additionalProperties: - type: string - description: Map of string keys and values - that can be used to select objects. A - selector based on annotations. - type: object - expressionSelectors: - description: a slice of label selector expressions - that can be used to select objects. A - list of selectors based on set-based label - expressions. - items: - description: A label selector requirement - is a selector that contains values, - a key, and an operator that relates - the key and values. - properties: - key: - description: key is the label key - that the selector applies to. - type: string - operator: - description: operator represents a - key's relationship to a set of values. - Valid operators are In, NotIn, Exists - and DoesNotExist. - type: string - values: - description: values is an array of - string values. If the operator is - In or NotIn, the values array must - be non-empty. If the operator is - Exists or DoesNotExist, the values - array must be empty. This array - is replaced during a strategic merge - patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - fieldSelectors: - additionalProperties: - type: string - description: Map of string keys and values - that can be used to select objects. A - selector based on fields. - type: object - labelSelectors: - additionalProperties: - type: string - description: Map of string keys and values - that can be used to select objects. A - selector based on labels. - type: object - namespaces: - description: Namespaces is a set of namespace - to which objects belong. - items: - type: string - type: array - nodeSelectors: - additionalProperties: - type: string - description: Map of string keys and values - that can be used to select nodes. Selector - which must match a node's labels, and - objects must belong to these selected - nodes. - type: object - nodes: - description: Nodes is a set of node name - and objects must belong to these nodes. - items: - type: string - type: array - podPhaseSelectors: - description: 'PodPhaseSelectors is a set - of condition of a pod at the current time. - supported value: Pending / Running / Succeeded - / Failed / Unknown' - items: - type: string - type: array - pods: - additionalProperties: - items: - type: string - type: array - description: Pods is a map of string keys - and a set values that used to select pods. - The key defines the namespace which pods - belong, and the each values is a set of - pod names. - type: object - type: object - value: - description: Value is required when the mode - is set to `FixedMode` / `FixedPercentMode` - / `RandomMaxPercentMode`. If `FixedMode`, - provide an integer of pods to do chaos action. - If `FixedPercentMode`, provide a number from - 0-100 to specify the percent of pods the server - can do chaos action. IF `RandomMaxPercentMode`, provide - a number from 0-100 to specify the max percent - of pods to do chaos action - type: string - required: - - mode - - selector - type: object - targetDevice: - description: TargetDevice represents the network - device to be affected in target scope. - type: string - value: - description: Value is required when the mode is - set to `FixedMode` / `FixedPercentMode` / `RandomMaxPercentMode`. - If `FixedMode`, provide an integer of pods to - do chaos action. If `FixedPercentMode`, provide - a number from 0-100 to specify the percent of - pods the server can do chaos action. IF `RandomMaxPercentMode`, provide - a number from 0-100 to specify the max percent - of pods to do chaos action - type: string - required: - - action - - mode - - selector - type: object - physicalmachineChaos: - description: PhysicalMachineChaosSpec defines the desired - state of PhysicalMachineChaos - properties: - action: - description: the subAction, generate automatically - enum: - - stress-cpu - - stress-mem - - disk-read-payload - - disk-write-payload - - disk-fill - - network-corrupt - - network-duplicate - - network-loss - - network-delay - - network-partition - - network-dns - - network-bandwidth - - network-flood - - network-down - - process - - jvm-exception - - jvm-gc - - jvm-latency - - jvm-return - - jvm-stress - - jvm-rule-data - - jvm-mysql - - clock - - redis-expiration - - redis-penetration - - redis-cacheLimit - - redis-restart - - redis-stop - - kafka-fill - - kafka-flood - - kafka-io - - file-create - - file-modify - - file-delete - - file-rename - - file-append - - file-replace - - vm - - user_defined - type: string - address: - description: 'DEPRECATED: Use Selector instead. - Only one of Address and Selector could be specified.' - items: - type: string - type: array - clock: - properties: - clock-ids-slice: - description: the identifier of the particular - clock on which to act. More clock description - in linux kernel can be found in man page of - clock_getres, clock_gettime, clock_settime. - Muti clock ids should be split with "," - type: string - pid: - description: the pid of target program. - type: integer - time-offset: - description: specifies the length of time offset. - type: string - type: object - disk-fill: - properties: - fill-by-fallocate: - description: fill disk by fallocate - type: boolean - path: - description: specifies the location to fill - data in. if path not provided, payload will - read/write from/into a temp file, temp file - will be deleted after writing - type: string - size: - description: 'specifies how many units of data - will write into the file path. support unit: - c=1, w=2, b=512, kB=1000, K=1024, MB=1000*1000, - M=1024*1024, GB=1000*1000*1000, G=1024*1024*1024 - BYTES. example : 1M | 512kB' - type: string - type: object - disk-read-payload: - properties: - path: - description: specifies the location to fill - data in. if path not provided, payload will - read/write from/into a temp file, temp file - will be deleted after writing - type: string - payload-process-num: - description: specifies the number of process - work on writing, default 1, only 1-255 is - valid value - type: integer - size: - description: 'specifies how many units of data - will write into the file path. support unit: - c=1, w=2, b=512, kB=1000, K=1024, MB=1000*1000, - M=1024*1024, GB=1000*1000*1000, G=1024*1024*1024 - BYTES. example : 1M | 512kB' - type: string - type: object - disk-write-payload: - properties: - path: - description: specifies the location to fill - data in. if path not provided, payload will - read/write from/into a temp file, temp file - will be deleted after writing - type: string - payload-process-num: - description: specifies the number of process - work on writing, default 1, only 1-255 is - valid value - type: integer - size: - description: 'specifies how many units of data - will write into the file path. support unit: - c=1, w=2, b=512, kB=1000, K=1024, MB=1000*1000, - M=1024*1024, GB=1000*1000*1000, G=1024*1024*1024 - BYTES. example : 1M | 512kB' - type: string - type: object - duration: - description: Duration represents the duration of - the chaos action - type: string - file-append: - properties: - count: - description: Count is the number of times to - append the data. - type: integer - data: - description: Data is the data for append. - type: string - file-name: - description: FileName is the name of the file - to be created, modified, deleted, renamed, - or appended. - type: string - type: object - file-create: - properties: - dir-name: - description: DirName is the directory name to - create or delete. - type: string - file-name: - description: FileName is the name of the file - to be created, modified, deleted, renamed, - or appended. - type: string - type: object - file-delete: - properties: - dir-name: - description: DirName is the directory name to - create or delete. - type: string - file-name: - description: FileName is the name of the file - to be created, modified, deleted, renamed, - or appended. - type: string - type: object - file-modify: - properties: - file-name: - description: FileName is the name of the file - to be created, modified, deleted, renamed, - or appended. - type: string - privilege: - description: Privilege is the file privilege - to be set. - format: int32 - type: integer - type: object - file-rename: - properties: - dest-file: - description: DestFile is the name to be renamed. - type: string - source-file: - description: SourceFile is the name need to - be renamed. - type: string - type: object - file-replace: - properties: - dest-string: - description: DestStr is the destination string - of the file. - type: string - file-name: - description: FileName is the name of the file - to be created, modified, deleted, renamed, - or appended. - type: string - line: - description: Line is the line number of the - file to be replaced. - type: integer - origin-string: - description: OriginStr is the origin string - of the file. - type: string - type: object - http-abort: - properties: - code: - description: Code is a rule to select target - by http status code in response - type: string - method: - description: HTTP method - type: string - path: - description: Match path of Uri with wildcard - matches - type: string - port: - description: The TCP port that the target service - listens on - format: int32 - type: integer - proxy_ports: - description: Composed with one of the port of - HTTP connection, we will only attack HTTP - connection with port inside proxy_ports - items: - type: integer - type: array - target: - description: 'HTTP target: Request or Response' - type: string - required: - - proxy_ports - - target - type: object - http-config: - properties: - file_path: - description: The config file path - type: string - type: object - http-delay: - properties: - code: - description: Code is a rule to select target - by http status code in response - type: string - delay: - description: Delay represents the delay of the - target request/response - type: string - method: - description: HTTP method - type: string - path: - description: Match path of Uri with wildcard - matches - type: string - port: - description: The TCP port that the target service - listens on - format: int32 - type: integer - proxy_ports: - description: Composed with one of the port of - HTTP connection, we will only attack HTTP - connection with port inside proxy_ports - items: - type: integer - type: array - target: - description: 'HTTP target: Request or Response' - type: string - required: - - delay - - proxy_ports - - target - type: object - http-request: - description: used for HTTP request, now only support - GET - properties: - count: - description: The number of requests to send - type: integer - enable-conn-pool: - description: Enable connection pool - type: boolean - url: - description: Request to send" - type: string - type: object - jvm-exception: - properties: - class: - description: Java class - type: string - exception: - description: the exception which needs to throw - for action `exception` - type: string - method: - description: the method in Java class - type: string - pid: - description: the pid of Java process which needs - to attach - type: integer - port: - description: the port of agent server, default - 9277 - format: int32 - type: integer - type: object - jvm-gc: - properties: - pid: - description: the pid of Java process which needs - to attach - type: integer - port: - description: the port of agent server, default - 9277 - format: int32 - type: integer - type: object - jvm-latency: - properties: - class: - description: Java class - type: string - latency: - description: the latency duration for action - 'latency', unit ms - type: integer - method: - description: the method in Java class - type: string - pid: - description: the pid of Java process which needs - to attach - type: integer - port: - description: the port of agent server, default - 9277 - format: int32 - type: integer - type: object - jvm-mysql: - properties: - database: - description: the match database default value - is "", means match all database - type: string - exception: - description: The exception which needs to throw - for action `exception` or the exception message - needs to throw in action `mysql` - type: string - latency: - description: The latency duration for action - 'latency' or the latency duration in action - `mysql` - type: integer - mysqlConnectorVersion: - description: the version of mysql-connector-java, - only support 5.X.X(set to "5") and 8.X.X(set - to "8") now - type: string - pid: - description: the pid of Java process which needs - to attach - type: integer - port: - description: the port of agent server, default - 9277 - format: int32 - type: integer - sqlType: - description: the match sql type default value - is "", means match all SQL type. The value - can be 'select', 'insert', 'update', 'delete', - 'replace'. - type: string - table: - description: the match table default value is - "", means match all table - type: string - type: object - jvm-return: - properties: - class: - description: Java class - type: string - method: - description: the method in Java class - type: string - pid: - description: the pid of Java process which needs - to attach - type: integer - port: - description: the port of agent server, default - 9277 - format: int32 - type: integer - value: - description: the return value for action 'return' - type: string - type: object - jvm-rule-data: - properties: - pid: - description: the pid of Java process which needs - to attach - type: integer - port: - description: the port of agent server, default - 9277 - format: int32 - type: integer - rule-data: - description: RuleData used to save the rule - file's data, will use it when recover - type: string - type: object - jvm-stress: - properties: - cpu-count: - description: the CPU core number need to use, - only set it when action is stress - type: integer - mem-type: - description: the memory type need to locate, - only set it when action is stress, the value - can be 'stack' or 'heap' - type: string - pid: - description: the pid of Java process which needs - to attach - type: integer - port: - description: the port of agent server, default - 9277 - format: int32 - type: integer - type: object - kafka-fill: - properties: - host: - description: The host of kafka server - type: string - maxBytes: - description: The max bytes to fill - format: int64 - type: integer - messageSize: - description: The size of each message - type: integer - password: - description: The password of kafka client - type: string - port: - description: The port of kafka server - type: integer - reloadCommand: - description: The command to reload kafka config - type: string - topic: - description: The topic to attack - type: string - username: - description: The username of kafka client - type: string - type: object - kafka-flood: - properties: - host: - description: The host of kafka server - type: string - messageSize: - description: The size of each message - type: integer - password: - description: The password of kafka client - type: string - port: - description: The port of kafka server - type: integer - threads: - description: The number of worker threads - type: integer - topic: - description: The topic to attack - type: string - username: - description: The username of kafka client - type: string - type: object - kafka-io: - properties: - configFile: - description: The path of server config - type: string - nonReadable: - description: Make kafka cluster non-readable - type: boolean - nonWritable: - description: Make kafka cluster non-writable - type: boolean - topic: - description: The topic to attack - type: string - type: object - mode: - description: 'Mode defines the mode to run chaos - action. Supported mode: one / all / fixed / fixed-percent - / random-max-percent' - enum: - - one - - all - - fixed - - fixed-percent - - random-max-percent - type: string - network-bandwidth: - properties: - buffer: - format: int32 - minimum: 1 - type: integer - device: - type: string - hostname: - type: string - ip-address: - type: string - limit: - format: int32 - minimum: 1 - type: integer - minburst: - format: int32 - type: integer - peakrate: - format: int64 - type: integer - rate: - type: string - required: - - buffer - - limit - - rate - type: object - network-corrupt: - properties: - correlation: - description: correlation is percentage (10 is - 10%) - type: string - device: - description: the network interface to impact - type: string - egress-port: - description: only impact egress traffic to these - destination ports, use a ',' to separate or - to indicate the range, such as 80, 8001:8010. - it can only be used in conjunction with -p - tcp or -p udp - type: string - hostname: - description: only impact traffic to these hostnames - type: string - ip-address: - description: only impact egress traffic to these - IP addresses - type: string - ip-protocol: - description: 'only impact traffic using this - IP protocol, supported: tcp, udp, icmp, all' - type: string - percent: - description: percentage of packets to corrupt - (10 is 10%) - type: string - source-port: - description: only impact egress traffic from - these source ports, use a ',' to separate - or to indicate the range, such as 80, 8001:8010. - it can only be used in conjunction with -p - tcp or -p udp - type: string - type: object - network-delay: - properties: - accept-tcp-flags: - description: only the packet which match the - tcp flag can be accepted, others will be dropped. - only set when the IPProtocol is tcp, used - for partition. - type: string - correlation: - description: correlation is percentage (10 is - 10%) - type: string - device: - description: the network interface to impact - type: string - egress-port: - description: only impact egress traffic to these - destination ports, use a ',' to separate or - to indicate the range, such as 80, 8001:8010. - it can only be used in conjunction with -p - tcp or -p udp - type: string - hostname: - description: only impact traffic to these hostnames - type: string - ip-address: - description: only impact egress traffic to these - IP addresses - type: string - ip-protocol: - description: 'only impact traffic using this - IP protocol, supported: tcp, udp, icmp, all' - type: string - jitter: - description: 'jitter time, time units: ns, us - (or µs), ms, s, m, h.' - type: string - latency: - description: 'delay egress time, time units: - ns, us (or µs), ms, s, m, h.' - type: string - source-port: - description: only impact egress traffic from - these source ports, use a ',' to separate - or to indicate the range, such as 80, 8001:8010. - it can only be used in conjunction with -p - tcp or -p udp - type: string - type: object - network-dns: - properties: - dns-domain-name: - description: map this host to specified IP - type: string - dns-ip: - description: map specified host to this IP address - type: string - dns-server: - description: update the DNS server in /etc/resolv.conf - with this value - type: string - type: object - network-down: - properties: - device: - description: The network interface to impact - type: string - duration: - description: 'NIC down time, time units: ns, - us (or µs), ms, s, m, h.' - type: string - type: object - network-duplicate: - properties: - correlation: - description: correlation is percentage (10 is - 10%) - type: string - device: - description: the network interface to impact - type: string - egress-port: - description: only impact egress traffic to these - destination ports, use a ',' to separate or - to indicate the range, such as 80, 8001:8010. - it can only be used in conjunction with -p - tcp or -p udp - type: string - hostname: - description: only impact traffic to these hostnames - type: string - ip-address: - description: only impact egress traffic to these - IP addresses - type: string - ip-protocol: - description: 'only impact traffic using this - IP protocol, supported: tcp, udp, icmp, all' - type: string - percent: - description: percentage of packets to duplicate - (10 is 10%) - type: string - source-port: - description: only impact egress traffic from - these source ports, use a ',' to separate - or to indicate the range, such as 80, 8001:8010. - it can only be used in conjunction with -p - tcp or -p udp - type: string - type: object - network-flood: - properties: - duration: - description: The number of seconds to run the - iperf test - type: string - ip-address: - description: Generate traffic to this IP address - type: string - parallel: - description: The number of iperf parallel client - threads to run - format: int32 - type: integer - port: - description: Generate traffic to this port on - the IP address - type: string - rate: - description: The speed of network traffic, allows - bps, kbps, mbps, gbps, tbps unit. bps means - bytes per second - type: string - required: - - duration - - rate - type: object - network-loss: - properties: - correlation: - description: correlation is percentage (10 is - 10%) - type: string - device: - description: the network interface to impact - type: string - egress-port: - description: only impact egress traffic to these - destination ports, use a ',' to separate or - to indicate the range, such as 80, 8001:8010. - it can only be used in conjunction with -p - tcp or -p udp - type: string - hostname: - description: only impact traffic to these hostnames - type: string - ip-address: - description: only impact egress traffic to these - IP addresses - type: string - ip-protocol: - description: 'only impact traffic using this - IP protocol, supported: tcp, udp, icmp, all' - type: string - percent: - description: percentage of packets to loss (10 - is 10%) - type: string - source-port: - description: only impact egress traffic from - these source ports, use a ',' to separate - or to indicate the range, such as 80, 8001:8010. - it can only be used in conjunction with -p - tcp or -p udp - type: string - type: object - network-partition: - properties: - accept-tcp-flags: - description: only the packet which match the - tcp flag can be accepted, others will be dropped. - only set when the IPProtocol is tcp, used - for partition. - type: string - device: - description: the network interface to impact - type: string - direction: - description: specifies the partition direction, - values can be 'from', 'to'. 'from' means packets - coming from the 'IPAddress' or 'Hostname' - and going to your server, 'to' means packets - originating from your server and going to - the 'IPAddress' or 'Hostname'. - type: string - hostname: - description: only impact traffic to these hostnames - type: string - ip-address: - description: only impact egress traffic to these - IP addresses - type: string - ip-protocol: - description: only impact egress traffic to these - IP addresses - type: string - type: object - process: - properties: - process: - description: the process name or the process - ID - type: string - recoverCmd: - description: the command to be run when recovering - experiment - type: string - signal: - description: the signal number to send - type: integer - type: object - redis-cacheLimit: - properties: - addr: - description: The adress of Redis server - type: string - cacheSize: - description: The size of `maxmemory` - type: string - password: - description: The password of Redis server - type: string - percent: - description: Specifies maxmemory as a percentage - of the original value - type: string - type: object - redis-expiration: - properties: - addr: - description: The adress of Redis server - type: string - expiration: - description: The expiration of the keys - type: string - key: - description: The keys to be expired - type: string - option: - description: Additional options for `expiration` - type: string - password: - description: The password of Redis server - type: string - type: object - redis-penetration: - properties: - addr: - description: The adress of Redis server - type: string - password: - description: The password of Redis server - type: string - requestNum: - description: The number of requests to be sent - type: integer - type: object - redis-restart: - properties: - addr: - description: The adress of Redis server - type: string - conf: - description: The path of Sentinel conf - type: string - flushConfig: - description: The control flag determines whether - to flush config - type: boolean - password: - description: The password of Redis server - type: string - redisPath: - description: The path of `redis-server` command-line - tool - type: boolean - type: object - redis-stop: - properties: - addr: - description: The adress of Redis server - type: string - conf: - description: The path of Sentinel conf - type: string - flushConfig: - description: The control flag determines whether - to flush config - type: boolean - password: - description: The password of Redis server - type: string - redisPath: - description: The path of `redis-server` command-line - tool - type: boolean - type: object - remoteCluster: - description: RemoteCluster represents the remote - cluster where the chaos will be deployed - type: string - selector: - description: Selector is used to select physical - machines that are used to inject chaos action. - properties: - annotationSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select objects. A selector - based on annotations. - type: object - expressionSelectors: - description: a slice of label selector expressions - that can be used to select objects. A list - of selectors based on set-based label expressions. - items: - description: A label selector requirement - is a selector that contains values, a key, - and an operator that relates the key and - values. - properties: - key: - description: key is the label key that - the selector applies to. - type: string - operator: - description: operator represents a key's - relationship to a set of values. Valid - operators are In, NotIn, Exists and - DoesNotExist. - type: string - values: - description: values is an array of string - values. If the operator is In or NotIn, - the values array must be non-empty. - If the operator is Exists or DoesNotExist, - the values array must be empty. This - array is replaced during a strategic - merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - fieldSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select objects. A selector - based on fields. - type: object - labelSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select objects. A selector - based on labels. - type: object - namespaces: - description: Namespaces is a set of namespace - to which objects belong. - items: - type: string - type: array - physicalMachines: - additionalProperties: - items: - type: string - type: array - description: PhysicalMachines is a map of string - keys and a set values that used to select - physical machines. The key defines the namespace - which physical machine belong, and each value - is a set of physical machine names. - type: object - type: object - stress-cpu: - properties: - load: - description: specifies P percent loading per - CPU worker. 0 is effectively a sleep (no load) - and 100 is full loading. - type: integer - options: - description: extend stress-ng options - items: - type: string - type: array - workers: - description: specifies N workers to apply the - stressor. - type: integer - type: object - stress-mem: - properties: - options: - description: extend stress-ng options - items: - type: string - type: array - size: - description: 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 - type: object - uid: - description: the experiment ID - type: string - user_defined: - properties: - attackCmd: - description: The command to be executed when - attack - type: string - recoverCmd: - description: The command to be executed when - recover - type: string - type: object - value: - description: Value is required when the mode is - set to `FixedMode` / `FixedPercentMode` / `RandomMaxPercentMode`. - If `FixedMode`, provide an integer of physical - machines to do chaos action. If `FixedPercentMode`, - provide a number from 0-100 to specify the percent - of physical machines the server can do chaos action. - IF `RandomMaxPercentMode`, provide a number from - 0-100 to specify the max percent of pods to do - chaos action - type: string - vm: - properties: - vm-name: - description: The name of the VM to be injected - type: string - type: object - required: - - action - - mode - type: object - podChaos: - description: PodChaosSpec defines the attributes that - a user creates on a chaos experiment about pods. - properties: - action: - description: 'Action defines the specific pod chaos - action. Supported action: pod-kill / pod-failure - / container-kill Default action: pod-kill' - enum: - - pod-kill - - pod-failure - - container-kill - type: string - containerNames: - description: ContainerNames indicates list of the - name of affected container. If not set, the first - container will be injected - items: - type: string - type: array - duration: - description: Duration represents the duration of - the chaos action. It is required when the action - is `PodFailureAction`. A duration string is a - possibly signed sequence of decimal numbers, each - with optional fraction and a unit suffix, such - as "300ms", "-1.5h" or "2h45m". Valid time units - are "ns", "us" (or "µs"), "ms", "s", "m", "h". - type: string - gracePeriod: - description: GracePeriod is used in pod-kill action. - It represents the duration in seconds before the - pod should be deleted. Value must be non-negative - integer. The default value is zero that indicates - delete immediately. - format: int64 - minimum: 0 - type: integer - mode: - description: 'Mode defines the mode to run chaos - action. Supported mode: one / all / fixed / fixed-percent - / random-max-percent' - enum: - - one - - all - - fixed - - fixed-percent - - random-max-percent - type: string - remoteCluster: - description: RemoteCluster represents the remote - cluster where the chaos will be deployed - type: string - selector: - description: Selector is used to select pods that - are used to inject chaos action. - properties: - annotationSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select objects. A selector - based on annotations. - type: object - expressionSelectors: - description: a slice of label selector expressions - that can be used to select objects. A list - of selectors based on set-based label expressions. - items: - description: A label selector requirement - is a selector that contains values, a key, - and an operator that relates the key and - values. - properties: - key: - description: key is the label key that - the selector applies to. - type: string - operator: - description: operator represents a key's - relationship to a set of values. Valid - operators are In, NotIn, Exists and - DoesNotExist. - type: string - values: - description: values is an array of string - values. If the operator is In or NotIn, - the values array must be non-empty. - If the operator is Exists or DoesNotExist, - the values array must be empty. This - array is replaced during a strategic - merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - fieldSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select objects. A selector - based on fields. - type: object - labelSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select objects. A selector - based on labels. - type: object - namespaces: - description: Namespaces is a set of namespace - to which objects belong. - items: - type: string - type: array - nodeSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select nodes. Selector which - must match a node's labels, and objects must - belong to these selected nodes. - type: object - nodes: - description: Nodes is a set of node name and - objects must belong to these nodes. - items: - type: string - type: array - podPhaseSelectors: - description: 'PodPhaseSelectors is a set of - condition of a pod at the current time. supported - value: Pending / Running / Succeeded / Failed - / Unknown' - items: - type: string - type: array - pods: - additionalProperties: - items: - type: string - type: array - description: Pods is a map of string keys and - a set values that used to select pods. The - key defines the namespace which pods belong, - and the each values is a set of pod names. - type: object - type: object - value: - description: Value is required when the mode is - set to `FixedMode` / `FixedPercentMode` / `RandomMaxPercentMode`. - If `FixedMode`, provide an integer of pods to - do chaos action. If `FixedPercentMode`, provide - a number from 0-100 to specify the percent of - pods the server can do chaos action. IF `RandomMaxPercentMode`, provide - a number from 0-100 to specify the max percent - of pods to do chaos action - type: string - required: - - action - - mode - - selector - type: object - schedule: - description: Schedule describe the Schedule(describing - scheduled chaos) to be injected with chaos nodes. - Only used when Type is TypeSchedule. - properties: - awsChaos: - description: AWSChaosSpec is the content of the - specification for an AWSChaos - properties: - action: - description: 'Action defines the specific aws - chaos action. Supported action: ec2-stop / - ec2-restart / detach-volume Default action: - ec2-stop' - 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. Needed in detach-volume. - type: string - duration: - description: Duration represents the duration - of the chaos action. - type: string - ec2Instance: - description: Ec2Instance indicates the ID of - the ec2 instance. - type: string - endpoint: - description: Endpoint indicates the endpoint - of the aws server. Just used it in test now. - type: string - remoteCluster: - description: RemoteCluster represents the remote - cluster where the chaos will be deployed - type: string - secretName: - description: SecretName defines the name of - kubernetes secret. - type: string - volumeID: - description: EbsVolume indicates the ID of the - EBS volume. Needed in detach-volume. - type: string - required: - - action - - awsRegion - - ec2Instance - type: object - azureChaos: - description: AzureChaosSpec is the content of the - specification for an AzureChaos - properties: - action: - description: 'Action defines the specific azure - chaos action. Supported action: vm-stop / - vm-restart / disk-detach Default action: vm-stop' - enum: - - vm-stop - - vm-restart - - disk-detach - type: string - diskName: - description: DiskName indicates the name of - the disk. Needed in disk-detach. - type: string - duration: - description: Duration represents the duration - of the chaos action. - type: string - lun: - description: LUN indicates the Logical Unit - Number of the data disk. Needed in disk-detach. - type: integer - remoteCluster: - description: RemoteCluster represents the remote - cluster where the chaos will be deployed - type: string - resourceGroupName: - description: ResourceGroupName defines the name - of ResourceGroup - type: string - secretName: - description: SecretName defines the name of - kubernetes secret. It is used for Azure credentials. - type: string - subscriptionID: - description: SubscriptionID defines the id of - Azure subscription. - type: string - vmName: - description: VMName defines the name of Virtual - Machine - type: string - required: - - action - - resourceGroupName - - subscriptionID - - vmName - type: object - blockChaos: - description: BlockChaosSpec is the content of the - specification for a BlockChaos - properties: - action: - description: 'Action defines the specific block - chaos action. Supported action: delay' - enum: - - delay - type: string - containerNames: - description: ContainerNames indicates list of - the name of affected container. If not set, - the first container will be injected - items: - type: string - type: array - delay: - description: Delay defines the delay distribution. - properties: - correlation: - type: string - jitter: - type: string - latency: - description: Latency defines the latency - of every io request. - type: string - type: object - duration: - description: Duration represents the duration - of the chaos action. - type: string - mode: - description: 'Mode defines the mode to run chaos - action. Supported mode: one / all / fixed - / fixed-percent / random-max-percent' - enum: - - one - - all - - fixed - - fixed-percent - - random-max-percent - type: string - remoteCluster: - description: RemoteCluster represents the remote - cluster where the chaos will be deployed - type: string - selector: - description: Selector is used to select pods - that are used to inject chaos action. - properties: - annotationSelectors: - additionalProperties: - type: string - description: Map of string keys and values - that can be used to select objects. A - selector based on annotations. - type: object - expressionSelectors: - description: a slice of label selector expressions - that can be used to select objects. A - list of selectors based on set-based label - expressions. - items: - description: A label selector requirement - is a selector that contains values, - a key, and an operator that relates - the key and values. - properties: - key: - description: key is the label key - that the selector applies to. - type: string - operator: - description: operator represents a - key's relationship to a set of values. - Valid operators are In, NotIn, Exists - and DoesNotExist. - type: string - values: - description: values is an array of - string values. If the operator is - In or NotIn, the values array must - be non-empty. If the operator is - Exists or DoesNotExist, the values - array must be empty. This array - is replaced during a strategic merge - patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - fieldSelectors: - additionalProperties: - type: string - description: Map of string keys and values - that can be used to select objects. A - selector based on fields. - type: object - labelSelectors: - additionalProperties: - type: string - description: Map of string keys and values - that can be used to select objects. A - selector based on labels. - type: object - namespaces: - description: Namespaces is a set of namespace - to which objects belong. - items: - type: string - type: array - nodeSelectors: - additionalProperties: - type: string - description: Map of string keys and values - that can be used to select nodes. Selector - which must match a node's labels, and - objects must belong to these selected - nodes. - type: object - nodes: - description: Nodes is a set of node name - and objects must belong to these nodes. - items: - type: string - type: array - podPhaseSelectors: - description: 'PodPhaseSelectors is a set - of condition of a pod at the current time. - supported value: Pending / Running / Succeeded - / Failed / Unknown' - items: - type: string - type: array - pods: - additionalProperties: - items: - type: string - type: array - description: Pods is a map of string keys - and a set values that used to select pods. - The key defines the namespace which pods - belong, and the each values is a set of - pod names. - type: object - type: object - value: - description: Value is required when the mode - is set to `FixedMode` / `FixedPercentMode` - / `RandomMaxPercentMode`. If `FixedMode`, - provide an integer of pods to do chaos action. - If `FixedPercentMode`, provide a number from - 0-100 to specify the percent of pods the server - can do chaos action. IF `RandomMaxPercentMode`, provide - a number from 0-100 to specify the max percent - of pods to do chaos action - type: string - volumeName: - type: string - required: - - action - - mode - - selector - - volumeName - type: object - concurrencyPolicy: - enum: - - Forbid - - Allow - type: string - dnsChaos: - description: DNSChaosSpec defines the desired state - of DNSChaos - properties: - action: - description: 'Action defines the specific DNS - chaos action. Supported action: error, random - Default action: error' - enum: - - error - - random - type: string - containerNames: - description: ContainerNames indicates list of - the name of affected container. If not set, - the first container will be injected - items: - type: string - type: array - duration: - description: Duration represents the duration - of the chaos action - type: string - mode: - description: 'Mode defines the mode to run chaos - action. Supported mode: one / all / fixed - / fixed-percent / random-max-percent' - enum: - - one - - all - - fixed - - fixed-percent - - random-max-percent - type: string - patterns: - description: 'Choose which domain names to take - effect, support the placeholder ? and wildcard - *, or the Specified domain name. Note: 1. - The wildcard * must be at the end of the string. - For example, chaos-*.org is invalid. 2. if - the patterns is empty, will take effect on - all the domain names. For example: The value - is ["google.com", "github.*", "chaos-mes?.org"], - will take effect on "google.com", "github.com" - and "chaos-mesh.org"' - items: - type: string - type: array - remoteCluster: - description: RemoteCluster represents the remote - cluster where the chaos will be deployed - type: string - selector: - description: Selector is used to select pods - that are used to inject chaos action. - properties: - annotationSelectors: - additionalProperties: - type: string - description: Map of string keys and values - that can be used to select objects. A - selector based on annotations. - type: object - expressionSelectors: - description: a slice of label selector expressions - that can be used to select objects. A - list of selectors based on set-based label - expressions. - items: - description: A label selector requirement - is a selector that contains values, - a key, and an operator that relates - the key and values. - properties: - key: - description: key is the label key - that the selector applies to. - type: string - operator: - description: operator represents a - key's relationship to a set of values. - Valid operators are In, NotIn, Exists - and DoesNotExist. - type: string - values: - description: values is an array of - string values. If the operator is - In or NotIn, the values array must - be non-empty. If the operator is - Exists or DoesNotExist, the values - array must be empty. This array - is replaced during a strategic merge - patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - fieldSelectors: - additionalProperties: - type: string - description: Map of string keys and values - that can be used to select objects. A - selector based on fields. - type: object - labelSelectors: - additionalProperties: - type: string - description: Map of string keys and values - that can be used to select objects. A - selector based on labels. - type: object - namespaces: - description: Namespaces is a set of namespace - to which objects belong. - items: - type: string - type: array - nodeSelectors: - additionalProperties: - type: string - description: Map of string keys and values - that can be used to select nodes. Selector - which must match a node's labels, and - objects must belong to these selected - nodes. - type: object - nodes: - description: Nodes is a set of node name - and objects must belong to these nodes. - items: - type: string - type: array - podPhaseSelectors: - description: 'PodPhaseSelectors is a set - of condition of a pod at the current time. - supported value: Pending / Running / Succeeded - / Failed / Unknown' - items: - type: string - type: array - pods: - additionalProperties: - items: - type: string - type: array - description: Pods is a map of string keys - and a set values that used to select pods. - The key defines the namespace which pods - belong, and the each values is a set of - pod names. - type: object - type: object - value: - description: Value is required when the mode - is set to `FixedMode` / `FixedPercentMode` - / `RandomMaxPercentMode`. If `FixedMode`, - provide an integer of pods to do chaos action. - If `FixedPercentMode`, provide a number from - 0-100 to specify the percent of pods the server - can do chaos action. IF `RandomMaxPercentMode`, provide - a number from 0-100 to specify the max percent - of pods to do chaos action - type: string - required: - - action - - mode - - selector - type: object - gcpChaos: - description: GCPChaosSpec is the content of the - specification for a GCPChaos - properties: - action: - description: 'Action defines the specific gcp - chaos action. Supported action: node-stop - / node-reset / disk-loss Default action: node-stop' - enum: - - node-stop - - node-reset - - disk-loss - type: string - deviceNames: - description: The device name of disks to detach. - Needed in disk-loss. - items: - type: string - type: array - duration: - description: Duration represents the duration - of the chaos action. - type: string - instance: - description: Instance defines the name of the - instance - type: string - project: - description: Project defines the ID of gcp project. - type: string - remoteCluster: - description: RemoteCluster represents the remote - cluster where the chaos will be deployed - type: string - secretName: - description: SecretName defines the name of - kubernetes secret. It is used for GCP credentials. - type: string - zone: - description: Zone defines the zone of gcp project. - type: string - required: - - action - - instance - - project - - zone - type: object - historyLimit: - minimum: 1 - type: integer - httpChaos: - properties: - abort: - description: Abort is a rule to abort a http - session. - type: boolean - code: - description: Code is a rule to select target - by http status code in response. - format: int32 - type: integer - delay: - description: Delay represents the delay of the - target request/response. A duration string - is a possibly unsigned sequence of decimal - numbers, each with optional fraction and a - unit suffix, such as "300ms", "2h45m". Valid - time units are "ns", "us" (or "µs"), "ms", - "s", "m", "h". - type: string - duration: - description: Duration represents the duration - of the chaos action. - type: string - method: - description: Method is a rule to select target - by http method in request. - type: string - mode: - description: 'Mode defines the mode to run chaos - action. Supported mode: one / all / fixed - / fixed-percent / random-max-percent' - enum: - - one - - all - - fixed - - fixed-percent - - random-max-percent - type: string - patch: - description: Patch is a rule to patch some contents - in target. - properties: - body: - description: Body is a rule to patch message - body of target. - properties: - type: - description: Type represents the patch - type, only support `JSON` as [merge - patch json](https://tools.ietf.org/html/rfc7396) - currently. - type: string - value: - description: Value is the patch contents. - type: string - required: - - type - - value - type: object - headers: - description: 'Headers is a rule to append - http headers of target. For example: `[["Set-Cookie", - ""], ["Set-Cookie", ""]]`.' - items: - items: - type: string - type: array - type: array - queries: - description: 'Queries is a rule to append - uri queries of target(Request only). For - example: `[["foo", "bar"], ["foo", "unknown"]]`.' - items: - items: - type: string - type: array - type: array - type: object - path: - description: Path is a rule to select target - by uri path in http request. - type: string - port: - description: Port represents the target port - to be proxy of. - format: int32 - type: integer - remoteCluster: - description: RemoteCluster represents the remote - cluster where the chaos will be deployed - type: string - replace: - description: Replace is a rule to replace some - contents in target. - properties: - body: - description: Body is a rule to replace http - message body in target. - format: byte - type: string - code: - description: Code is a rule to replace http - status code in response. - format: int32 - type: integer - headers: - additionalProperties: - type: string - description: Headers is a rule to replace - http headers of target. The key-value - pairs represent header name and header - value pairs. - type: object - method: - description: Method is a rule to replace - http method in request. - type: string - path: - description: Path is rule to to replace - uri path in http request. - type: string - queries: - additionalProperties: - type: string - description: 'Queries is a rule to replace - uri queries in http request. For example, - with value `{ "foo": "unknown" }`, the - `/?foo=bar` will be altered to `/?foo=unknown`,' - type: object - type: object - request_headers: - additionalProperties: - type: string - description: RequestHeaders is a rule to select - target by http headers in request. The key-value - pairs represent header name and header value - pairs. - type: object - response_headers: - additionalProperties: - type: string - description: ResponseHeaders is a rule to select - target by http headers in response. The key-value - pairs represent header name and header value - pairs. - type: object - selector: - description: Selector is used to select pods - that are used to inject chaos action. - properties: - annotationSelectors: - additionalProperties: - type: string - description: Map of string keys and values - that can be used to select objects. A - selector based on annotations. - type: object - expressionSelectors: - description: a slice of label selector expressions - that can be used to select objects. A - list of selectors based on set-based label - expressions. - items: - description: A label selector requirement - is a selector that contains values, - a key, and an operator that relates - the key and values. - properties: - key: - description: key is the label key - that the selector applies to. - type: string - operator: - description: operator represents a - key's relationship to a set of values. - Valid operators are In, NotIn, Exists - and DoesNotExist. - type: string - values: - description: values is an array of - string values. If the operator is - In or NotIn, the values array must - be non-empty. If the operator is - Exists or DoesNotExist, the values - array must be empty. This array - is replaced during a strategic merge - patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - fieldSelectors: - additionalProperties: - type: string - description: Map of string keys and values - that can be used to select objects. A - selector based on fields. - type: object - labelSelectors: - additionalProperties: - type: string - description: Map of string keys and values - that can be used to select objects. A - selector based on labels. - type: object - namespaces: - description: Namespaces is a set of namespace - to which objects belong. - items: - type: string - type: array - nodeSelectors: - additionalProperties: - type: string - description: Map of string keys and values - that can be used to select nodes. Selector - which must match a node's labels, and - objects must belong to these selected - nodes. - type: object - nodes: - description: Nodes is a set of node name - and objects must belong to these nodes. - items: - type: string - type: array - podPhaseSelectors: - description: 'PodPhaseSelectors is a set - of condition of a pod at the current time. - supported value: Pending / Running / Succeeded - / Failed / Unknown' - items: - type: string - type: array - pods: - additionalProperties: - items: - type: string - type: array - description: Pods is a map of string keys - and a set values that used to select pods. - The key defines the namespace which pods - belong, and the each values is a set of - pod names. - type: object - type: object - target: - description: Target is the object to be selected - and injected. - enum: - - Request - - Response - type: string - tls: - description: TLS is the tls config, will override - PodHttpChaos if there are multiple HTTPChaos - experiments are applied - properties: - caName: - description: CAName represents the data - name of ca file in secret, `ca.crt` for - example - type: string - certName: - description: CertName represents the data - name of cert file in secret, `tls.crt` - for example - type: string - keyName: - description: KeyName represents the data - name of key file in secret, `tls.key` - for example - type: string - secretName: - description: SecretName represents the name - of required secret resource - type: string - secretNamespace: - description: SecretNamespace represents - the namespace of required secret resource - type: string - required: - - certName - - keyName - - secretName - - secretNamespace - type: object - value: - description: Value is required when the mode - is set to `FixedMode` / `FixedPercentMode` - / `RandomMaxPercentMode`. If `FixedMode`, - provide an integer of pods to do chaos action. - If `FixedPercentMode`, provide a number from - 0-100 to specify the percent of pods the server - can do chaos action. IF `RandomMaxPercentMode`, provide - a number from 0-100 to specify the max percent - of pods to do chaos action - type: string - required: - - mode - - selector - - target - type: object - ioChaos: - description: IOChaosSpec defines the desired state - of IOChaos - properties: - action: - description: 'Action defines the specific pod - chaos action. Supported action: latency / - fault / attrOverride / mistake' - enum: - - latency - - fault - - attrOverride - - mistake - type: string - attr: - description: Attr defines the overrided attribution - properties: - atime: - description: Timespec represents a time - properties: - nsec: - format: int64 - type: integer - sec: - format: int64 - type: integer - required: - - nsec - - sec - type: object - blocks: - format: int64 - type: integer - ctime: - description: Timespec represents a time - properties: - nsec: - format: int64 - type: integer - sec: - format: int64 - type: integer - required: - - nsec - - sec - type: object - gid: - format: int32 - type: integer - ino: - format: int64 - type: integer - kind: - description: FileType represents type of - file - type: string - mtime: - description: Timespec represents a time - properties: - nsec: - format: int64 - type: integer - sec: - format: int64 - type: integer - required: - - nsec - - sec - type: object - nlink: - format: int32 - type: integer - perm: - type: integer - rdev: - format: int32 - type: integer - size: - format: int64 - type: integer - uid: - format: int32 - type: integer - type: object - containerNames: - description: ContainerNames indicates list of - the name of affected container. If not set, - the first container will be injected - items: - type: string - type: array - delay: - description: Delay defines the value of I/O - chaos action delay. A delay string is a possibly - signed sequence of decimal numbers, each with - optional fraction and a unit suffix, such - as "300ms". Valid time units are "ns", "us" - (or "µs"), "ms", "s", "m", "h". - type: string - duration: - description: Duration represents the duration - of the chaos action. It is required when the - action is `PodFailureAction`. A duration string - is a possibly signed sequence of decimal numbers, - each with optional fraction and a unit suffix, - such as "300ms", "-1.5h" or "2h45m". Valid - time units are "ns", "us" (or "µs"), "ms", - "s", "m", "h". - type: string - errno: - description: 'Errno defines the error code that - returned by I/O action. refer to: https://www-numi.fnal.gov/offline_software/srt_public_context/WebDocs/Errors/unix_system_errors.html' - format: int32 - type: integer - methods: - description: 'Methods defines the I/O methods - for injecting I/O chaos action. default: all - I/O methods.' - items: - type: string - type: array - mistake: - description: Mistake defines what types of incorrectness - are injected to IO operations - properties: - filling: - description: Filling determines what is - filled in the mistake data. - enum: - - zero - - random - type: string - maxLength: - description: Max length of each wrong data - segment in bytes - format: int64 - minimum: 1 - type: integer - maxOccurrences: - description: There will be [1, MaxOccurrences] - segments of wrong data. - format: int64 - minimum: 1 - type: integer - type: object - mode: - description: 'Mode defines the mode to run chaos - action. Supported mode: one / all / fixed - / fixed-percent / random-max-percent' - enum: - - one - - all - - fixed - - fixed-percent - - random-max-percent - type: string - path: - description: Path defines the path of files - for injecting I/O chaos action. - type: string - percent: - default: 100 - description: 'Percent defines the percentage - of injection errors and provides a number - from 0-100. default: 100.' - type: integer - remoteCluster: - description: RemoteCluster represents the remote - cluster where the chaos will be deployed - type: string - selector: - description: Selector is used to select pods - that are used to inject chaos action. - properties: - annotationSelectors: - additionalProperties: - type: string - description: Map of string keys and values - that can be used to select objects. A - selector based on annotations. - type: object - expressionSelectors: - description: a slice of label selector expressions - that can be used to select objects. A - list of selectors based on set-based label - expressions. - items: - description: A label selector requirement - is a selector that contains values, - a key, and an operator that relates - the key and values. - properties: - key: - description: key is the label key - that the selector applies to. - type: string - operator: - description: operator represents a - key's relationship to a set of values. - Valid operators are In, NotIn, Exists - and DoesNotExist. - type: string - values: - description: values is an array of - string values. If the operator is - In or NotIn, the values array must - be non-empty. If the operator is - Exists or DoesNotExist, the values - array must be empty. This array - is replaced during a strategic merge - patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - fieldSelectors: - additionalProperties: - type: string - description: Map of string keys and values - that can be used to select objects. A - selector based on fields. - type: object - labelSelectors: - additionalProperties: - type: string - description: Map of string keys and values - that can be used to select objects. A - selector based on labels. - type: object - namespaces: - description: Namespaces is a set of namespace - to which objects belong. - items: - type: string - type: array - nodeSelectors: - additionalProperties: - type: string - description: Map of string keys and values - that can be used to select nodes. Selector - which must match a node's labels, and - objects must belong to these selected - nodes. - type: object - nodes: - description: Nodes is a set of node name - and objects must belong to these nodes. - items: - type: string - type: array - podPhaseSelectors: - description: 'PodPhaseSelectors is a set - of condition of a pod at the current time. - supported value: Pending / Running / Succeeded - / Failed / Unknown' - items: - type: string - type: array - pods: - additionalProperties: - items: - type: string - type: array - description: Pods is a map of string keys - and a set values that used to select pods. - The key defines the namespace which pods - belong, and the each values is a set of - pod names. - type: object - type: object - value: - description: Value is required when the mode - is set to `FixedMode` / `FixedPercentMode` - / `RandomMaxPercentMode`. If `FixedMode`, - provide an integer of pods to do chaos action. - If `FixedPercentMode`, provide a number from - 0-100 to specify the percent of pods the server - can do chaos action. IF `RandomMaxPercentMode`, provide - a number from 0-100 to specify the max percent - of pods to do chaos action - type: string - volumePath: - description: VolumePath represents the mount - path of injected volume - type: string - required: - - action - - mode - - selector - - volumePath - type: object - jvmChaos: - description: JVMChaosSpec defines the desired state - of JVMChaos - properties: - action: - description: 'Action defines the specific jvm - chaos action. Supported action: latency;return;exception;stress;gc;ruleData' - enum: - - latency - - return - - exception - - stress - - gc - - ruleData - - mysql - type: string - class: - description: Java class - type: string - containerNames: - description: ContainerNames indicates list of - the name of affected container. If not set, - the first container will be injected - items: - type: string - type: array - cpuCount: - description: the CPU core number needs to use, - only set it when action is stress - type: integer - database: - description: the match database default value - is "", means match all database - type: string - duration: - description: Duration represents the duration - of the chaos action - type: string - exception: - description: the exception which needs to throw - for action `exception` or the exception message - needs to throw in action `mysql` - type: string - latency: - description: the latency duration for action - 'latency', unit ms or the latency duration - in action `mysql` - type: integer - memType: - description: the memory type needs to locate, - only set it when action is stress, the value - can be 'stack' or 'heap' - type: string - method: - description: the method in Java class - type: string - mode: - description: 'Mode defines the mode to run chaos - action. Supported mode: one / all / fixed - / fixed-percent / random-max-percent' - enum: - - one - - all - - fixed - - fixed-percent - - random-max-percent - type: string - mysqlConnectorVersion: - description: the version of mysql-connector-java, - only support 5.X.X(set to "5") and 8.X.X(set - to "8") now - type: string - name: - description: byteman rule name, should be unique, - and will generate one if not set - type: string - pid: - description: the pid of Java process which needs - to attach - type: integer - port: - description: the port of agent server, default - 9277 - format: int32 - type: integer - remoteCluster: - description: RemoteCluster represents the remote - cluster where the chaos will be deployed - type: string - ruleData: - description: the byteman rule's data for action - 'ruleData' - type: string - selector: - description: Selector is used to select pods - that are used to inject chaos action. - properties: - annotationSelectors: - additionalProperties: - type: string - description: Map of string keys and values - that can be used to select objects. A - selector based on annotations. - type: object - expressionSelectors: - description: a slice of label selector expressions - that can be used to select objects. A - list of selectors based on set-based label - expressions. - items: - description: A label selector requirement - is a selector that contains values, - a key, and an operator that relates - the key and values. - properties: - key: - description: key is the label key - that the selector applies to. - type: string - operator: - description: operator represents a - key's relationship to a set of values. - Valid operators are In, NotIn, Exists - and DoesNotExist. - type: string - values: - description: values is an array of - string values. If the operator is - In or NotIn, the values array must - be non-empty. If the operator is - Exists or DoesNotExist, the values - array must be empty. This array - is replaced during a strategic merge - patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - fieldSelectors: - additionalProperties: - type: string - description: Map of string keys and values - that can be used to select objects. A - selector based on fields. - type: object - labelSelectors: - additionalProperties: - type: string - description: Map of string keys and values - that can be used to select objects. A - selector based on labels. - type: object - namespaces: - description: Namespaces is a set of namespace - to which objects belong. - items: - type: string - type: array - nodeSelectors: - additionalProperties: - type: string - description: Map of string keys and values - that can be used to select nodes. Selector - which must match a node's labels, and - objects must belong to these selected - nodes. - type: object - nodes: - description: Nodes is a set of node name - and objects must belong to these nodes. - items: - type: string - type: array - podPhaseSelectors: - description: 'PodPhaseSelectors is a set - of condition of a pod at the current time. - supported value: Pending / Running / Succeeded - / Failed / Unknown' - items: - type: string - type: array - pods: - additionalProperties: - items: - type: string - type: array - description: Pods is a map of string keys - and a set values that used to select pods. - The key defines the namespace which pods - belong, and the each values is a set of - pod names. - type: object - type: object - sqlType: - description: the match sql type default value - is "", means match all SQL type. The value - can be 'select', 'insert', 'update', 'delete', - 'replace'. - type: string - table: - description: the match table default value is - "", means match all table - type: string - value: - description: Value is required when the mode - is set to `FixedMode` / `FixedPercentMode` - / `RandomMaxPercentMode`. If `FixedMode`, - provide an integer of pods to do chaos action. - If `FixedPercentMode`, provide a number from - 0-100 to specify the percent of pods the server - can do chaos action. IF `RandomMaxPercentMode`, provide - a number from 0-100 to specify the max percent - of pods to do chaos action - type: string - required: - - action - - mode - - selector - type: object - kernelChaos: - description: KernelChaosSpec defines the desired - state of KernelChaos - properties: - containerNames: - description: ContainerNames indicates list of - the name of affected container. If not set, - the first container will be injected - items: - type: string - type: array - duration: - description: Duration represents the duration - of the chaos action - type: string - failKernRequest: - description: FailKernRequest defines the request - of kernel injection - properties: - callchain: - description: 'Callchain indicate a special - call chain, such as: ext4_mount -> mount_subtree - -> ... -> should_failslab With an optional - set of predicates and an optional set - of parameters, which used with predicates. - You can read call chan and predicate examples - from https://github.com/chaos-mesh/bpfki/tree/develop/examples - to learn more. If no special call chain, - just keep Callchain empty, which means - it will fail at any call chain with slab - alloc (eg: kmalloc).' - items: - description: Frame defines the function - signature and predicate in function's - body - properties: - funcname: - description: Funcname can be find - from kernel source or `/proc/kallsyms`, - such as `ext4_mount` - type: string - parameters: - description: Parameters is used with - predicate, for example, if you want - to inject slab error in `d_alloc_parallel(struct - dentry *parent, const struct qstr - *name)` with a special name `bananas`, - you need to set it to `struct dentry - *parent, const struct qstr *name` - otherwise omit it. - type: string - predicate: - description: Predicate will access - the arguments of this Frame, example - with Parameters's, you can set it - to `STRNCMP(name->name, "bananas", - 8)` to make inject only with it, - or omit it to inject for all d_alloc_parallel - call chain. - type: string - type: object - type: array - failtype: - description: 'FailType indicates what to - fail, can be set to ''0'' / ''1'' / ''2'' - If `0`, indicates slab to fail (should_failslab) - If `1`, indicates alloc_page to fail (should_fail_alloc_page) - If `2`, indicates bio to fail (should_fail_bio) - You can read: 1. https://www.kernel.org/doc/html/latest/fault-injection/fault-injection.html - 2. http://github.com/iovisor/bcc/blob/master/tools/inject_example.txt - to learn more' - format: int32 - maximum: 2 - minimum: 0 - type: integer - headers: - description: 'Headers indicates the appropriate - kernel headers you need. Eg: "linux/mmzone.h", - "linux/blkdev.h" and so on' - items: - type: string - type: array - probability: - description: Probability indicates the fails - with probability. If you want 1%, please - set this field with 1. - format: int32 - maximum: 100 - minimum: 0 - type: integer - times: - description: Times indicates the max times - of fails. - format: int32 - minimum: 0 - type: integer - required: - - failtype - type: object - mode: - description: 'Mode defines the mode to run chaos - action. Supported mode: one / all / fixed - / fixed-percent / random-max-percent' - enum: - - one - - all - - fixed - - fixed-percent - - random-max-percent - type: string - remoteCluster: - description: RemoteCluster represents the remote - cluster where the chaos will be deployed - type: string - selector: - description: Selector is used to select pods - that are used to inject chaos action. - properties: - annotationSelectors: - additionalProperties: - type: string - description: Map of string keys and values - that can be used to select objects. A - selector based on annotations. - type: object - expressionSelectors: - description: a slice of label selector expressions - that can be used to select objects. A - list of selectors based on set-based label - expressions. - items: - description: A label selector requirement - is a selector that contains values, - a key, and an operator that relates - the key and values. - properties: - key: - description: key is the label key - that the selector applies to. - type: string - operator: - description: operator represents a - key's relationship to a set of values. - Valid operators are In, NotIn, Exists - and DoesNotExist. - type: string - values: - description: values is an array of - string values. If the operator is - In or NotIn, the values array must - be non-empty. If the operator is - Exists or DoesNotExist, the values - array must be empty. This array - is replaced during a strategic merge - patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - fieldSelectors: - additionalProperties: - type: string - description: Map of string keys and values - that can be used to select objects. A - selector based on fields. - type: object - labelSelectors: - additionalProperties: - type: string - description: Map of string keys and values - that can be used to select objects. A - selector based on labels. - type: object - namespaces: - description: Namespaces is a set of namespace - to which objects belong. - items: - type: string - type: array - nodeSelectors: - additionalProperties: - type: string - description: Map of string keys and values - that can be used to select nodes. Selector - which must match a node's labels, and - objects must belong to these selected - nodes. - type: object - nodes: - description: Nodes is a set of node name - and objects must belong to these nodes. - items: - type: string - type: array - podPhaseSelectors: - description: 'PodPhaseSelectors is a set - of condition of a pod at the current time. - supported value: Pending / Running / Succeeded - / Failed / Unknown' - items: - type: string - type: array - pods: - additionalProperties: - items: - type: string - type: array - description: Pods is a map of string keys - and a set values that used to select pods. - The key defines the namespace which pods - belong, and the each values is a set of - pod names. - type: object - type: object - value: - description: Value is required when the mode - is set to `FixedMode` / `FixedPercentMode` - / `RandomMaxPercentMode`. If `FixedMode`, - provide an integer of pods to do chaos action. - If `FixedPercentMode`, provide a number from - 0-100 to specify the percent of pods the server - can do chaos action. IF `RandomMaxPercentMode`, provide - a number from 0-100 to specify the max percent - of pods to do chaos action - type: string - required: - - failKernRequest - - mode - - selector - type: object - networkChaos: - description: NetworkChaosSpec defines the desired - state of NetworkChaos - properties: - action: - description: 'Action defines the specific network - chaos action. Supported action: partition, - netem, delay, loss, duplicate, corrupt Default - action: delay' - enum: - - netem - - delay - - loss - - duplicate - - corrupt - - partition - - bandwidth - type: string - bandwidth: - description: Bandwidth represents the detail - about bandwidth control action - properties: - buffer: - description: Buffer is the maximum amount - of bytes that tokens can be available - for instantaneously. - format: int32 - minimum: 1 - type: integer - limit: - description: Limit is the number of bytes - that can be queued waiting for tokens - to become available. - format: int32 - minimum: 1 - type: integer - minburst: - description: Minburst specifies the size - of the peakrate bucket. For perfect accuracy, - should be set to the MTU of the interface. If - a peakrate is needed, but some burstiness - is acceptable, this size can be raised. - A 3000 byte minburst allows around 3mbit/s - of peakrate, given 1000 byte packets. - format: int32 - minimum: 0 - type: integer - peakrate: - description: Peakrate is the maximum depletion - rate of the bucket. The peakrate does - not need to be set, it is only necessary - if perfect millisecond timescale shaping - is required. - format: int64 - minimum: 0 - type: integer - rate: - description: Rate is the speed knob. Allows - bit, kbit, mbit, gbit, tbit, bps, kbps, - mbps, gbps, tbps unit. bps means bytes - per second. - type: string - required: - - buffer - - limit - - rate - type: object - corrupt: - description: Corrupt represents the detail about - corrupt action - properties: - correlation: - type: string - corrupt: - type: string - required: - - corrupt - type: object - delay: - description: Delay represents the detail about - delay action - properties: - correlation: - type: string - jitter: - type: string - latency: - type: string - reorder: - description: ReorderSpec defines details - of packet reorder. - properties: - correlation: - type: string - gap: - type: integer - reorder: - type: string - required: - - gap - - reorder - type: object - required: - - latency - type: object - device: - description: Device represents the network device - to be affected. - type: string - direction: - default: to - description: Direction represents the direction, - this applies on netem and network partition - action - enum: - - to - - from - - both - type: string - duplicate: - description: DuplicateSpec represents the detail - about loss action - properties: - correlation: - type: string - duplicate: - type: string - required: - - duplicate - type: object - duration: - description: Duration represents the duration - of the chaos action - type: string - externalTargets: - description: ExternalTargets represents network - targets outside k8s - items: - type: string - type: array - loss: - description: Loss represents the detail about - loss action - properties: - correlation: - type: string - loss: - type: string - required: - - loss - type: object - mode: - description: 'Mode defines the mode to run chaos - action. Supported mode: one / all / fixed - / fixed-percent / random-max-percent' - enum: - - one - - all - - fixed - - fixed-percent - - random-max-percent - type: string - rate: - description: Rate represents the detail about - rate control action - properties: - rate: - description: Rate is the speed knob. Allows - bit, kbit, mbit, gbit, tbit, bps, kbps, - mbps, gbps, tbps unit. bps means bytes - per second. - type: string - required: - - rate - type: object - remoteCluster: - description: RemoteCluster represents the remote - cluster where the chaos will be deployed - type: string - selector: - description: Selector is used to select pods - that are used to inject chaos action. - properties: - annotationSelectors: - additionalProperties: - type: string - description: Map of string keys and values - that can be used to select objects. A - selector based on annotations. - type: object - expressionSelectors: - description: a slice of label selector expressions - that can be used to select objects. A - list of selectors based on set-based label - expressions. - items: - description: A label selector requirement - is a selector that contains values, - a key, and an operator that relates - the key and values. - properties: - key: - description: key is the label key - that the selector applies to. - type: string - operator: - description: operator represents a - key's relationship to a set of values. - Valid operators are In, NotIn, Exists - and DoesNotExist. - type: string - values: - description: values is an array of - string values. If the operator is - In or NotIn, the values array must - be non-empty. If the operator is - Exists or DoesNotExist, the values - array must be empty. This array - is replaced during a strategic merge - patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - fieldSelectors: - additionalProperties: - type: string - description: Map of string keys and values - that can be used to select objects. A - selector based on fields. - type: object - labelSelectors: - additionalProperties: - type: string - description: Map of string keys and values - that can be used to select objects. A - selector based on labels. - type: object - namespaces: - description: Namespaces is a set of namespace - to which objects belong. - items: - type: string - type: array - nodeSelectors: - additionalProperties: - type: string - description: Map of string keys and values - that can be used to select nodes. Selector - which must match a node's labels, and - objects must belong to these selected - nodes. - type: object - nodes: - description: Nodes is a set of node name - and objects must belong to these nodes. - items: - type: string - type: array - podPhaseSelectors: - description: 'PodPhaseSelectors is a set - of condition of a pod at the current time. - supported value: Pending / Running / Succeeded - / Failed / Unknown' - items: - type: string - type: array - pods: - additionalProperties: - items: - type: string - type: array - description: Pods is a map of string keys - and a set values that used to select pods. - The key defines the namespace which pods - belong, and the each values is a set of - pod names. - type: object - type: object - target: - description: Target represents network target, - this applies on netem and network partition - action - properties: - mode: - description: 'Mode defines the mode to run - chaos action. Supported mode: one / all - / fixed / fixed-percent / random-max-percent' - enum: - - one - - all - - fixed - - fixed-percent - - random-max-percent - type: string - selector: - description: Selector is used to select - pods that are used to inject chaos action. - properties: - annotationSelectors: - additionalProperties: - type: string - description: Map of string keys and - values that can be used to select - objects. A selector based on annotations. - type: object - expressionSelectors: - description: a slice of label selector - expressions that can be used to select - objects. A list of selectors based - on set-based label expressions. - items: - description: A label selector requirement - is a selector that contains values, - a key, and an operator that relates - the key and values. - properties: - key: - description: key is the label - key that the selector applies - to. - type: string - operator: - description: operator represents - a key's relationship to a set - of values. Valid operators are - In, NotIn, Exists and DoesNotExist. - type: string - values: - description: values is an array - of string values. If the operator - is In or NotIn, the values array - must be non-empty. If the operator - is Exists or DoesNotExist, the - values array must be empty. - This array is replaced during - a strategic merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - fieldSelectors: - additionalProperties: - type: string - description: Map of string keys and - values that can be used to select - objects. A selector based on fields. - type: object - labelSelectors: - additionalProperties: - type: string - description: Map of string keys and - values that can be used to select - objects. A selector based on labels. - type: object - namespaces: - description: Namespaces is a set of - namespace to which objects belong. - items: - type: string - type: array - nodeSelectors: - additionalProperties: - type: string - description: Map of string keys and - values that can be used to select - nodes. Selector which must match a - node's labels, and objects must belong - to these selected nodes. - type: object - nodes: - description: Nodes is a set of node - name and objects must belong to these - nodes. - items: - type: string - type: array - podPhaseSelectors: - description: 'PodPhaseSelectors is a - set of condition of a pod at the current - time. supported value: Pending / Running - / Succeeded / Failed / Unknown' - items: - type: string - type: array - pods: - additionalProperties: - items: - type: string - type: array - description: Pods is a map of string - keys and a set values that used to - select pods. The key defines the namespace - which pods belong, and the each values - is a set of pod names. - type: object - type: object - value: - description: Value is required when the - mode is set to `FixedMode` / `FixedPercentMode` - / `RandomMaxPercentMode`. If `FixedMode`, - provide an integer of pods to do chaos - action. If `FixedPercentMode`, provide - a number from 0-100 to specify the percent - of pods the server can do chaos action. - IF `RandomMaxPercentMode`, provide a - number from 0-100 to specify the max percent - of pods to do chaos action - type: string - required: - - mode - - selector - type: object - targetDevice: - description: TargetDevice represents the network - device to be affected in target scope. - type: string - value: - description: Value is required when the mode - is set to `FixedMode` / `FixedPercentMode` - / `RandomMaxPercentMode`. If `FixedMode`, - provide an integer of pods to do chaos action. - If `FixedPercentMode`, provide a number from - 0-100 to specify the percent of pods the server - can do chaos action. IF `RandomMaxPercentMode`, provide - a number from 0-100 to specify the max percent - of pods to do chaos action - type: string - required: - - action - - mode - - selector - type: object - physicalmachineChaos: - description: PhysicalMachineChaosSpec defines the - desired state of PhysicalMachineChaos - properties: - action: - description: the subAction, generate automatically - enum: - - stress-cpu - - stress-mem - - disk-read-payload - - disk-write-payload - - disk-fill - - network-corrupt - - network-duplicate - - network-loss - - network-delay - - network-partition - - network-dns - - network-bandwidth - - network-flood - - network-down - - process - - jvm-exception - - jvm-gc - - jvm-latency - - jvm-return - - jvm-stress - - jvm-rule-data - - jvm-mysql - - clock - - redis-expiration - - redis-penetration - - redis-cacheLimit - - redis-restart - - redis-stop - - kafka-fill - - kafka-flood - - kafka-io - - file-create - - file-modify - - file-delete - - file-rename - - file-append - - file-replace - - vm - - user_defined - type: string - address: - description: 'DEPRECATED: Use Selector instead. - Only one of Address and Selector could be - specified.' - items: - type: string - type: array - clock: - properties: - clock-ids-slice: - description: the identifier of the particular - clock on which to act. More clock description - in linux kernel can be found in man page - of clock_getres, clock_gettime, clock_settime. - Muti clock ids should be split with "," - type: string - pid: - description: the pid of target program. - type: integer - time-offset: - description: specifies the length of time - offset. - type: string - type: object - disk-fill: - properties: - fill-by-fallocate: - description: fill disk by fallocate - type: boolean - path: - description: specifies the location to fill - data in. if path not provided, payload - will read/write from/into a temp file, - temp file will be deleted after writing - type: string - size: - description: 'specifies how many units of - data will write into the file path. support - unit: c=1, w=2, b=512, kB=1000, K=1024, - MB=1000*1000, M=1024*1024, GB=1000*1000*1000, - G=1024*1024*1024 BYTES. example : 1M | - 512kB' - type: string - type: object - disk-read-payload: - properties: - path: - description: specifies the location to fill - data in. if path not provided, payload - will read/write from/into a temp file, - temp file will be deleted after writing - type: string - payload-process-num: - description: specifies the number of process - work on writing, default 1, only 1-255 - is valid value - type: integer - size: - description: 'specifies how many units of - data will write into the file path. support - unit: c=1, w=2, b=512, kB=1000, K=1024, - MB=1000*1000, M=1024*1024, GB=1000*1000*1000, - G=1024*1024*1024 BYTES. example : 1M | - 512kB' - type: string - type: object - disk-write-payload: - properties: - path: - description: specifies the location to fill - data in. if path not provided, payload - will read/write from/into a temp file, - temp file will be deleted after writing - type: string - payload-process-num: - description: specifies the number of process - work on writing, default 1, only 1-255 - is valid value - type: integer - size: - description: 'specifies how many units of - data will write into the file path. support - unit: c=1, w=2, b=512, kB=1000, K=1024, - MB=1000*1000, M=1024*1024, GB=1000*1000*1000, - G=1024*1024*1024 BYTES. example : 1M | - 512kB' - type: string - type: object - duration: - description: Duration represents the duration - of the chaos action - type: string - file-append: - properties: - count: - description: Count is the number of times - to append the data. - type: integer - data: - description: Data is the data for append. - type: string - file-name: - description: FileName is the name of the - file to be created, modified, deleted, - renamed, or appended. - type: string - type: object - file-create: - properties: - dir-name: - description: DirName is the directory name - to create or delete. - type: string - file-name: - description: FileName is the name of the - file to be created, modified, deleted, - renamed, or appended. - type: string - type: object - file-delete: - properties: - dir-name: - description: DirName is the directory name - to create or delete. - type: string - file-name: - description: FileName is the name of the - file to be created, modified, deleted, - renamed, or appended. - type: string - type: object - file-modify: - properties: - file-name: - description: FileName is the name of the - file to be created, modified, deleted, - renamed, or appended. - type: string - privilege: - description: Privilege is the file privilege - to be set. - format: int32 - type: integer - type: object - file-rename: - properties: - dest-file: - description: DestFile is the name to be - renamed. - type: string - source-file: - description: SourceFile is the name need - to be renamed. - type: string - type: object - file-replace: - properties: - dest-string: - description: DestStr is the destination - string of the file. - type: string - file-name: - description: FileName is the name of the - file to be created, modified, deleted, - renamed, or appended. - type: string - line: - description: Line is the line number of - the file to be replaced. - type: integer - origin-string: - description: OriginStr is the origin string - of the file. - type: string - type: object - http-abort: - properties: - code: - description: Code is a rule to select target - by http status code in response - type: string - method: - description: HTTP method - type: string - path: - description: Match path of Uri with wildcard - matches - type: string - port: - description: The TCP port that the target - service listens on - format: int32 - type: integer - proxy_ports: - description: Composed with one of the port - of HTTP connection, we will only attack - HTTP connection with port inside proxy_ports - items: - type: integer - type: array - target: - description: 'HTTP target: Request or Response' - type: string - required: - - proxy_ports - - target - type: object - http-config: - properties: - file_path: - description: The config file path - type: string - type: object - http-delay: - properties: - code: - description: Code is a rule to select target - by http status code in response - type: string - delay: - description: Delay represents the delay - of the target request/response - type: string - method: - description: HTTP method - type: string - path: - description: Match path of Uri with wildcard - matches - type: string - port: - description: The TCP port that the target - service listens on - format: int32 - type: integer - proxy_ports: - description: Composed with one of the port - of HTTP connection, we will only attack - HTTP connection with port inside proxy_ports - items: - type: integer - type: array - target: - description: 'HTTP target: Request or Response' - type: string - required: - - delay - - proxy_ports - - target - type: object - http-request: - description: used for HTTP request, now only - support GET - properties: - count: - description: The number of requests to send - type: integer - enable-conn-pool: - description: Enable connection pool - type: boolean - url: - description: Request to send" - type: string - type: object - jvm-exception: - properties: - class: - description: Java class - type: string - exception: - description: the exception which needs to - throw for action `exception` - type: string - method: - description: the method in Java class - type: string - pid: - description: the pid of Java process which - needs to attach - type: integer - port: - description: the port of agent server, default - 9277 - format: int32 - type: integer - type: object - jvm-gc: - properties: - pid: - description: the pid of Java process which - needs to attach - type: integer - port: - description: the port of agent server, default - 9277 - format: int32 - type: integer - type: object - jvm-latency: - properties: - class: - description: Java class - type: string - latency: - description: the latency duration for action - 'latency', unit ms - type: integer - method: - description: the method in Java class - type: string - pid: - description: the pid of Java process which - needs to attach - type: integer - port: - description: the port of agent server, default - 9277 - format: int32 - type: integer - type: object - jvm-mysql: - properties: - database: - description: the match database default - value is "", means match all database - type: string - exception: - description: The exception which needs to - throw for action `exception` or the exception - message needs to throw in action `mysql` - type: string - latency: - description: The latency duration for action - 'latency' or the latency duration in action - `mysql` - type: integer - mysqlConnectorVersion: - description: the version of mysql-connector-java, - only support 5.X.X(set to "5") and 8.X.X(set - to "8") now - type: string - pid: - description: the pid of Java process which - needs to attach - type: integer - port: - description: the port of agent server, default - 9277 - format: int32 - type: integer - sqlType: - description: the match sql type default - value is "", means match all SQL type. - The value can be 'select', 'insert', 'update', - 'delete', 'replace'. - type: string - table: - description: the match table default value - is "", means match all table - type: string - type: object - jvm-return: - properties: - class: - description: Java class - type: string - method: - description: the method in Java class - type: string - pid: - description: the pid of Java process which - needs to attach - type: integer - port: - description: the port of agent server, default - 9277 - format: int32 - type: integer - value: - description: the return value for action - 'return' - type: string - type: object - jvm-rule-data: - properties: - pid: - description: the pid of Java process which - needs to attach - type: integer - port: - description: the port of agent server, default - 9277 - format: int32 - type: integer - rule-data: - description: RuleData used to save the rule - file's data, will use it when recover - type: string - type: object - jvm-stress: - properties: - cpu-count: - description: the CPU core number need to - use, only set it when action is stress - type: integer - mem-type: - description: the memory type need to locate, - only set it when action is stress, the - value can be 'stack' or 'heap' - type: string - pid: - description: the pid of Java process which - needs to attach - type: integer - port: - description: the port of agent server, default - 9277 - format: int32 - type: integer - type: object - kafka-fill: - properties: - host: - description: The host of kafka server - type: string - maxBytes: - description: The max bytes to fill - format: int64 - type: integer - messageSize: - description: The size of each message - type: integer - password: - description: The password of kafka client - type: string - port: - description: The port of kafka server - type: integer - reloadCommand: - description: The command to reload kafka - config - type: string - topic: - description: The topic to attack - type: string - username: - description: The username of kafka client - type: string - type: object - kafka-flood: - properties: - host: - description: The host of kafka server - type: string - messageSize: - description: The size of each message - type: integer - password: - description: The password of kafka client - type: string - port: - description: The port of kafka server - type: integer - threads: - description: The number of worker threads - type: integer - topic: - description: The topic to attack - type: string - username: - description: The username of kafka client - type: string - type: object - kafka-io: - properties: - configFile: - description: The path of server config - type: string - nonReadable: - description: Make kafka cluster non-readable - type: boolean - nonWritable: - description: Make kafka cluster non-writable - type: boolean - topic: - description: The topic to attack - type: string - type: object - mode: - description: 'Mode defines the mode to run chaos - action. Supported mode: one / all / fixed - / fixed-percent / random-max-percent' - enum: - - one - - all - - fixed - - fixed-percent - - random-max-percent - type: string - network-bandwidth: - properties: - buffer: - format: int32 - minimum: 1 - type: integer - device: - type: string - hostname: - type: string - ip-address: - type: string - limit: - format: int32 - minimum: 1 - type: integer - minburst: - format: int32 - type: integer - peakrate: - format: int64 - type: integer - rate: - type: string - required: - - buffer - - limit - - rate - type: object - network-corrupt: - properties: - correlation: - description: correlation is percentage (10 - is 10%) - type: string - device: - description: the network interface to impact - type: string - egress-port: - description: only impact egress traffic - to these destination ports, use a ',' - to separate or to indicate the range, - such as 80, 8001:8010. it can only be - used in conjunction with -p tcp or -p - udp - type: string - hostname: - description: only impact traffic to these - hostnames - type: string - ip-address: - description: only impact egress traffic - to these IP addresses - type: string - ip-protocol: - description: 'only impact traffic using - this IP protocol, supported: tcp, udp, - icmp, all' - type: string - percent: - description: percentage of packets to corrupt - (10 is 10%) - type: string - source-port: - description: only impact egress traffic - from these source ports, use a ',' to - separate or to indicate the range, such - as 80, 8001:8010. it can only be used - in conjunction with -p tcp or -p udp - type: string - type: object - network-delay: - properties: - accept-tcp-flags: - description: only the packet which match - the tcp flag can be accepted, others will - be dropped. only set when the IPProtocol - is tcp, used for partition. - type: string - correlation: - description: correlation is percentage (10 - is 10%) - type: string - device: - description: the network interface to impact - type: string - egress-port: - description: only impact egress traffic - to these destination ports, use a ',' - to separate or to indicate the range, - such as 80, 8001:8010. it can only be - used in conjunction with -p tcp or -p - udp - type: string - hostname: - description: only impact traffic to these - hostnames - type: string - ip-address: - description: only impact egress traffic - to these IP addresses - type: string - ip-protocol: - description: 'only impact traffic using - this IP protocol, supported: tcp, udp, - icmp, all' - type: string - jitter: - description: 'jitter time, time units: ns, - us (or µs), ms, s, m, h.' - type: string - latency: - description: 'delay egress time, time units: - ns, us (or µs), ms, s, m, h.' - type: string - source-port: - description: only impact egress traffic - from these source ports, use a ',' to - separate or to indicate the range, such - as 80, 8001:8010. it can only be used - in conjunction with -p tcp or -p udp - type: string - type: object - network-dns: - properties: - dns-domain-name: - description: map this host to specified - IP - type: string - dns-ip: - description: map specified host to this - IP address - type: string - dns-server: - description: update the DNS server in /etc/resolv.conf - with this value - type: string - type: object - network-down: - properties: - device: - description: The network interface to impact - type: string - duration: - description: 'NIC down time, time units: - ns, us (or µs), ms, s, m, h.' - type: string - type: object - network-duplicate: - properties: - correlation: - description: correlation is percentage (10 - is 10%) - type: string - device: - description: the network interface to impact - type: string - egress-port: - description: only impact egress traffic - to these destination ports, use a ',' - to separate or to indicate the range, - such as 80, 8001:8010. it can only be - used in conjunction with -p tcp or -p - udp - type: string - hostname: - description: only impact traffic to these - hostnames - type: string - ip-address: - description: only impact egress traffic - to these IP addresses - type: string - ip-protocol: - description: 'only impact traffic using - this IP protocol, supported: tcp, udp, - icmp, all' - type: string - percent: - description: percentage of packets to duplicate - (10 is 10%) - type: string - source-port: - description: only impact egress traffic - from these source ports, use a ',' to - separate or to indicate the range, such - as 80, 8001:8010. it can only be used - in conjunction with -p tcp or -p udp - type: string - type: object - network-flood: - properties: - duration: - description: The number of seconds to run - the iperf test - type: string - ip-address: - description: Generate traffic to this IP - address - type: string - parallel: - description: The number of iperf parallel - client threads to run - format: int32 - type: integer - port: - description: Generate traffic to this port - on the IP address - type: string - rate: - description: The speed of network traffic, - allows bps, kbps, mbps, gbps, tbps unit. - bps means bytes per second - type: string - required: - - duration - - rate - type: object - network-loss: - properties: - correlation: - description: correlation is percentage (10 - is 10%) - type: string - device: - description: the network interface to impact - type: string - egress-port: - description: only impact egress traffic - to these destination ports, use a ',' - to separate or to indicate the range, - such as 80, 8001:8010. it can only be - used in conjunction with -p tcp or -p - udp - type: string - hostname: - description: only impact traffic to these - hostnames - type: string - ip-address: - description: only impact egress traffic - to these IP addresses - type: string - ip-protocol: - description: 'only impact traffic using - this IP protocol, supported: tcp, udp, - icmp, all' - type: string - percent: - description: percentage of packets to loss - (10 is 10%) - type: string - source-port: - description: only impact egress traffic - from these source ports, use a ',' to - separate or to indicate the range, such - as 80, 8001:8010. it can only be used - in conjunction with -p tcp or -p udp - type: string - type: object - network-partition: - properties: - accept-tcp-flags: - description: only the packet which match - the tcp flag can be accepted, others will - be dropped. only set when the IPProtocol - is tcp, used for partition. - type: string - device: - description: the network interface to impact - type: string - direction: - description: specifies the partition direction, - values can be 'from', 'to'. 'from' means - packets coming from the 'IPAddress' or - 'Hostname' and going to your server, 'to' - means packets originating from your server - and going to the 'IPAddress' or 'Hostname'. - type: string - hostname: - description: only impact traffic to these - hostnames - type: string - ip-address: - description: only impact egress traffic - to these IP addresses - type: string - ip-protocol: - description: only impact egress traffic - to these IP addresses - type: string - type: object - process: - properties: - process: - description: the process name or the process - ID - type: string - recoverCmd: - description: the command to be run when - recovering experiment - type: string - signal: - description: the signal number to send - type: integer - type: object - redis-cacheLimit: - properties: - addr: - description: The adress of Redis server - type: string - cacheSize: - description: The size of `maxmemory` - type: string - password: - description: The password of Redis server - type: string - percent: - description: Specifies maxmemory as a percentage - of the original value - type: string - type: object - redis-expiration: - properties: - addr: - description: The adress of Redis server - type: string - expiration: - description: The expiration of the keys - type: string - key: - description: The keys to be expired - type: string - option: - description: Additional options for `expiration` - type: string - password: - description: The password of Redis server - type: string - type: object - redis-penetration: - properties: - addr: - description: The adress of Redis server - type: string - password: - description: The password of Redis server - type: string - requestNum: - description: The number of requests to be - sent - type: integer - type: object - redis-restart: - properties: - addr: - description: The adress of Redis server - type: string - conf: - description: The path of Sentinel conf - type: string - flushConfig: - description: The control flag determines - whether to flush config - type: boolean - password: - description: The password of Redis server - type: string - redisPath: - description: The path of `redis-server` - command-line tool - type: boolean - type: object - redis-stop: - properties: - addr: - description: The adress of Redis server - type: string - conf: - description: The path of Sentinel conf - type: string - flushConfig: - description: The control flag determines - whether to flush config - type: boolean - password: - description: The password of Redis server - type: string - redisPath: - description: The path of `redis-server` - command-line tool - type: boolean - type: object - remoteCluster: - description: RemoteCluster represents the remote - cluster where the chaos will be deployed - type: string - selector: - description: Selector is used to select physical - machines that are used to inject chaos action. - properties: - annotationSelectors: - additionalProperties: - type: string - description: Map of string keys and values - that can be used to select objects. A - selector based on annotations. - type: object - expressionSelectors: - description: a slice of label selector expressions - that can be used to select objects. A - list of selectors based on set-based label - expressions. - items: - description: A label selector requirement - is a selector that contains values, - a key, and an operator that relates - the key and values. - properties: - key: - description: key is the label key - that the selector applies to. - type: string - operator: - description: operator represents a - key's relationship to a set of values. - Valid operators are In, NotIn, Exists - and DoesNotExist. - type: string - values: - description: values is an array of - string values. If the operator is - In or NotIn, the values array must - be non-empty. If the operator is - Exists or DoesNotExist, the values - array must be empty. This array - is replaced during a strategic merge - patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - fieldSelectors: - additionalProperties: - type: string - description: Map of string keys and values - that can be used to select objects. A - selector based on fields. - type: object - labelSelectors: - additionalProperties: - type: string - description: Map of string keys and values - that can be used to select objects. A - selector based on labels. - type: object - namespaces: - description: Namespaces is a set of namespace - to which objects belong. - items: - type: string - type: array - physicalMachines: - additionalProperties: - items: - type: string - type: array - description: PhysicalMachines is a map of - string keys and a set values that used - to select physical machines. The key defines - the namespace which physical machine belong, - and each value is a set of physical machine - names. - type: object - type: object - stress-cpu: - properties: - load: - description: specifies P percent loading - per CPU worker. 0 is effectively a sleep - (no load) and 100 is full loading. - type: integer - options: - description: extend stress-ng options - items: - type: string - type: array - workers: - description: specifies N workers to apply - the stressor. - type: integer - type: object - stress-mem: - properties: - options: - description: extend stress-ng options - items: - type: string - type: array - size: - description: 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 - type: object - uid: - description: the experiment ID - type: string - user_defined: - properties: - attackCmd: - description: The command to be executed - when attack - type: string - recoverCmd: - description: The command to be executed - when recover - type: string - type: object - value: - description: Value is required when the mode - is set to `FixedMode` / `FixedPercentMode` - / `RandomMaxPercentMode`. If `FixedMode`, - provide an integer of physical machines to - do chaos action. If `FixedPercentMode`, provide - a number from 0-100 to specify the percent - of physical machines the server can do chaos - action. IF `RandomMaxPercentMode`, provide - a number from 0-100 to specify the max percent - of pods to do chaos action - type: string - vm: - properties: - vm-name: - description: The name of the VM to be injected - type: string - type: object - required: - - action - - mode - type: object - podChaos: - description: PodChaosSpec defines the attributes - that a user creates on a chaos experiment about - pods. - properties: - action: - description: 'Action defines the specific pod - chaos action. Supported action: pod-kill / - pod-failure / container-kill Default action: - pod-kill' - enum: - - pod-kill - - pod-failure - - container-kill - type: string - containerNames: - description: ContainerNames indicates list of - the name of affected container. If not set, - the first container will be injected - items: - type: string - type: array - duration: - description: Duration represents the duration - of the chaos action. It is required when the - action is `PodFailureAction`. A duration string - is a possibly signed sequence of decimal numbers, - each with optional fraction and a unit suffix, - such as "300ms", "-1.5h" or "2h45m". Valid - time units are "ns", "us" (or "µs"), "ms", - "s", "m", "h". - type: string - gracePeriod: - description: GracePeriod is used in pod-kill - action. It represents the duration in seconds - before the pod should be deleted. Value must - be non-negative integer. The default value - is zero that indicates delete immediately. - format: int64 - minimum: 0 - type: integer - mode: - description: 'Mode defines the mode to run chaos - action. Supported mode: one / all / fixed - / fixed-percent / random-max-percent' - enum: - - one - - all - - fixed - - fixed-percent - - random-max-percent - type: string - remoteCluster: - description: RemoteCluster represents the remote - cluster where the chaos will be deployed - type: string - selector: - description: Selector is used to select pods - that are used to inject chaos action. - properties: - annotationSelectors: - additionalProperties: - type: string - description: Map of string keys and values - that can be used to select objects. A - selector based on annotations. - type: object - expressionSelectors: - description: a slice of label selector expressions - that can be used to select objects. A - list of selectors based on set-based label - expressions. - items: - description: A label selector requirement - is a selector that contains values, - a key, and an operator that relates - the key and values. - properties: - key: - description: key is the label key - that the selector applies to. - type: string - operator: - description: operator represents a - key's relationship to a set of values. - Valid operators are In, NotIn, Exists - and DoesNotExist. - type: string - values: - description: values is an array of - string values. If the operator is - In or NotIn, the values array must - be non-empty. If the operator is - Exists or DoesNotExist, the values - array must be empty. This array - is replaced during a strategic merge - patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - fieldSelectors: - additionalProperties: - type: string - description: Map of string keys and values - that can be used to select objects. A - selector based on fields. - type: object - labelSelectors: - additionalProperties: - type: string - description: Map of string keys and values - that can be used to select objects. A - selector based on labels. - type: object - namespaces: - description: Namespaces is a set of namespace - to which objects belong. - items: - type: string - type: array - nodeSelectors: - additionalProperties: - type: string - description: Map of string keys and values - that can be used to select nodes. Selector - which must match a node's labels, and - objects must belong to these selected - nodes. - type: object - nodes: - description: Nodes is a set of node name - and objects must belong to these nodes. - items: - type: string - type: array - podPhaseSelectors: - description: 'PodPhaseSelectors is a set - of condition of a pod at the current time. - supported value: Pending / Running / Succeeded - / Failed / Unknown' - items: - type: string - type: array - pods: - additionalProperties: - items: - type: string - type: array - description: Pods is a map of string keys - and a set values that used to select pods. - The key defines the namespace which pods - belong, and the each values is a set of - pod names. - type: object - type: object - value: - description: Value is required when the mode - is set to `FixedMode` / `FixedPercentMode` - / `RandomMaxPercentMode`. If `FixedMode`, - provide an integer of pods to do chaos action. - If `FixedPercentMode`, provide a number from - 0-100 to specify the percent of pods the server - can do chaos action. IF `RandomMaxPercentMode`, provide - a number from 0-100 to specify the max percent - of pods to do chaos action - type: string - required: - - action - - mode - - selector - type: object - schedule: - type: string - startingDeadlineSeconds: - format: int64 - minimum: 0 - nullable: true - type: integer - stressChaos: - description: StressChaosSpec defines the desired - state of StressChaos - properties: - containerNames: - description: ContainerNames indicates list of - the name of affected container. If not set, - the first container will be injected - items: - type: string - type: array - duration: - description: Duration represents the duration - of the chaos action - type: string - mode: - description: 'Mode defines the mode to run chaos - action. Supported mode: one / all / fixed - / fixed-percent / random-max-percent' - enum: - - one - - all - - fixed - - fixed-percent - - random-max-percent - type: string - remoteCluster: - description: RemoteCluster represents the remote - cluster where the chaos will be deployed - type: string - selector: - description: Selector is used to select pods - that are used to inject chaos action. - properties: - annotationSelectors: - additionalProperties: - type: string - description: Map of string keys and values - that can be used to select objects. A - selector based on annotations. - type: object - expressionSelectors: - description: a slice of label selector expressions - that can be used to select objects. A - list of selectors based on set-based label - expressions. - items: - description: A label selector requirement - is a selector that contains values, - a key, and an operator that relates - the key and values. - properties: - key: - description: key is the label key - that the selector applies to. - type: string - operator: - description: operator represents a - key's relationship to a set of values. - Valid operators are In, NotIn, Exists - and DoesNotExist. - type: string - values: - description: values is an array of - string values. If the operator is - In or NotIn, the values array must - be non-empty. If the operator is - Exists or DoesNotExist, the values - array must be empty. This array - is replaced during a strategic merge - patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - fieldSelectors: - additionalProperties: - type: string - description: Map of string keys and values - that can be used to select objects. A - selector based on fields. - type: object - labelSelectors: - additionalProperties: - type: string - description: Map of string keys and values - that can be used to select objects. A - selector based on labels. - type: object - namespaces: - description: Namespaces is a set of namespace - to which objects belong. - items: - type: string - type: array - nodeSelectors: - additionalProperties: - type: string - description: Map of string keys and values - that can be used to select nodes. Selector - which must match a node's labels, and - objects must belong to these selected - nodes. - type: object - nodes: - description: Nodes is a set of node name - and objects must belong to these nodes. - items: - type: string - type: array - podPhaseSelectors: - description: 'PodPhaseSelectors is a set - of condition of a pod at the current time. - supported value: Pending / Running / Succeeded - / Failed / Unknown' - items: - type: string - type: array - pods: - additionalProperties: - items: - type: string - type: array - description: Pods is a map of string keys - and a set values that used to select pods. - The key defines the namespace which pods - belong, and the each values is a set of - pod names. - type: object - type: object - stressngStressors: - description: StressngStressors defines plenty - of stressors just like `Stressors` except - that it's an experimental feature and more - powerful. You can define stressors in `stress-ng` - (see also `man stress-ng`) dialect, however - not all of the supported stressors are well - tested. It maybe retired in later releases. - You should always use `Stressors` to define - the stressors and use this only when you want - more stressors unsupported by `Stressors`. - When both `StressngStressors` and `Stressors` - are defined, `StressngStressors` wins. - type: string - stressors: - description: Stressors defines plenty of stressors - supported to stress system components out. - You can use one or more of them to make up - various kinds of stresses. At least one of - the stressors should be specified. - properties: - cpu: - description: CPUStressor stresses CPU out - properties: - load: - description: Load specifies P percent - loading per CPU worker. 0 is effectively - a sleep (no load) and 100 is full - loading. - maximum: 100 - minimum: 0 - type: integer - options: - description: extend stress-ng options - items: - type: string - type: array - workers: - description: Workers specifies N workers - to apply the stressor. Maximum 8192 - workers can run by stress-ng - maximum: 8192 - type: integer - required: - - workers - type: object - memory: - description: MemoryStressor stresses virtual - memory out - properties: - oomScoreAdj: - default: 0 - description: OOMScoreAdj sets the oom_score_adj - of the stress process. See `man 5 - proc` to know more about this option. - maximum: 1000 - minimum: -1000 - type: integer - options: - description: extend stress-ng options - items: - type: string - type: array - size: - description: Size 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 - workers: - description: Workers specifies N workers - to apply the stressor. Maximum 8192 - workers can run by stress-ng - maximum: 8192 - type: integer - required: - - workers - type: object - type: object - value: - description: Value is required when the mode - is set to `FixedMode` / `FixedPercentMode` - / `RandomMaxPercentMode`. If `FixedMode`, - provide an integer of pods to do chaos action. - If `FixedPercentMode`, provide a number from - 0-100 to specify the percent of pods the server - can do chaos action. IF `RandomMaxPercentMode`, provide - a number from 0-100 to specify the max percent - of pods to do chaos action - type: string - required: - - mode - - selector - type: object - timeChaos: - description: TimeChaosSpec defines the desired state - of TimeChaos - properties: - clockIds: - description: ClockIds defines all affected clock - id All available options are ["CLOCK_REALTIME","CLOCK_MONOTONIC","CLOCK_PROCESS_CPUTIME_ID","CLOCK_THREAD_CPUTIME_ID", - "CLOCK_MONOTONIC_RAW","CLOCK_REALTIME_COARSE","CLOCK_MONOTONIC_COARSE","CLOCK_BOOTTIME","CLOCK_REALTIME_ALARM", - "CLOCK_BOOTTIME_ALARM"] Default value is ["CLOCK_REALTIME"] - items: - type: string - type: array - containerNames: - description: ContainerNames indicates list of - the name of affected container. If not set, - the first container will be injected - items: - type: string - type: array - duration: - description: Duration represents the duration - of the chaos action - type: string - mode: - description: 'Mode defines the mode to run chaos - action. Supported mode: one / all / fixed - / fixed-percent / random-max-percent' - enum: - - one - - all - - fixed - - fixed-percent - - random-max-percent - type: string - remoteCluster: - description: RemoteCluster represents the remote - cluster where the chaos will be deployed - type: string - selector: - description: Selector is used to select pods - that are used to inject chaos action. - properties: - annotationSelectors: - additionalProperties: - type: string - description: Map of string keys and values - that can be used to select objects. A - selector based on annotations. - type: object - expressionSelectors: - description: a slice of label selector expressions - that can be used to select objects. A - list of selectors based on set-based label - expressions. - items: - description: A label selector requirement - is a selector that contains values, - a key, and an operator that relates - the key and values. - properties: - key: - description: key is the label key - that the selector applies to. - type: string - operator: - description: operator represents a - key's relationship to a set of values. - Valid operators are In, NotIn, Exists - and DoesNotExist. - type: string - values: - description: values is an array of - string values. If the operator is - In or NotIn, the values array must - be non-empty. If the operator is - Exists or DoesNotExist, the values - array must be empty. This array - is replaced during a strategic merge - patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - fieldSelectors: - additionalProperties: - type: string - description: Map of string keys and values - that can be used to select objects. A - selector based on fields. - type: object - labelSelectors: - additionalProperties: - type: string - description: Map of string keys and values - that can be used to select objects. A - selector based on labels. - type: object - namespaces: - description: Namespaces is a set of namespace - to which objects belong. - items: - type: string - type: array - nodeSelectors: - additionalProperties: - type: string - description: Map of string keys and values - that can be used to select nodes. Selector - which must match a node's labels, and - objects must belong to these selected - nodes. - type: object - nodes: - description: Nodes is a set of node name - and objects must belong to these nodes. - items: - type: string - type: array - podPhaseSelectors: - description: 'PodPhaseSelectors is a set - of condition of a pod at the current time. - supported value: Pending / Running / Succeeded - / Failed / Unknown' - items: - type: string - type: array - pods: - additionalProperties: - items: - type: string - type: array - description: Pods is a map of string keys - and a set values that used to select pods. - The key defines the namespace which pods - belong, and the each values is a set of - pod names. - type: object - type: object - timeOffset: - description: TimeOffset defines the delta time - of injected program. It's a possibly signed - sequence of decimal numbers, such as "300ms", - "-1.5h" or "2h45m". Valid time units are "ns", - "us" (or "µs"), "ms", "s", "m", "h". - type: string - value: - description: Value is required when the mode - is set to `FixedMode` / `FixedPercentMode` - / `RandomMaxPercentMode`. If `FixedMode`, - provide an integer of pods to do chaos action. - If `FixedPercentMode`, provide a number from - 0-100 to specify the percent of pods the server - can do chaos action. IF `RandomMaxPercentMode`, provide - a number from 0-100 to specify the max percent - of pods to do chaos action - type: string - required: - - mode - - selector - - timeOffset - type: object - type: - type: string - required: - - schedule - - type - type: object - statusCheck: - description: StatusCheck describe the behavior of StatusCheck. - Only used when Type is TypeStatusCheck. - properties: - duration: - description: Duration defines the duration of the - whole status check if the number of failed execution - does not exceed the failure threshold. Duration - is available to both `Synchronous` and `Continuous` - mode. A duration string is a possibly signed sequence - of decimal numbers, each with optional fraction - and a unit suffix, such as "300ms", "-1.5h" or - "2h45m". Valid time units are "ns", "us" (or "µs"), - "ms", "s", "m", "h". - type: string - failureThreshold: - default: 3 - description: FailureThreshold defines the minimum - consecutive failure for the status check to be - considered failed. - minimum: 1 - type: integer - http: - properties: - body: - type: string - criteria: - description: Criteria defines how to determine - the result of the status check. - properties: - statusCode: - description: StatusCode defines the expected - http status code for the request. A statusCode - string could be a single code (e.g. 200), - or an inclusive range (e.g. 200-400, both - `200` and `400` are included). - type: string - required: - - statusCode - type: object - headers: - additionalProperties: - items: - type: string - type: array - description: "A Header represents the key-value - pairs in an HTTP header. \n The keys should - be in canonical form, as returned by CanonicalHeaderKey." - type: object - method: - default: GET - enum: - - GET - - POST - type: string - url: - type: string - required: - - criteria - - url - type: object - intervalSeconds: - default: 10 - description: IntervalSeconds defines how often (in - seconds) to perform an execution of status check. - minimum: 1 - type: integer - mode: - description: 'Mode defines the execution mode of - the status check. Support type: Synchronous / - Continuous' - enum: - - Synchronous - - Continuous - type: string - recordsHistoryLimit: - default: 100 - description: RecordsHistoryLimit defines the number - of record to retain. - maximum: 1000 - minimum: 1 - type: integer - successThreshold: - default: 1 - description: SuccessThreshold defines the minimum - consecutive successes for the status check to - be considered successful. SuccessThreshold only - works for `Synchronous` mode. - minimum: 1 - type: integer - timeoutSeconds: - default: 1 - description: TimeoutSeconds defines the number of - seconds after which an execution of status check - times out. - minimum: 1 - type: integer - type: - default: HTTP - description: 'Type defines the specific status check - type. Support type: HTTP' - enum: - - HTTP - type: string - required: - - type - type: object - stressChaos: - description: StressChaosSpec defines the desired state - of StressChaos - properties: - containerNames: - description: ContainerNames indicates list of the - name of affected container. If not set, the first - container will be injected - items: - type: string - type: array - duration: - description: Duration represents the duration of - the chaos action - type: string - mode: - description: 'Mode defines the mode to run chaos - action. Supported mode: one / all / fixed / fixed-percent - / random-max-percent' - enum: - - one - - all - - fixed - - fixed-percent - - random-max-percent - type: string - remoteCluster: - description: RemoteCluster represents the remote - cluster where the chaos will be deployed - type: string - selector: - description: Selector is used to select pods that - are used to inject chaos action. - properties: - annotationSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select objects. A selector - based on annotations. - type: object - expressionSelectors: - description: a slice of label selector expressions - that can be used to select objects. A list - of selectors based on set-based label expressions. - items: - description: A label selector requirement - is a selector that contains values, a key, - and an operator that relates the key and - values. - properties: - key: - description: key is the label key that - the selector applies to. - type: string - operator: - description: operator represents a key's - relationship to a set of values. Valid - operators are In, NotIn, Exists and - DoesNotExist. - type: string - values: - description: values is an array of string - values. If the operator is In or NotIn, - the values array must be non-empty. - If the operator is Exists or DoesNotExist, - the values array must be empty. This - array is replaced during a strategic - merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - fieldSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select objects. A selector - based on fields. - type: object - labelSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select objects. A selector - based on labels. - type: object - namespaces: - description: Namespaces is a set of namespace - to which objects belong. - items: - type: string - type: array - nodeSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select nodes. Selector which - must match a node's labels, and objects must - belong to these selected nodes. - type: object - nodes: - description: Nodes is a set of node name and - objects must belong to these nodes. - items: - type: string - type: array - podPhaseSelectors: - description: 'PodPhaseSelectors is a set of - condition of a pod at the current time. supported - value: Pending / Running / Succeeded / Failed - / Unknown' - items: - type: string - type: array - pods: - additionalProperties: - items: - type: string - type: array - description: Pods is a map of string keys and - a set values that used to select pods. The - key defines the namespace which pods belong, - and the each values is a set of pod names. - type: object - type: object - stressngStressors: - description: StressngStressors defines plenty of - stressors just like `Stressors` except that it's - an experimental feature and more powerful. You - can define stressors in `stress-ng` (see also - `man stress-ng`) dialect, however not all of the - supported stressors are well tested. It maybe - retired in later releases. You should always use - `Stressors` to define the stressors and use this - only when you want more stressors unsupported - by `Stressors`. When both `StressngStressors` - and `Stressors` are defined, `StressngStressors` - wins. - type: string - stressors: - description: Stressors defines plenty of stressors - supported to stress system components out. You - can use one or more of them to make up various - kinds of stresses. At least one of the stressors - should be specified. - properties: - cpu: - description: CPUStressor stresses CPU out - properties: - load: - description: Load specifies P percent loading - per CPU worker. 0 is effectively a sleep - (no load) and 100 is full loading. - maximum: 100 - minimum: 0 - type: integer - options: - description: extend stress-ng options - items: - type: string - type: array - workers: - description: Workers specifies N workers - to apply the stressor. Maximum 8192 workers - can run by stress-ng - maximum: 8192 - type: integer - required: - - workers - type: object - memory: - description: MemoryStressor stresses virtual - memory out - properties: - oomScoreAdj: - default: 0 - description: OOMScoreAdj sets the oom_score_adj - of the stress process. See `man 5 proc` - to know more about this option. - maximum: 1000 - minimum: -1000 - type: integer - options: - description: extend stress-ng options - items: - type: string - type: array - size: - description: Size 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 - workers: - description: Workers specifies N workers - to apply the stressor. Maximum 8192 workers - can run by stress-ng - maximum: 8192 - type: integer - required: - - workers - type: object - type: object - value: - description: Value is required when the mode is - set to `FixedMode` / `FixedPercentMode` / `RandomMaxPercentMode`. - If `FixedMode`, provide an integer of pods to - do chaos action. If `FixedPercentMode`, provide - a number from 0-100 to specify the percent of - pods the server can do chaos action. IF `RandomMaxPercentMode`, provide - a number from 0-100 to specify the max percent - of pods to do chaos action - type: string - required: - - mode - - selector - type: object - task: - description: Task describes the behavior of the custom - task. Only used when Type is TypeTask. - properties: - container: - description: Container is the main container image - to run in the pod - properties: - args: - description: 'Arguments to the entrypoint. The - container image''s CMD is used if this is - not provided. Variable references $(VAR_NAME) - are expanded using the container''s environment. - If a variable cannot be resolved, the reference - in the input string will be unchanged. Double - $$ are reduced to a single $, which allows - for escaping the $(VAR_NAME) syntax: i.e. - "$$(VAR_NAME)" will produce the string literal - "$(VAR_NAME)". Escaped references will never - be expanded, regardless of whether the variable - exists or not. Cannot be updated. More info: - https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell' - items: - type: string - type: array - command: - description: 'Entrypoint array. Not executed - within a shell. The container image''s ENTRYPOINT - is used if this is not provided. Variable - references $(VAR_NAME) are expanded using - the container''s environment. If a variable - cannot be resolved, the reference in the input - string will be unchanged. Double $$ are reduced - to a single $, which allows for escaping the - $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will - produce the string literal "$(VAR_NAME)". - Escaped references will never be expanded, - regardless of whether the variable exists - or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell' - items: - type: string - type: array - env: - description: List of environment variables to - set in the container. Cannot be updated. - items: - description: EnvVar represents an environment - variable present in a Container. - properties: - name: - description: Name of the environment variable. - Must be a C_IDENTIFIER. - type: string - value: - description: 'Variable references $(VAR_NAME) - are expanded using the previously defined - environment variables in the container - and any service environment variables. - If a variable cannot be resolved, the - reference in the input string will be - unchanged. Double $$ are reduced to - a single $, which allows for escaping - the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" - will produce the string literal "$(VAR_NAME)". - Escaped references will never be expanded, - regardless of whether the variable exists - or not. Defaults to "".' - type: string - valueFrom: - description: Source for the environment - variable's value. Cannot be used if - value is not empty. - properties: - configMapKeyRef: - description: Selects a key of a ConfigMap. - properties: - key: - description: The key to select. - type: string - name: - description: 'Name of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. - apiVersion, kind, uid?' - type: string - optional: - description: Specify whether the - ConfigMap or its key must be - defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - fieldRef: - description: 'Selects a field of the - pod: supports metadata.name, metadata.namespace, - `metadata.labels['''']`, `metadata.annotations['''']`, - spec.nodeName, spec.serviceAccountName, - status.hostIP, status.podIP, status.podIPs.' - properties: - apiVersion: - description: Version of the schema - the FieldPath is written in - terms of, defaults to "v1". - type: string - fieldPath: - description: Path of the field - to select in the specified API - version. - type: string - required: - - fieldPath - type: object - x-kubernetes-map-type: atomic - resourceFieldRef: - description: 'Selects a resource of - the container: only resources limits - and requests (limits.cpu, limits.memory, - limits.ephemeral-storage, requests.cpu, - requests.memory and requests.ephemeral-storage) - are currently supported.' - properties: - containerName: - description: 'Container name: - required for volumes, optional - for env vars' - type: string - divisor: - anyOf: - - type: integer - - type: string - description: Specifies the output - format of the exposed resources, - defaults to "1" - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - description: 'Required: resource - to select' - type: string - required: - - resource - type: object - x-kubernetes-map-type: atomic - secretKeyRef: - description: Selects a key of a secret - in the pod's namespace - properties: - key: - description: The key of the secret - to select from. Must be a valid - secret key. - type: string - name: - description: 'Name of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. - apiVersion, kind, uid?' - type: string - optional: - description: Specify whether the - Secret or its key must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - type: object - required: - - name - type: object - type: array - envFrom: - description: List of sources to populate environment - variables in the container. The keys defined - within a source must be a C_IDENTIFIER. All - invalid keys will be reported as an event - when the container is starting. When a key - exists in multiple sources, the value associated - with the last source will take precedence. - Values defined by an Env with a duplicate - key will take precedence. Cannot be updated. - items: - description: EnvFromSource represents the - source of a set of ConfigMaps - properties: - configMapRef: - description: The ConfigMap to select from - properties: - name: - description: 'Name of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, - kind, uid?' - type: string - optional: - description: Specify whether the ConfigMap - must be defined - type: boolean - type: object - x-kubernetes-map-type: atomic - prefix: - description: An optional identifier to - prepend to each key in the ConfigMap. - Must be a C_IDENTIFIER. - type: string - secretRef: - description: The Secret to select from - properties: - name: - description: 'Name of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, - kind, uid?' - type: string - optional: - description: Specify whether the Secret - must be defined - type: boolean - type: object - x-kubernetes-map-type: atomic - type: object - type: array - image: - description: 'Container image name. More info: - https://kubernetes.io/docs/concepts/containers/images - This field is optional to allow higher level - config management to default or override container - images in workload controllers like Deployments - and StatefulSets.' - type: string - imagePullPolicy: - description: 'Image pull policy. One of Always, - Never, IfNotPresent. Defaults to Always if - :latest tag is specified, or IfNotPresent - otherwise. Cannot be updated. More info: https://kubernetes.io/docs/concepts/containers/images#updating-images' - type: string - lifecycle: - description: Actions that the management system - should take in response to container lifecycle - events. Cannot be updated. - properties: - postStart: - description: 'PostStart is called immediately - after a container is created. If the handler - fails, the container is terminated and - restarted according to its restart policy. - Other management of the container blocks - until the hook completes. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks' - properties: - exec: - description: Exec specifies the action - to take. - properties: - command: - description: Command is the command - line to execute inside the container, - the working directory for the - command is root ('/') in the - container's filesystem. The command - is simply exec'd, it is not run - inside a shell, so traditional - shell instructions ('|', etc) - won't work. To use a shell, you - need to explicitly call out to - that shell. Exit status of 0 is - treated as live/healthy and non-zero - is unhealthy. - items: - type: string - type: array - type: object - httpGet: - description: HTTPGet specifies the http - request to perform. - properties: - host: - description: Host name to connect - to, defaults to the pod IP. You - probably want to set "Host" in - httpHeaders instead. - type: string - httpHeaders: - description: Custom headers to set - in the request. HTTP allows repeated - headers. - items: - description: HTTPHeader describes - a custom header to be used in - HTTP probes - properties: - name: - description: The header field - name. This will be canonicalized - upon output, so case-variant - names will be understood - as the same header. - type: string - value: - description: The header field - value - type: string - required: - - name - - value - type: object - type: array - path: - description: Path to access on the - HTTP server. - type: string - port: - anyOf: - - type: integer - - type: string - description: Name or number of the - port to access on the container. - Number must be in the range 1 - to 65535. Name must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - scheme: - description: Scheme to use for connecting - to the host. Defaults to HTTP. - type: string - required: - - port - type: object - tcpSocket: - description: Deprecated. TCPSocket is - NOT supported as a LifecycleHandler - and kept for the backward compatibility. - There are no validation of this field - and lifecycle hooks will fail in runtime - when tcp handler is specified. - properties: - host: - description: 'Optional: Host name - to connect to, defaults to the - pod IP.' - type: string - port: - anyOf: - - type: integer - - type: string - description: Number or name of the - port to access on the container. - Number must be in the range 1 - to 65535. Name must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - required: - - port - type: object - type: object - preStop: - description: 'PreStop is called immediately - before a container is terminated due to - an API request or management event such - as liveness/startup probe failure, preemption, - resource contention, etc. The handler - is not called if the container crashes - or exits. The Pod''s termination grace - period countdown begins before the PreStop - hook is executed. Regardless of the outcome - of the handler, the container will eventually - terminate within the Pod''s termination - grace period (unless delayed by finalizers). - Other management of the container blocks - until the hook completes or until the - termination grace period is reached. More - info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks' - properties: - exec: - description: Exec specifies the action - to take. - properties: - command: - description: Command is the command - line to execute inside the container, - the working directory for the - command is root ('/') in the - container's filesystem. The command - is simply exec'd, it is not run - inside a shell, so traditional - shell instructions ('|', etc) - won't work. To use a shell, you - need to explicitly call out to - that shell. Exit status of 0 is - treated as live/healthy and non-zero - is unhealthy. - items: - type: string - type: array - type: object - httpGet: - description: HTTPGet specifies the http - request to perform. - properties: - host: - description: Host name to connect - to, defaults to the pod IP. You - probably want to set "Host" in - httpHeaders instead. - type: string - httpHeaders: - description: Custom headers to set - in the request. HTTP allows repeated - headers. - items: - description: HTTPHeader describes - a custom header to be used in - HTTP probes - properties: - name: - description: The header field - name. This will be canonicalized - upon output, so case-variant - names will be understood - as the same header. - type: string - value: - description: The header field - value - type: string - required: - - name - - value - type: object - type: array - path: - description: Path to access on the - HTTP server. - type: string - port: - anyOf: - - type: integer - - type: string - description: Name or number of the - port to access on the container. - Number must be in the range 1 - to 65535. Name must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - scheme: - description: Scheme to use for connecting - to the host. Defaults to HTTP. - type: string - required: - - port - type: object - tcpSocket: - description: Deprecated. TCPSocket is - NOT supported as a LifecycleHandler - and kept for the backward compatibility. - There are no validation of this field - and lifecycle hooks will fail in runtime - when tcp handler is specified. - properties: - host: - description: 'Optional: Host name - to connect to, defaults to the - pod IP.' - type: string - port: - anyOf: - - type: integer - - type: string - description: Number or name of the - port to access on the container. - Number must be in the range 1 - to 65535. Name must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - required: - - port - type: object - type: object - type: object - livenessProbe: - description: 'Periodic probe of container liveness. - Container will be restarted if the probe fails. - Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' - properties: - exec: - description: Exec specifies the action to - take. - properties: - command: - description: Command is the command - line to execute inside the container, - the working directory for the command is - root ('/') in the container's filesystem. - The command is simply exec'd, it is - not run inside a shell, so traditional - shell instructions ('|', etc) won't - work. To use a shell, you need to - explicitly call out to that shell. - Exit status of 0 is treated as live/healthy - and non-zero is unhealthy. - items: - type: string - type: array - type: object - failureThreshold: - description: Minimum consecutive failures - for the probe to be considered failed - after having succeeded. Defaults to 3. - Minimum value is 1. - format: int32 - type: integer - grpc: - description: GRPC specifies an action involving - a GRPC port. - properties: - port: - description: Port number of the gRPC - service. Number must be in the range - 1 to 65535. - format: int32 - type: integer - service: - description: "Service is the name of - the service to place in the gRPC HealthCheckRequest - (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). - \n If this is not specified, the default - behavior is defined by gRPC." - type: string - required: - - port - type: object - httpGet: - description: HTTPGet specifies the http - request to perform. - properties: - host: - description: Host name to connect to, - defaults to the pod IP. You probably - want to set "Host" in httpHeaders - instead. - type: string - httpHeaders: - description: Custom headers to set in - the request. HTTP allows repeated - headers. - items: - description: HTTPHeader describes - a custom header to be used in HTTP - probes - properties: - name: - description: The header field - name. This will be canonicalized - upon output, so case-variant - names will be understood as - the same header. - type: string - value: - description: The header field - value - type: string - required: - - name - - value - type: object - type: array - path: - description: Path to access on the HTTP - server. - type: string - port: - anyOf: - - type: integer - - type: string - description: Name or number of the port - to access on the container. Number - must be in the range 1 to 65535. Name - must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - scheme: - description: Scheme to use for connecting - to the host. Defaults to HTTP. - type: string - required: - - port - type: object - initialDelaySeconds: - description: 'Number of seconds after the - container has started before liveness - probes are initiated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' - format: int32 - type: integer - periodSeconds: - description: How often (in seconds) to perform - the probe. Default to 10 seconds. Minimum - value is 1. - format: int32 - type: integer - successThreshold: - description: Minimum consecutive successes - for the probe to be considered successful - after having failed. Defaults to 1. Must - be 1 for liveness and startup. Minimum - value is 1. - format: int32 - type: integer - tcpSocket: - description: TCPSocket specifies an action - involving a TCP port. - properties: - host: - description: 'Optional: Host name to - connect to, defaults to the pod IP.' - type: string - port: - anyOf: - - type: integer - - type: string - description: Number or name of the port - to access on the container. Number - must be in the range 1 to 65535. Name - must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - required: - - port - type: object - terminationGracePeriodSeconds: - description: Optional duration in seconds - the pod needs to terminate gracefully - upon probe failure. The grace period is - the duration in seconds after the processes - running in the pod are sent a termination - signal and the time when the processes - are forcibly halted with a kill signal. - Set this value longer than the expected - cleanup time for your process. If this - value is nil, the pod's terminationGracePeriodSeconds - will be used. Otherwise, this value overrides - the value provided by the pod spec. Value - must be non-negative integer. The value - zero indicates stop immediately via the - kill signal (no opportunity to shut down). - This is a beta field and requires enabling - ProbeTerminationGracePeriod feature gate. - Minimum value is 1. spec.terminationGracePeriodSeconds - is used if unset. - format: int64 - type: integer - timeoutSeconds: - description: 'Number of seconds after which - the probe times out. Defaults to 1 second. - Minimum value is 1. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' - format: int32 - type: integer - type: object - name: - description: Name of the container specified - as a DNS_LABEL. Each container in a pod must - have a unique name (DNS_LABEL). Cannot be - updated. - type: string - ports: - description: List of ports to expose from the - container. Not specifying a port here DOES - NOT prevent that port from being exposed. - Any port which is listening on the default - "0.0.0.0" address inside a container will - be accessible from the network. Modifying - this array with strategic merge patch may - corrupt the data. For more information See - https://github.com/kubernetes/kubernetes/issues/108255. - Cannot be updated. - items: - description: ContainerPort represents a network - port in a single container. - properties: - containerPort: - description: Number of port to expose - on the pod's IP address. This must be - a valid port number, 0 < x < 65536. - format: int32 - type: integer - hostIP: - description: What host IP to bind the - external port to. - type: string - hostPort: - description: Number of port to expose - on the host. If specified, this must - be a valid port number, 0 < x < 65536. - If HostNetwork is specified, this must - match ContainerPort. Most containers - do not need this. - format: int32 - type: integer - name: - description: If specified, this must be - an IANA_SVC_NAME and unique within the - pod. Each named port in a pod must have - a unique name. Name for the port that - can be referred to by services. - type: string - protocol: - default: TCP - description: Protocol for port. Must be - UDP, TCP, or SCTP. Defaults to "TCP". - type: string - required: - - containerPort - type: object - type: array - x-kubernetes-list-map-keys: - - containerPort - - protocol - x-kubernetes-list-type: map - readinessProbe: - description: 'Periodic probe of container service - readiness. Container will be removed from - service endpoints if the probe fails. Cannot - be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' - properties: - exec: - description: Exec specifies the action to - take. - properties: - command: - description: Command is the command - line to execute inside the container, - the working directory for the command is - root ('/') in the container's filesystem. - The command is simply exec'd, it is - not run inside a shell, so traditional - shell instructions ('|', etc) won't - work. To use a shell, you need to - explicitly call out to that shell. - Exit status of 0 is treated as live/healthy - and non-zero is unhealthy. - items: - type: string - type: array - type: object - failureThreshold: - description: Minimum consecutive failures - for the probe to be considered failed - after having succeeded. Defaults to 3. - Minimum value is 1. - format: int32 - type: integer - grpc: - description: GRPC specifies an action involving - a GRPC port. - properties: - port: - description: Port number of the gRPC - service. Number must be in the range - 1 to 65535. - format: int32 - type: integer - service: - description: "Service is the name of - the service to place in the gRPC HealthCheckRequest - (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). - \n If this is not specified, the default - behavior is defined by gRPC." - type: string - required: - - port - type: object - httpGet: - description: HTTPGet specifies the http - request to perform. - properties: - host: - description: Host name to connect to, - defaults to the pod IP. You probably - want to set "Host" in httpHeaders - instead. - type: string - httpHeaders: - description: Custom headers to set in - the request. HTTP allows repeated - headers. - items: - description: HTTPHeader describes - a custom header to be used in HTTP - probes - properties: - name: - description: The header field - name. This will be canonicalized - upon output, so case-variant - names will be understood as - the same header. - type: string - value: - description: The header field - value - type: string - required: - - name - - value - type: object - type: array - path: - description: Path to access on the HTTP - server. - type: string - port: - anyOf: - - type: integer - - type: string - description: Name or number of the port - to access on the container. Number - must be in the range 1 to 65535. Name - must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - scheme: - description: Scheme to use for connecting - to the host. Defaults to HTTP. - type: string - required: - - port - type: object - initialDelaySeconds: - description: 'Number of seconds after the - container has started before liveness - probes are initiated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' - format: int32 - type: integer - periodSeconds: - description: How often (in seconds) to perform - the probe. Default to 10 seconds. Minimum - value is 1. - format: int32 - type: integer - successThreshold: - description: Minimum consecutive successes - for the probe to be considered successful - after having failed. Defaults to 1. Must - be 1 for liveness and startup. Minimum - value is 1. - format: int32 - type: integer - tcpSocket: - description: TCPSocket specifies an action - involving a TCP port. - properties: - host: - description: 'Optional: Host name to - connect to, defaults to the pod IP.' - type: string - port: - anyOf: - - type: integer - - type: string - description: Number or name of the port - to access on the container. Number - must be in the range 1 to 65535. Name - must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - required: - - port - type: object - terminationGracePeriodSeconds: - description: Optional duration in seconds - the pod needs to terminate gracefully - upon probe failure. The grace period is - the duration in seconds after the processes - running in the pod are sent a termination - signal and the time when the processes - are forcibly halted with a kill signal. - Set this value longer than the expected - cleanup time for your process. If this - value is nil, the pod's terminationGracePeriodSeconds - will be used. Otherwise, this value overrides - the value provided by the pod spec. Value - must be non-negative integer. The value - zero indicates stop immediately via the - kill signal (no opportunity to shut down). - This is a beta field and requires enabling - ProbeTerminationGracePeriod feature gate. - Minimum value is 1. spec.terminationGracePeriodSeconds - is used if unset. - format: int64 - type: integer - timeoutSeconds: - description: 'Number of seconds after which - the probe times out. Defaults to 1 second. - Minimum value is 1. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' - format: int32 - type: integer - type: object - resizePolicy: - description: Resources resize policy for the - container. - items: - description: ContainerResizePolicy represents - resource resize policy for the container. - properties: - resourceName: - description: 'Name of the resource to - which this resource resize policy applies. - Supported values: cpu, memory.' - type: string - restartPolicy: - description: Restart policy to apply when - specified resource is resized. If not - specified, it defaults to NotRequired. - type: string - required: - - resourceName - - restartPolicy - type: object - type: array - x-kubernetes-list-type: atomic - resources: - description: 'Compute Resources required by - this container. Cannot be updated. More info: - https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' - properties: - claims: - description: "Claims lists the names of - resources, defined in spec.resourceClaims, - that are used by this container. \n This - is an alpha field and requires enabling - the DynamicResourceAllocation feature - gate. \n This field is immutable. It can - only be set for containers." - items: - description: ResourceClaim references - one entry in PodSpec.ResourceClaims. - properties: - name: - description: Name must match the name - of one entry in pod.spec.resourceClaims - of the Pod where this field is used. - It makes that resource available - inside a container. - type: string - required: - - name - type: object - type: array - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Limits describes the maximum - amount of compute resources allowed. More - info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Requests describes the minimum - amount of compute resources required. - If Requests is omitted for a container, - it defaults to Limits if that is explicitly - specified, otherwise to an implementation-defined - value. Requests cannot exceed Limits. - More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' - type: object - type: object - restartPolicy: - description: 'RestartPolicy defines the restart - behavior of individual containers in a pod. - This field may only be set for init containers, - and the only allowed value is "Always". For - non-init containers or when this field is - not specified, the restart behavior is defined - by the Pod''s restart policy and the container - type. Setting the RestartPolicy as "Always" - for the init container will have the following - effect: this init container will be continually - restarted on exit until all regular containers - have terminated. Once all regular containers - have completed, all init containers with restartPolicy - "Always" will be shut down. This lifecycle - differs from normal init containers and is - often referred to as a "sidecar" container. - Although this init container still starts - in the init container sequence, it does not - wait for the container to complete before - proceeding to the next init container. Instead, - the next init container starts immediately - after this init container is started, or after - any startupProbe has successfully completed.' - type: string - 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/' - properties: - allowPrivilegeEscalation: - description: 'AllowPrivilegeEscalation controls - whether a process can gain more privileges - than its parent process. This bool directly - controls if the no_new_privs flag will - be set on the container process. AllowPrivilegeEscalation - is true always when the container is: - 1) run as Privileged 2) has CAP_SYS_ADMIN - Note that this field cannot be set when - spec.os.name is windows.' - type: boolean - capabilities: - description: The capabilities to add/drop - when running containers. Defaults to the - default set of capabilities granted by - the container runtime. Note that this - field cannot be set when spec.os.name - is windows. - properties: - add: - description: Added capabilities - items: - description: Capability represent - POSIX capabilities type - type: string - type: array - drop: - description: Removed capabilities - items: - description: Capability represent - POSIX capabilities type - type: string - type: array - type: object - privileged: - description: Run container in privileged - mode. Processes in privileged containers - are essentially equivalent to root on - the host. Defaults to false. Note that - this field cannot be set when spec.os.name - is windows. - type: boolean - procMount: - description: procMount denotes the type - of proc mount to use for the containers. - The default is DefaultProcMount which - uses the container runtime defaults for - readonly paths and masked paths. This - requires the ProcMountType feature flag - to be enabled. Note that this field cannot - be set when spec.os.name is windows. - type: string - readOnlyRootFilesystem: - description: Whether this container has - a read-only root filesystem. Default is - false. Note that this field cannot be - set when spec.os.name is windows. - type: boolean - runAsGroup: - description: The GID to run the entrypoint - of the container process. Uses runtime - default if unset. May also be set in PodSecurityContext. If - set in both SecurityContext and PodSecurityContext, - the value specified in SecurityContext - takes precedence. Note that this field - cannot be set when spec.os.name is windows. - format: int64 - type: integer - runAsNonRoot: - description: Indicates that the container - must run as a non-root user. If true, - the Kubelet will validate the image at - runtime to ensure that it does not run - as UID 0 (root) and fail to start the - container if it does. If unset or false, - no such validation will be performed. - May also be set in PodSecurityContext. If - set in both SecurityContext and PodSecurityContext, - the value specified in SecurityContext - takes precedence. - type: boolean - runAsUser: - description: The UID to run the entrypoint - of the container process. Defaults to - user specified in image metadata if unspecified. - May also be set in PodSecurityContext. If - set in both SecurityContext and PodSecurityContext, - the value specified in SecurityContext - takes precedence. Note that this field - cannot be set when spec.os.name is windows. - format: int64 - type: integer - seLinuxOptions: - description: The SELinux context to be applied - to the container. If unspecified, the - container runtime will allocate a random - SELinux context for each container. May - also be set in PodSecurityContext. If - set in both SecurityContext and PodSecurityContext, - the value specified in SecurityContext - takes precedence. Note that this field - cannot be set when spec.os.name is windows. - properties: - level: - description: Level is SELinux level - label that applies to the container. - type: string - role: - description: Role is a SELinux role - label that applies to the container. - type: string - type: - description: Type is a SELinux type - label that applies to the container. - type: string - user: - description: User is a SELinux user - label that applies to the container. - type: string - type: object - seccompProfile: - description: The seccomp options to use - by this container. If seccomp options - are provided at both the pod & container - level, the container options override - the pod options. Note that this field - cannot be set when spec.os.name is windows. - properties: - localhostProfile: - description: localhostProfile indicates - a profile defined in a file on the - node should be used. The profile must - be preconfigured on the node to work. - Must be a descending path, relative - to the kubelet's configured seccomp - profile location. Must be set if type - is "Localhost". Must NOT be set for - any other type. - type: string - type: - description: "type indicates which kind - of seccomp profile will be applied. - Valid options are: \n Localhost - - a profile defined in a file on the - node should be used. RuntimeDefault - - the container runtime default profile - should be used. Unconfined - no profile - should be applied." - type: string - required: - - type - type: object - windowsOptions: - description: The Windows specific settings - applied to all containers. If unspecified, - the options from the PodSecurityContext - will be used. If set in both SecurityContext - and PodSecurityContext, the value specified - in SecurityContext takes precedence. Note - that this field cannot be set when spec.os.name - is linux. - properties: - gmsaCredentialSpec: - description: GMSACredentialSpec is where - the GMSA admission webhook (https://github.com/kubernetes-sigs/windows-gmsa) - inlines the contents of the GMSA credential - spec named by the GMSACredentialSpecName - field. - type: string - gmsaCredentialSpecName: - description: GMSACredentialSpecName - is the name of the GMSA credential - spec to use. - type: string - hostProcess: - description: HostProcess determines - if a container should be run as a - 'Host Process' container. All of a - Pod's containers must have the same - effective HostProcess value (it is - not allowed to have a mix of HostProcess - containers and non-HostProcess containers). - In addition, if HostProcess is true - then HostNetwork must also be set - to true. - type: boolean - runAsUserName: - description: The UserName in Windows - to run the entrypoint of the container - process. Defaults to the user specified - in image metadata if unspecified. - May also be set in PodSecurityContext. - If set in both SecurityContext and - PodSecurityContext, the value specified - in SecurityContext takes precedence. - type: string - type: object - type: object - startupProbe: - description: 'StartupProbe indicates that the - Pod has successfully initialized. If specified, - no other probes are executed until this completes - successfully. If this probe fails, the Pod - will be restarted, just as if the livenessProbe - failed. This can be used to provide different - probe parameters at the beginning of a Pod''s - lifecycle, when it might take a long time - to load data or warm a cache, than during - steady-state operation. This cannot be updated. - More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' - properties: - exec: - description: Exec specifies the action to - take. - properties: - command: - description: Command is the command - line to execute inside the container, - the working directory for the command is - root ('/') in the container's filesystem. - The command is simply exec'd, it is - not run inside a shell, so traditional - shell instructions ('|', etc) won't - work. To use a shell, you need to - explicitly call out to that shell. - Exit status of 0 is treated as live/healthy - and non-zero is unhealthy. - items: - type: string - type: array - type: object - failureThreshold: - description: Minimum consecutive failures - for the probe to be considered failed - after having succeeded. Defaults to 3. - Minimum value is 1. - format: int32 - type: integer - grpc: - description: GRPC specifies an action involving - a GRPC port. - properties: - port: - description: Port number of the gRPC - service. Number must be in the range - 1 to 65535. - format: int32 - type: integer - service: - description: "Service is the name of - the service to place in the gRPC HealthCheckRequest - (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). - \n If this is not specified, the default - behavior is defined by gRPC." - type: string - required: - - port - type: object - httpGet: - description: HTTPGet specifies the http - request to perform. - properties: - host: - description: Host name to connect to, - defaults to the pod IP. You probably - want to set "Host" in httpHeaders - instead. - type: string - httpHeaders: - description: Custom headers to set in - the request. HTTP allows repeated - headers. - items: - description: HTTPHeader describes - a custom header to be used in HTTP - probes - properties: - name: - description: The header field - name. This will be canonicalized - upon output, so case-variant - names will be understood as - the same header. - type: string - value: - description: The header field - value - type: string - required: - - name - - value - type: object - type: array - path: - description: Path to access on the HTTP - server. - type: string - port: - anyOf: - - type: integer - - type: string - description: Name or number of the port - to access on the container. Number - must be in the range 1 to 65535. Name - must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - scheme: - description: Scheme to use for connecting - to the host. Defaults to HTTP. - type: string - required: - - port - type: object - initialDelaySeconds: - description: 'Number of seconds after the - container has started before liveness - probes are initiated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' - format: int32 - type: integer - periodSeconds: - description: How often (in seconds) to perform - the probe. Default to 10 seconds. Minimum - value is 1. - format: int32 - type: integer - successThreshold: - description: Minimum consecutive successes - for the probe to be considered successful - after having failed. Defaults to 1. Must - be 1 for liveness and startup. Minimum - value is 1. - format: int32 - type: integer - tcpSocket: - description: TCPSocket specifies an action - involving a TCP port. - properties: - host: - description: 'Optional: Host name to - connect to, defaults to the pod IP.' - type: string - port: - anyOf: - - type: integer - - type: string - description: Number or name of the port - to access on the container. Number - must be in the range 1 to 65535. Name - must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - required: - - port - type: object - terminationGracePeriodSeconds: - description: Optional duration in seconds - the pod needs to terminate gracefully - upon probe failure. The grace period is - the duration in seconds after the processes - running in the pod are sent a termination - signal and the time when the processes - are forcibly halted with a kill signal. - Set this value longer than the expected - cleanup time for your process. If this - value is nil, the pod's terminationGracePeriodSeconds - will be used. Otherwise, this value overrides - the value provided by the pod spec. Value - must be non-negative integer. The value - zero indicates stop immediately via the - kill signal (no opportunity to shut down). - This is a beta field and requires enabling - ProbeTerminationGracePeriod feature gate. - Minimum value is 1. spec.terminationGracePeriodSeconds - is used if unset. - format: int64 - type: integer - timeoutSeconds: - description: 'Number of seconds after which - the probe times out. Defaults to 1 second. - Minimum value is 1. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' - format: int32 - type: integer - type: object - stdin: - description: Whether this container should allocate - a buffer for stdin in the container runtime. - If this is not set, reads from stdin in the - container will always result in EOF. Default - is false. - type: boolean - stdinOnce: - description: Whether the container runtime should - close the stdin channel after it has been - opened by a single attach. When stdin is true - the stdin stream will remain open across multiple - attach sessions. If stdinOnce is set to true, - stdin is opened on container start, is empty - until the first client attaches to stdin, - and then remains open and accepts data until - the client disconnects, at which time stdin - is closed and remains closed until the container - is restarted. If this flag is false, a container - processes that reads from stdin will never - receive an EOF. Default is false - type: boolean - terminationMessagePath: - description: 'Optional: Path at which the file - to which the container''s termination message - will be written is mounted into the container''s - filesystem. Message written is intended to - be brief final status, such as an assertion - failure message. Will be truncated by the - node if greater than 4096 bytes. The total - message length across all containers will - be limited to 12kb. Defaults to /dev/termination-log. - Cannot be updated.' - type: string - terminationMessagePolicy: - description: Indicate how the termination message - should be populated. File will use the contents - of terminationMessagePath to populate the - container status message on both success and - failure. FallbackToLogsOnError will use the - last chunk of container log output if the - termination message file is empty and the - container exited with an error. The log output - is limited to 2048 bytes or 80 lines, whichever - is smaller. Defaults to File. Cannot be updated. - type: string - tty: - description: Whether this container should allocate - a TTY for itself, also requires 'stdin' to - be true. Default is false. - type: boolean - volumeDevices: - description: volumeDevices is the list of block - devices to be used by the container. - items: - description: volumeDevice describes a mapping - of a raw block device within a container. - properties: - devicePath: - description: devicePath is the path inside - of the container that the device will - be mapped to. - type: string - name: - description: name must match the name - of a persistentVolumeClaim in the pod - type: string - required: - - devicePath - - name - type: object - type: array - volumeMounts: - description: Pod volumes to mount into the container's - filesystem. Cannot be updated. - items: - description: VolumeMount describes a mounting - of a Volume within a container. - properties: - mountPath: - description: Path within the container - at which the volume should be mounted. Must - not contain ':'. - type: string - mountPropagation: - description: mountPropagation determines - how mounts are propagated from the host - to container and the other way around. - When not set, MountPropagationNone is - used. This field is beta in 1.10. - type: string - name: - description: This must match the Name - of a Volume. - type: string - readOnly: - description: Mounted read-only if true, - read-write otherwise (false or unspecified). - Defaults to false. - type: boolean - subPath: - description: Path within the volume from - which the container's volume should - be mounted. Defaults to "" (volume's - root). - type: string - subPathExpr: - description: Expanded path within the - volume from which the container's volume - should be mounted. Behaves similarly - to SubPath but environment variable - references $(VAR_NAME) are expanded - using the container's environment. Defaults - to "" (volume's root). SubPathExpr and - SubPath are mutually exclusive. - type: string - required: - - mountPath - - name - type: object - type: array - workingDir: - description: Container's working directory. - If not specified, the container runtime's - default will be used, which might be configured - in the container image. Cannot be updated. - type: string - required: - - name - type: object - volumes: - description: Volumes is a list of volumes that can - be mounted by containers in a template. - items: - description: Volume represents a named volume - in a pod that may be accessed by any container - in the pod. - properties: - awsElasticBlockStore: - description: 'awsElasticBlockStore represents - an AWS Disk resource that is attached to - a kubelet''s host machine and then exposed - to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore' - properties: - fsType: - description: 'fsType is the filesystem - type of the volume that you want to - mount. Tip: Ensure that the filesystem - type is supported by the host operating - system. Examples: "ext4", "xfs", "ntfs". - Implicitly inferred to be "ext4" if - unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore - TODO: how do we prevent errors in the - filesystem from compromising the machine' - type: string - partition: - description: 'partition is the partition - in the volume that you want to mount. - If omitted, the default is to mount - by volume name. Examples: For volume - /dev/sda1, you specify the partition - as "1". Similarly, the volume partition - for /dev/sda is "0" (or you can leave - the property empty).' - format: int32 - type: integer - readOnly: - description: 'readOnly value true will - force the readOnly setting in VolumeMounts. - More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore' - type: boolean - volumeID: - description: 'volumeID is unique ID of - the persistent disk resource in AWS - (Amazon EBS volume). More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore' - type: string - required: - - volumeID - type: object - azureDisk: - description: azureDisk represents an Azure - Data Disk mount on the host and bind mount - to the pod. - properties: - cachingMode: - description: 'cachingMode is the Host - Caching mode: None, Read Only, Read - Write.' - type: string - diskName: - description: diskName is the Name of the - data disk in the blob storage - type: string - diskURI: - description: diskURI is the URI of data - disk in the blob storage - type: string - fsType: - description: fsType is Filesystem type - to mount. Must be a filesystem type - supported by the host operating system. - Ex. "ext4", "xfs", "ntfs". Implicitly - inferred to be "ext4" if unspecified. - type: string - kind: - description: 'kind expected values are - Shared: multiple blob disks per storage - account Dedicated: single blob disk - per storage account Managed: azure - managed data disk (only in managed availability - set). defaults to shared' - type: string - readOnly: - description: readOnly Defaults to false - (read/write). ReadOnly here will force - the ReadOnly setting in VolumeMounts. - type: boolean - required: - - diskName - - diskURI - type: object - azureFile: - description: azureFile represents an Azure - File Service mount on the host and bind - mount to the pod. - properties: - readOnly: - description: readOnly defaults to false - (read/write). ReadOnly here will force - the ReadOnly setting in VolumeMounts. - type: boolean - secretName: - description: secretName is the name of - secret that contains Azure Storage Account - Name and Key - type: string - shareName: - description: shareName is the azure share - Name - type: string - required: - - secretName - - shareName - type: object - cephfs: - description: cephFS represents a Ceph FS mount - on the host that shares a pod's lifetime - properties: - monitors: - description: 'monitors is Required: Monitors - is a collection of Ceph monitors More - info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' - items: - type: string - type: array - path: - description: 'path is Optional: Used as - the mounted root, rather than the full - Ceph tree, default is /' - type: string - readOnly: - description: 'readOnly is Optional: Defaults - to false (read/write). ReadOnly here - will force the ReadOnly setting in VolumeMounts. - More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' - type: boolean - secretFile: - description: 'secretFile is Optional: - SecretFile is the path to key ring for - User, default is /etc/ceph/user.secret - More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' - type: string - secretRef: - description: 'secretRef is Optional: SecretRef - is reference to the authentication secret - for User, default is empty. More info: - https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' - properties: - name: - description: 'Name of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, - kind, uid?' - type: string - type: object - x-kubernetes-map-type: atomic - user: - description: 'user is optional: User is - the rados user name, default is admin - More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' - type: string - required: - - monitors - type: object - cinder: - description: 'cinder represents a cinder volume - attached and mounted on kubelets host machine. - More info: https://examples.k8s.io/mysql-cinder-pd/README.md' - properties: - fsType: - description: 'fsType is the filesystem - type to mount. Must be a filesystem - type supported by the host operating - system. Examples: "ext4", "xfs", "ntfs". - Implicitly inferred to be "ext4" if - unspecified. More info: https://examples.k8s.io/mysql-cinder-pd/README.md' - type: string - readOnly: - description: 'readOnly defaults to false - (read/write). ReadOnly here will force - the ReadOnly setting in VolumeMounts. - More info: https://examples.k8s.io/mysql-cinder-pd/README.md' - type: boolean - secretRef: - description: 'secretRef is optional: points - to a secret object containing parameters - used to connect to OpenStack.' - properties: - name: - description: 'Name of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, - kind, uid?' - type: string - type: object - x-kubernetes-map-type: atomic - volumeID: - description: 'volumeID used to identify - the volume in cinder. More info: https://examples.k8s.io/mysql-cinder-pd/README.md' - type: string - required: - - volumeID - type: object - configMap: - description: configMap represents a configMap - that should populate this volume - properties: - defaultMode: - description: 'defaultMode is optional: - mode bits used to set permissions on - created files by default. Must be an - octal value between 0000 and 0777 or - a decimal value between 0 and 511. YAML - accepts both octal and decimal values, - JSON requires decimal values for mode - bits. Defaults to 0644. Directories - within the path are not affected by - this setting. This might be in conflict - with other options that affect the file - mode, like fsGroup, and the result can - be other mode bits set.' - format: int32 - type: integer - items: - description: items if unspecified, each - key-value pair in the Data field of - the referenced ConfigMap will be projected - into the volume as a file whose name - is the key and content is the value. - If specified, the listed keys will be - projected into the specified paths, - and unlisted keys will not be present. - If a key is specified which is not present - in the ConfigMap, the volume setup will - error unless it is marked optional. - Paths must be relative and may not contain - the '..' path or start with '..'. - items: - description: Maps a string key to a - path within a volume. - properties: - key: - description: key is the key to project. - type: string - mode: - description: 'mode is Optional: - mode bits used to set permissions - on this file. Must be an octal - value between 0000 and 0777 or - a decimal value between 0 and - 511. YAML accepts both octal and - decimal values, JSON requires - decimal values for mode bits. - If not specified, the volume defaultMode - will be used. This might be in - conflict with other options that - affect the file mode, like fsGroup, - and the result can be other mode - bits set.' - format: int32 - type: integer - path: - description: path is the relative - path of the file to map the key - to. May not be an absolute path. - May not contain the path element - '..'. May not start with the string - '..'. - type: string - required: - - key - - path - type: object - 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?' - type: string - optional: - description: optional specify whether - the ConfigMap or its keys must be defined - type: boolean - type: object - x-kubernetes-map-type: atomic - csi: - description: csi (Container Storage Interface) - represents ephemeral storage that is handled - by certain external CSI drivers (Beta feature). - 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: fsType to mount. Ex. "ext4", - "xfs", "ntfs". If not provided, the - empty value is passed to the associated - CSI driver which will determine the - default filesystem to apply. - type: string - nodePublishSecretRef: - description: nodePublishSecretRef is a - reference to the secret object containing - sensitive information to pass to the - CSI driver to complete the CSI NodePublishVolume - and NodeUnpublishVolume calls. This - field is optional, and may be empty - if no secret is required. If the secret - object contains more than one secret, - all secret references are passed. - properties: - name: - description: 'Name of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, - kind, uid?' - type: string - type: object - x-kubernetes-map-type: atomic - readOnly: - description: readOnly specifies a read-only - configuration for the volume. Defaults - to false (read/write). - 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. - type: object - required: - - driver - type: object - downwardAPI: - description: downwardAPI represents downward - API about the pod that should populate this - volume - 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.' - format: int32 - type: integer - items: - description: Items is a list of downward - API volume file - items: - description: DownwardAPIVolumeFile represents - information to create the file containing - the pod field - properties: - fieldRef: - description: 'Required: Selects - a field of the pod: only annotations, - labels, name and namespace are - supported.' - properties: - apiVersion: - description: Version of the - schema the FieldPath is written - in terms of, defaults to "v1". - type: string - fieldPath: - description: Path of the field - to select in the specified - API version. - type: string - required: - - fieldPath - type: object - x-kubernetes-map-type: atomic - 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.' - format: int32 - 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 (limits.cpu, - limits.memory, requests.cpu and - requests.memory) are currently - supported.' - properties: - containerName: - description: 'Container name: - required for volumes, optional - for env vars' - type: string - divisor: - anyOf: - - type: integer - - type: string - description: Specifies the output - format of the exposed resources, - defaults to "1" - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - description: 'Required: resource - to select' - type: string - required: - - resource - type: object - x-kubernetes-map-type: atomic - required: - - path - type: object - type: array - type: object - emptyDir: - description: 'emptyDir represents a temporary - directory that shares a pod''s lifetime. - More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir' - properties: - medium: - description: 'medium represents what type - of storage medium should back this directory. - The default is "" which means to use - the node''s default medium. Must be - an empty string (default) or Memory. - More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir' - type: string - sizeLimit: - anyOf: - - type: integer - - type: string - description: 'sizeLimit is the total amount - of local storage required for this EmptyDir - volume. The size limit is also applicable - for memory medium. The maximum usage - on memory medium EmptyDir would be the - minimum value between the SizeLimit - specified here and the sum of memory - limits of all containers in a pod. The - default is nil which means that the - limit is undefined. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir' - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - ephemeral: - description: "ephemeral represents a volume - that is handled by a cluster storage driver. - The volume's lifecycle is tied to the pod - that defines it - it will be created before - the pod starts, and deleted when the pod - is removed. \n 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). \n Use PersistentVolumeClaim - or one of the vendor-specific APIs for volumes - that persist for longer than the lifecycle - of an individual pod. \n 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. \n A - pod can use both types of ephemeral volumes - and persistent volumes at the same time." - properties: - volumeClaimTemplate: - description: "Will be used to create a - stand-alone PVC to provision the volume. - The pod in which this EphemeralVolumeSource - is embedded will be the owner of the - PVC, i.e. the PVC will be deleted together - with the pod. The name of the PVC will - be `-` where - `` is the name from the - `PodSpec.Volumes` array entry. Pod validation - will reject the pod if the concatenated - name is not valid for a PVC (for example, - too long). \n 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. \n This field is read-only - and no changes will be made by Kubernetes - to the PVC after it has been created. - \n Required, must not be nil." - properties: - metadata: - description: May contain labels and - annotations that will be copied - into the PVC when creating it. No - other fields are allowed and will - be rejected during validation. - type: object - spec: - description: The specification for - the PersistentVolumeClaim. The entire - content is copied unchanged into - the PVC that gets created from this - template. The same fields as in - a PersistentVolumeClaim are also - valid here. - 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' - items: - type: string - type: array - dataSource: - description: 'dataSource field - can be used to specify either: - * An existing VolumeSnapshot - object (snapshot.storage.k8s.io/VolumeSnapshot) - * An existing PVC (PersistentVolumeClaim) - If the provisioner or an external - controller can support the specified - data source, it will create - a new volume based on the contents - of the specified data source. - When the AnyVolumeDataSource - feature gate is enabled, dataSource - contents will be copied to dataSourceRef, - and dataSourceRef contents will - be copied to dataSource when - dataSourceRef.namespace is not - specified. If the namespace - is specified, then dataSourceRef - will not be copied to dataSource.' - properties: - apiGroup: - description: APIGroup is the - group for the resource being - referenced. If APIGroup - is not specified, the specified - Kind must be in the core - API group. For any other - third-party types, APIGroup - is required. - type: string - kind: - description: Kind is the type - of resource being referenced - type: string - name: - description: Name is the name - of resource being referenced - type: string - required: - - kind - - name - type: object - x-kubernetes-map-type: atomic - dataSourceRef: - description: 'dataSourceRef specifies - the object from which to populate - the volume with data, if a non-empty - volume is desired. This may - be any object from a non-empty - API group (non core object) - or a PersistentVolumeClaim object. - When this field is specified, - volume binding will only succeed - if the type of the specified - object matches some installed - volume populator or dynamic - provisioner. This field will - replace the functionality of - the dataSource field and as - such if both fields are non-empty, - they must have the same value. - For backwards compatibility, - when namespace isn''t specified - in dataSourceRef, both fields - (dataSource and dataSourceRef) - will be set to the same value - automatically if one of them - is empty and the other is non-empty. - When namespace is specified - in dataSourceRef, dataSource - isn''t set to the same value - and must be empty. There are - three important differences - between dataSource and dataSourceRef: - * While dataSource only allows - two specific types of objects, - dataSourceRef 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. * While dataSource - only allows local objects, dataSourceRef - allows objects in any namespaces. - (Beta) Using this field requires - the AnyVolumeDataSource feature - gate to be enabled. (Alpha) - Using the namespace field of - dataSourceRef requires the CrossNamespaceVolumeDataSource - feature gate to be enabled.' - properties: - apiGroup: - description: APIGroup is the - group for the resource being - referenced. If APIGroup - is not specified, the specified - Kind must be in the core - API group. For any other - third-party types, APIGroup - is required. - type: string - kind: - description: Kind is the type - of resource being referenced - type: string - name: - description: Name is the name - of resource being referenced - type: string - namespace: - description: Namespace is - the namespace of resource - being referenced Note that - when a namespace is specified, - a gateway.networking.k8s.io/ReferenceGrant - object is required in the - referent namespace to allow - that namespace's owner to - accept the reference. See - the ReferenceGrant documentation - for details. (Alpha) This - field requires the CrossNamespaceVolumeDataSource - feature gate to be enabled. - type: string - required: - - kind - - name - type: object - resources: - 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' - properties: - claims: - description: "Claims lists - the names of resources, - defined in spec.resourceClaims, - that are used by this container. - \n This is an alpha field - and requires enabling the - DynamicResourceAllocation - feature gate. \n This field - is immutable. It can only - be set for containers." - items: - description: ResourceClaim - references one entry in - PodSpec.ResourceClaims. - properties: - name: - description: Name must - match the name of - one entry in pod.spec.resourceClaims - of the Pod where this - field is used. It - makes that resource - available inside a - container. - type: string - required: - - name - type: object - type: array - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Limits describes - the maximum amount of compute - resources allowed. More - info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Requests describes - the minimum amount of compute - resources required. If Requests - is omitted for a container, - it defaults to Limits if - that is explicitly specified, - otherwise to an implementation-defined - value. Requests cannot exceed - Limits. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' - type: object - type: object - selector: - description: selector is a label - query over volumes to consider - for binding. - properties: - matchExpressions: - description: matchExpressions - is a list of label selector - requirements. The requirements - are ANDed. - items: - description: A label selector - requirement is a selector - that contains values, - a key, and an operator - that relates the key and - values. - properties: - key: - description: key is - the label key that - the selector applies - to. - type: string - operator: - description: operator - represents a key's - relationship to a - set of values. Valid - operators are In, - NotIn, Exists and - DoesNotExist. - type: string - values: - description: values - is an array of string - values. If the operator - is In or NotIn, the - values array must - be non-empty. If the - operator is Exists - or DoesNotExist, the - values array must - be empty. This array - is replaced during - a strategic merge - patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is - a map of {key,value} pairs. - A single {key,value} in - the matchLabels map is equivalent - to an element of matchExpressions, - whose key field is "key", - the operator is "In", and - the values array contains - only "value". The requirements - are ANDed. - type: object - type: object - x-kubernetes-map-type: atomic - storageClassName: - description: 'storageClassName - is the name of the StorageClass - required by the claim. More - info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1' - type: string - volumeMode: - description: volumeMode defines - what type of volume is required - by the claim. Value of Filesystem - is implied when not included - in claim spec. - type: string - volumeName: - description: volumeName is the - binding reference to the PersistentVolume - backing this claim. - type: string - type: object - required: - - spec - type: object - type: object - fc: - description: fc represents a Fibre Channel - resource that is attached to a kubelet's - host machine and then exposed to the pod. - properties: - fsType: - description: 'fsType is the filesystem - type to mount. Must be a filesystem - type supported by the host operating - system. Ex. "ext4", "xfs", "ntfs". Implicitly - inferred to be "ext4" if unspecified. - TODO: how do we prevent errors in the - filesystem from compromising the machine' - type: string - lun: - description: 'lun is Optional: FC target - lun number' - format: int32 - type: integer - readOnly: - description: 'readOnly is Optional: Defaults - to false (read/write). ReadOnly here - will force the ReadOnly setting in VolumeMounts.' - type: boolean - targetWWNs: - description: 'targetWWNs is Optional: - FC target worldwide names (WWNs)' - items: - type: string - type: array - wwids: - description: 'wwids Optional: FC volume - world wide identifiers (wwids) Either - wwids or combination of targetWWNs and - lun must be set, but not both simultaneously.' - items: - type: string - type: array - type: object - flexVolume: - description: flexVolume represents a generic - volume resource that is provisioned/attached - using an exec based plugin. - properties: - driver: - description: driver is the name of the - driver to use for this volume. - type: string - fsType: - description: fsType is the filesystem - type to mount. Must be a filesystem - type supported by the host operating - system. Ex. "ext4", "xfs", "ntfs". The - default filesystem depends on FlexVolume - script. - type: string - options: - additionalProperties: - type: string - description: 'options is Optional: this - field holds extra command options if - any.' - type: object - readOnly: - description: 'readOnly is Optional: defaults - to false (read/write). ReadOnly here - will force the ReadOnly setting in VolumeMounts.' - type: boolean - secretRef: - description: 'secretRef is Optional: secretRef - is reference to the secret object containing - sensitive information to pass to the - plugin scripts. This may be empty if - no secret object is specified. If the - secret object contains more than one - secret, all secrets are passed to the - plugin scripts.' - properties: - name: - description: 'Name of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, - kind, uid?' - type: string - type: object - x-kubernetes-map-type: atomic - required: - - driver - type: object - flocker: - description: flocker represents a Flocker - volume attached to a kubelet's host machine. - This depends on the Flocker control service - being running - properties: - datasetName: - description: datasetName is Name of the - dataset stored as metadata -> name on - the dataset for Flocker should be considered - as deprecated - type: string - datasetUUID: - description: datasetUUID is the UUID of - the dataset. This is unique identifier - of a Flocker dataset - type: string - type: object - gcePersistentDisk: - description: 'gcePersistentDisk represents - a GCE Disk resource that is attached to - a kubelet''s host machine and then exposed - to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' - properties: - fsType: - description: 'fsType is filesystem type - of the volume that you want to mount. - Tip: Ensure that the filesystem type - is supported by the host operating system. - Examples: "ext4", "xfs", "ntfs". Implicitly - inferred to be "ext4" if unspecified. - More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk - TODO: how do we prevent errors in the - filesystem from compromising the machine' - type: string - partition: - description: 'partition is the partition - in the volume that you want to mount. - If omitted, the default is to mount - by volume name. Examples: For volume - /dev/sda1, you specify the partition - as "1". Similarly, the volume partition - for /dev/sda is "0" (or you can leave - the property empty). More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' - format: int32 - type: integer - pdName: - description: 'pdName is unique name of - the PD resource in GCE. Used to identify - the disk in GCE. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' - type: string - readOnly: - description: 'readOnly here will force - the ReadOnly setting in VolumeMounts. - Defaults to false. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' - type: boolean - required: - - pdName - type: object - gitRepo: - description: 'gitRepo represents a git repository - at a particular revision. DEPRECATED: GitRepo - is deprecated. To provision a container - with a git repo, mount an EmptyDir into - an InitContainer that clones the repo using - git, then mount the EmptyDir into the Pod''s - container.' - properties: - directory: - description: directory is the target directory - name. Must not contain or start with - '..'. If '.' is supplied, the volume - directory will be the git repository. Otherwise, - if specified, the volume will contain - the git repository in the subdirectory - with the given name. - type: string - repository: - description: repository is the URL - type: string - revision: - description: revision is the commit hash - for the specified revision. - type: string - required: - - repository - type: object - glusterfs: - description: 'glusterfs represents a Glusterfs - mount on the host that shares a pod''s lifetime. - More info: https://examples.k8s.io/volumes/glusterfs/README.md' - properties: - endpoints: - description: 'endpoints is the endpoint - name that details Glusterfs topology. - More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod' - type: string - path: - description: 'path is the Glusterfs volume - path. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod' - type: string - readOnly: - description: 'readOnly here will force - the Glusterfs volume to be mounted with - read-only permissions. Defaults to false. - More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod' - type: boolean - required: - - endpoints - - path - type: object - hostPath: - description: 'hostPath represents a pre-existing - file or directory on the host machine that - is directly exposed to the container. This - is generally used for system agents or other - privileged things that are allowed to see - the host machine. Most containers will NOT - need this. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath - --- TODO(jonesdl) We need to restrict who - can use host directory mounts and who can/can - not mount host directories as read/write.' - properties: - path: - description: 'path of the directory on - the host. If the path is a symlink, - it will follow the link to the real - path. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath' - type: string - type: - description: 'type for HostPath Volume - Defaults to "" More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath' - type: string - required: - - path - type: object - iscsi: - description: 'iscsi represents an ISCSI Disk - resource that is attached to a kubelet''s - host machine and then exposed to the pod. - More info: https://examples.k8s.io/volumes/iscsi/README.md' - properties: - chapAuthDiscovery: - description: chapAuthDiscovery defines - whether support iSCSI Discovery CHAP - authentication - type: boolean - chapAuthSession: - description: chapAuthSession defines whether - support iSCSI Session CHAP authentication - type: boolean - fsType: - description: 'fsType is the filesystem - type of the volume that you want to - mount. Tip: Ensure that the filesystem - type is supported by the host operating - system. Examples: "ext4", "xfs", "ntfs". - Implicitly inferred to be "ext4" if - unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#iscsi - TODO: how do we prevent errors in the - filesystem from compromising the machine' - type: string - initiatorName: - description: initiatorName is the custom - iSCSI Initiator Name. If initiatorName - is specified with iscsiInterface simultaneously, - new iSCSI interface : will be created for the connection. - type: string - iqn: - description: iqn is the target iSCSI Qualified - Name. - type: string - iscsiInterface: - description: iscsiInterface is the interface - Name that uses an iSCSI transport. Defaults - to 'default' (tcp). - type: string - lun: - description: lun represents iSCSI Target - Lun number. - format: int32 - type: integer - portals: - description: portals is the iSCSI Target - Portal List. The portal is either an - IP or ip_addr:port if the port is other - than default (typically TCP ports 860 - and 3260). - items: - type: string - type: array - readOnly: - description: readOnly here will force - the ReadOnly setting in VolumeMounts. - Defaults to false. - type: boolean - secretRef: - description: secretRef is the CHAP Secret - for iSCSI target and initiator authentication - properties: - name: - description: 'Name of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, - kind, uid?' - type: string - type: object - x-kubernetes-map-type: atomic - targetPortal: - description: targetPortal is iSCSI Target - Portal. The Portal is either an IP or - ip_addr:port if the port is other than - default (typically TCP ports 860 and - 3260). - type: string - required: - - iqn - - lun - - targetPortal - type: object - name: - description: 'name of the volume. Must be - a DNS_LABEL and unique within the pod. More - info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' - type: string - nfs: - description: 'nfs represents an NFS mount - on the host that shares a pod''s lifetime - More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' - properties: - path: - description: 'path that is exported by - the NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' - type: string - readOnly: - description: 'readOnly here will force - the NFS export to be mounted with read-only - permissions. Defaults to false. More - info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' - type: boolean - server: - description: 'server is the hostname or - IP address of the NFS server. More info: - https://kubernetes.io/docs/concepts/storage/volumes#nfs' - type: string - required: - - path - - server - type: object - persistentVolumeClaim: - description: 'persistentVolumeClaimVolumeSource - represents a reference to a PersistentVolumeClaim - in the same namespace. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims' - 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: readOnly Will force the ReadOnly - setting in VolumeMounts. Default false. - type: boolean - required: - - claimName - type: object - photonPersistentDisk: - description: photonPersistentDisk represents - a PhotonController persistent disk attached - and mounted on kubelets host machine - properties: - fsType: - description: fsType is the filesystem - type to mount. Must be a filesystem - type supported by the host operating - system. Ex. "ext4", "xfs", "ntfs". Implicitly - inferred to be "ext4" if unspecified. - type: string - pdID: - description: pdID is the ID that identifies - Photon Controller persistent disk - type: string - required: - - pdID - type: object - portworxVolume: - description: portworxVolume represents a portworx - volume attached and mounted on kubelets - host machine - 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: readOnly defaults to false - (read/write). ReadOnly here will force - the ReadOnly setting in VolumeMounts. - type: boolean - volumeID: - description: volumeID uniquely identifies - a Portworx volume - type: string - required: - - volumeID - type: object - projected: - description: projected items for all in one - resources secrets, configmaps, and downward - API - properties: - defaultMode: - description: defaultMode are the mode - bits used to set permissions on created - files by default. Must be an octal value - between 0000 and 0777 or a decimal value - between 0 and 511. YAML accepts both - octal and decimal values, JSON requires - decimal values for mode bits. Directories - within the path are not affected by - this setting. This might be in conflict - with other options that affect the file - mode, like fsGroup, and the result can - be other mode bits set. - format: int32 - type: integer - sources: - description: sources is the list of volume - projections - items: - description: Projection that may be - projected along with other supported - volume types - properties: - configMap: - description: configMap information - about the configMap data to project - properties: - items: - description: items if unspecified, - each key-value pair in the - Data field of the referenced - ConfigMap will be projected - into the volume as a file - whose name is the key and - content is the value. If specified, - the listed keys will be projected - into the specified paths, - and unlisted keys will not - be present. If a key is specified - which is not present in the - ConfigMap, the volume setup - will error unless it is marked - optional. Paths must be relative - and may not contain the '..' - path or start with '..'. - items: - description: Maps a string - key to a path within a volume. - properties: - key: - description: key is the - key to project. - type: string - mode: - description: 'mode is - Optional: mode bits - used to set permissions - on this file. Must be - an octal value between - 0000 and 0777 or a decimal - value between 0 and - 511. YAML accepts both - octal and decimal values, - JSON requires decimal - values for mode bits. - If not specified, the - volume defaultMode will - be used. This might - be in conflict with - other options that affect - the file mode, like - fsGroup, and the result - can be other mode bits - set.' - format: int32 - type: integer - path: - description: path is the - relative path of the - file to map the key - to. May not be an absolute - path. May not contain - the path element '..'. - May not start with the - string '..'. - type: string - required: - - key - - path - type: object - 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?' - type: string - optional: - description: optional specify - whether the ConfigMap or its - keys must be defined - type: boolean - type: object - x-kubernetes-map-type: atomic - downwardAPI: - description: downwardAPI information - about the downwardAPI data to - project - properties: - items: - description: Items is a list - of DownwardAPIVolume file - items: - description: DownwardAPIVolumeFile - represents information to - create the file containing - the pod field - properties: - fieldRef: - description: 'Required: - Selects a field of the - pod: only annotations, - labels, name and namespace - are supported.' - properties: - apiVersion: - description: Version - of the schema the - FieldPath is written - in terms of, defaults - to "v1". - type: string - fieldPath: - description: Path - of the field to - select in the specified - API version. - type: string - required: - - fieldPath - type: object - x-kubernetes-map-type: atomic - 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.' - format: int32 - 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 (limits.cpu, - limits.memory, requests.cpu - and requests.memory) - are currently supported.' - properties: - containerName: - description: 'Container - name: required for - volumes, optional - for env vars' - type: string - divisor: - anyOf: - - type: integer - - type: string - description: Specifies - the output format - of the exposed resources, - defaults to "1" - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - description: 'Required: - resource to select' - type: string - required: - - resource - type: object - x-kubernetes-map-type: atomic - required: - - path - type: object - type: array - type: object - secret: - description: secret information - about the secret data to project - properties: - items: - description: items if unspecified, - each key-value pair in the - Data field of the referenced - Secret will be projected into - the volume as a file whose - name is the key and content - is the value. If specified, - the listed keys will be projected - into the specified paths, - and unlisted keys will not - be present. If a key is specified - which is not present in the - Secret, the volume setup will - error unless it is marked - optional. Paths must be relative - and may not contain the '..' - path or start with '..'. - items: - description: Maps a string - key to a path within a volume. - properties: - key: - description: key is the - key to project. - type: string - mode: - description: 'mode is - Optional: mode bits - used to set permissions - on this file. Must be - an octal value between - 0000 and 0777 or a decimal - value between 0 and - 511. YAML accepts both - octal and decimal values, - JSON requires decimal - values for mode bits. - If not specified, the - volume defaultMode will - be used. This might - be in conflict with - other options that affect - the file mode, like - fsGroup, and the result - can be other mode bits - set.' - format: int32 - type: integer - path: - description: path is the - relative path of the - file to map the key - to. May not be an absolute - path. May not contain - the path element '..'. - May not start with the - string '..'. - type: string - required: - - key - - path - type: object - 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?' - type: string - optional: - description: optional field - specify whether the Secret - or its key must be defined - type: boolean - type: object - x-kubernetes-map-type: atomic - serviceAccountToken: - description: serviceAccountToken - is information about the serviceAccountToken - data to project - properties: - audience: - description: audience is the - intended audience of the token. - A recipient of a token must - identify itself with an identifier - specified in the audience - of the token, and otherwise - should reject the token. The - audience defaults to the identifier - of the apiserver. - type: string - expirationSeconds: - description: expirationSeconds - is the requested duration - of validity of the service - account token. As the token - approaches expiration, the - kubelet volume plugin will - proactively rotate the service - account token. The kubelet - will start trying to rotate - the token if the token is - older than 80 percent of its - time to live or if the token - is older than 24 hours.Defaults - to 1 hour and must be at least - 10 minutes. - format: int64 - type: integer - path: - description: path is the path - relative to the mount point - of the file to project the - token into. - type: string - required: - - path - type: object - type: object - type: array - type: object - quobyte: - description: quobyte represents a Quobyte - mount on the host that shares a pod's lifetime - properties: - group: - description: group to map volume access - to Default is no group - type: string - readOnly: - description: readOnly here will force - the Quobyte volume to be mounted with - read-only permissions. Defaults to false. - type: boolean - registry: - description: registry represents a single - or multiple Quobyte Registry services - specified as a string as host:port pair - (multiple entries are separated with - commas) which acts as the central registry - for volumes - type: string - tenant: - description: tenant owning the given Quobyte - volume in the Backend Used with dynamically - provisioned Quobyte volumes, value is - set by the plugin - type: string - user: - description: user to map volume access - to Defaults to serivceaccount user - type: string - volume: - description: volume is a string that references - an already created Quobyte volume by - name. - type: string - required: - - registry - - volume - type: object - rbd: - description: 'rbd represents a Rados Block - Device mount on the host that shares a pod''s - lifetime. More info: https://examples.k8s.io/volumes/rbd/README.md' - properties: - fsType: - description: 'fsType is the filesystem - type of the volume that you want to - mount. Tip: Ensure that the filesystem - type is supported by the host operating - system. Examples: "ext4", "xfs", "ntfs". - Implicitly inferred to be "ext4" if - unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#rbd - TODO: how do we prevent errors in the - filesystem from compromising the machine' - type: string - image: - description: 'image is the rados image - name. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' - type: string - keyring: - description: 'keyring is the path to key - ring for RBDUser. Default is /etc/ceph/keyring. - More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' - type: string - monitors: - description: 'monitors is 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: 'pool is the rados pool name. - Default is rbd. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' - type: string - readOnly: - description: 'readOnly here will force - the ReadOnly setting in VolumeMounts. - Defaults to false. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' - type: boolean - secretRef: - description: 'secretRef is name of the - authentication secret for RBDUser. If - provided overrides keyring. Default - is nil. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' - properties: - name: - description: 'Name of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, - kind, uid?' - type: string - type: object - x-kubernetes-map-type: atomic - user: - description: 'user is the rados user name. - Default is admin. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' - type: string - required: - - image - - monitors - type: object - scaleIO: - description: scaleIO represents a ScaleIO - persistent volume attached and mounted on - Kubernetes nodes. - properties: - fsType: - description: fsType is the filesystem - type to mount. Must be a filesystem - type supported by the host operating - system. Ex. "ext4", "xfs", "ntfs". Default - is "xfs". - type: string - gateway: - description: gateway is the host address - of the ScaleIO API Gateway. - type: string - protectionDomain: - description: protectionDomain is the name - of the ScaleIO Protection Domain for - the configured storage. - type: string - readOnly: - description: readOnly Defaults to false - (read/write). ReadOnly here will force - the ReadOnly setting in VolumeMounts. - type: boolean - secretRef: - description: secretRef references to the - secret for ScaleIO user and other sensitive - information. If this is not provided, - Login operation will fail. - properties: - name: - description: 'Name of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, - kind, uid?' - type: string - type: object - x-kubernetes-map-type: atomic - sslEnabled: - description: sslEnabled Flag enable/disable - SSL communication with Gateway, default - false - type: boolean - storageMode: - description: storageMode indicates whether - the storage for a volume should be ThickProvisioned - or ThinProvisioned. Default is ThinProvisioned. - type: string - storagePool: - description: storagePool is the ScaleIO - Storage Pool associated with the protection - domain. - type: string - system: - description: system is the name of the - storage system as configured in ScaleIO. - type: string - volumeName: - description: volumeName is the name of - a volume already created in the ScaleIO - system that is associated with this - volume source. - type: string - required: - - gateway - - secretRef - - system - type: object - secret: - description: 'secret represents a secret that - should populate this volume. More info: - https://kubernetes.io/docs/concepts/storage/volumes#secret' - properties: - defaultMode: - description: 'defaultMode is Optional: - mode bits used to set permissions on - created files by default. Must be an - octal value between 0000 and 0777 or - a decimal value between 0 and 511. YAML - accepts both octal and decimal values, - JSON requires decimal values for mode - bits. Defaults to 0644. Directories - within the path are not affected by - this setting. This might be in conflict - with other options that affect the file - mode, like fsGroup, and the result can - be other mode bits set.' - format: int32 - type: integer - items: - description: items If unspecified, each - key-value pair in the Data field of - the referenced Secret will be projected - into the volume as a file whose name - is the key and content is the value. - If specified, the listed keys will be - projected into the specified paths, - and unlisted keys will not be present. - If a key is specified which is not present - in the Secret, the volume setup will - error unless it is marked optional. - Paths must be relative and may not contain - the '..' path or start with '..'. - items: - description: Maps a string key to a - path within a volume. - properties: - key: - description: key is the key to project. - type: string - mode: - description: 'mode is Optional: - mode bits used to set permissions - on this file. Must be an octal - value between 0000 and 0777 or - a decimal value between 0 and - 511. YAML accepts both octal and - decimal values, JSON requires - decimal values for mode bits. - If not specified, the volume defaultMode - will be used. This might be in - conflict with other options that - affect the file mode, like fsGroup, - and the result can be other mode - bits set.' - format: int32 - type: integer - path: - description: path is the relative - path of the file to map the key - to. May not be an absolute path. - May not contain the path element - '..'. May not start with the string - '..'. - type: string - required: - - key - - path - type: object - type: array - optional: - description: optional field specify whether - the Secret or its keys must be defined - type: boolean - secretName: - description: 'secretName is the name of - the secret in the pod''s namespace to - use. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret' - type: string - type: object - storageos: - description: storageOS represents a StorageOS - volume attached and mounted on Kubernetes - nodes. - properties: - fsType: - description: fsType is the filesystem - type to mount. Must be a filesystem - type supported by the host operating - system. Ex. "ext4", "xfs", "ntfs". Implicitly - inferred to be "ext4" if unspecified. - type: string - readOnly: - description: readOnly defaults to false - (read/write). ReadOnly here will force - the ReadOnly setting in VolumeMounts. - type: boolean - secretRef: - description: secretRef specifies the secret - to use for obtaining the StorageOS API - credentials. If not specified, default - values will be attempted. - properties: - name: - description: 'Name of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, - kind, uid?' - type: string - type: object - x-kubernetes-map-type: atomic - volumeName: - description: volumeName is the human-readable - name of the StorageOS volume. Volume - names are only unique within a namespace. - type: string - volumeNamespace: - description: volumeNamespace specifies - the scope of the volume within StorageOS. If - no namespace is specified then the Pod's - namespace will be used. This allows - the Kubernetes name scoping to be mirrored - within StorageOS for tighter integration. - Set VolumeName to any name to override - the default behaviour. Set to "default" - if you are not using namespaces within - StorageOS. Namespaces that do not pre-exist - within StorageOS will be created. - type: string - type: object - vsphereVolume: - description: vsphereVolume represents a vSphere - volume attached and mounted on kubelets - host machine - properties: - fsType: - description: fsType is filesystem type - to mount. Must be a filesystem type - supported by the host operating system. - Ex. "ext4", "xfs", "ntfs". Implicitly - inferred to be "ext4" if unspecified. - type: string - storagePolicyID: - description: storagePolicyID is the storage - Policy Based Management (SPBM) profile - ID associated with the StoragePolicyName. - type: string - storagePolicyName: - description: storagePolicyName is the - storage Policy Based Management (SPBM) - profile name. - type: string - volumePath: - description: volumePath is the path that - identifies vSphere volume vmdk - type: string - required: - - volumePath - type: object - required: - - name - type: object - type: array - type: object - templateType: - type: string - timeChaos: - description: TimeChaosSpec defines the desired state - of TimeChaos - properties: - clockIds: - description: ClockIds defines all affected clock - id All available options are ["CLOCK_REALTIME","CLOCK_MONOTONIC","CLOCK_PROCESS_CPUTIME_ID","CLOCK_THREAD_CPUTIME_ID", - "CLOCK_MONOTONIC_RAW","CLOCK_REALTIME_COARSE","CLOCK_MONOTONIC_COARSE","CLOCK_BOOTTIME","CLOCK_REALTIME_ALARM", - "CLOCK_BOOTTIME_ALARM"] Default value is ["CLOCK_REALTIME"] - items: - type: string - type: array - containerNames: - description: ContainerNames indicates list of the - name of affected container. If not set, the first - container will be injected - items: - type: string - type: array - duration: - description: Duration represents the duration of - the chaos action - type: string - mode: - description: 'Mode defines the mode to run chaos - action. Supported mode: one / all / fixed / fixed-percent - / random-max-percent' - enum: - - one - - all - - fixed - - fixed-percent - - random-max-percent - type: string - remoteCluster: - description: RemoteCluster represents the remote - cluster where the chaos will be deployed - type: string - selector: - description: Selector is used to select pods that - are used to inject chaos action. - properties: - annotationSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select objects. A selector - based on annotations. - type: object - expressionSelectors: - description: a slice of label selector expressions - that can be used to select objects. A list - of selectors based on set-based label expressions. - items: - description: A label selector requirement - is a selector that contains values, a key, - and an operator that relates the key and - values. - properties: - key: - description: key is the label key that - the selector applies to. - type: string - operator: - description: operator represents a key's - relationship to a set of values. Valid - operators are In, NotIn, Exists and - DoesNotExist. - type: string - values: - description: values is an array of string - values. If the operator is In or NotIn, - the values array must be non-empty. - If the operator is Exists or DoesNotExist, - the values array must be empty. This - array is replaced during a strategic - merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - fieldSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select objects. A selector - based on fields. - type: object - labelSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select objects. A selector - based on labels. - type: object - namespaces: - description: Namespaces is a set of namespace - to which objects belong. - items: - type: string - type: array - nodeSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select nodes. Selector which - must match a node's labels, and objects must - belong to these selected nodes. - type: object - nodes: - description: Nodes is a set of node name and - objects must belong to these nodes. - items: - type: string - type: array - podPhaseSelectors: - description: 'PodPhaseSelectors is a set of - condition of a pod at the current time. supported - value: Pending / Running / Succeeded / Failed - / Unknown' - items: - type: string - type: array - pods: - additionalProperties: - items: - type: string - type: array - description: Pods is a map of string keys and - a set values that used to select pods. The - key defines the namespace which pods belong, - and the each values is a set of pod names. - type: object - type: object - timeOffset: - description: TimeOffset defines the delta time of - injected program. It's a possibly signed sequence - of decimal numbers, such as "300ms", "-1.5h" or - "2h45m". Valid time units are "ns", "us" (or "µs"), - "ms", "s", "m", "h". - type: string - value: - description: Value is required when the mode is - set to `FixedMode` / `FixedPercentMode` / `RandomMaxPercentMode`. - If `FixedMode`, provide an integer of pods to - do chaos action. If `FixedPercentMode`, provide - a number from 0-100 to specify the percent of - pods the server can do chaos action. IF `RandomMaxPercentMode`, provide - a number from 0-100 to specify the max percent - of pods to do chaos action - type: string - required: - - mode - - selector - - timeOffset - type: object - required: - - name - - templateType - type: object - type: array - required: - - entry - - templates - type: object - required: - - schedule - - type - type: object - startTime: - format: date-time - type: string - statusCheck: - description: StatusCheck describe the behavior of StatusCheck. Only - used when Type is TypeStatusCheck. - properties: - duration: - description: Duration defines the duration of the whole status - check if the number of failed execution does not exceed the - failure threshold. Duration is available to both `Synchronous` - and `Continuous` mode. A duration string is a possibly signed - sequence of decimal numbers, each with optional fraction and - a unit suffix, such as "300ms", "-1.5h" or "2h45m". Valid time - units are "ns", "us" (or "µs"), "ms", "s", "m", "h". - type: string - failureThreshold: - default: 3 - description: FailureThreshold defines the minimum consecutive - failure for the status check to be considered failed. - minimum: 1 - type: integer - http: - properties: - body: - type: string - criteria: - description: Criteria defines how to determine the result - of the status check. - properties: - statusCode: - description: StatusCode defines the expected http status - code for the request. A statusCode string could be a - single code (e.g. 200), or an inclusive range (e.g. - 200-400, both `200` and `400` are included). - type: string - required: - - statusCode - type: object - headers: - additionalProperties: - items: - type: string - type: array - description: "A Header represents the key-value pairs in an - HTTP header. \n The keys should be in canonical form, as - returned by CanonicalHeaderKey." - type: object - method: - default: GET - enum: - - GET - - POST - type: string - url: - type: string - required: - - criteria - - url - type: object - intervalSeconds: - default: 10 - description: IntervalSeconds defines how often (in seconds) to - perform an execution of status check. - minimum: 1 - type: integer - mode: - description: 'Mode defines the execution mode of the status check. - Support type: Synchronous / Continuous' - enum: - - Synchronous - - Continuous - type: string - recordsHistoryLimit: - default: 100 - description: RecordsHistoryLimit defines the number of record - to retain. - maximum: 1000 - minimum: 1 - type: integer - successThreshold: - default: 1 - description: SuccessThreshold defines the minimum consecutive - successes for the status check to be considered successful. - SuccessThreshold only works for `Synchronous` mode. - minimum: 1 - type: integer - timeoutSeconds: - default: 1 - description: TimeoutSeconds defines the number of seconds after - which an execution of status check times out. - minimum: 1 - type: integer - type: - default: HTTP - description: 'Type defines the specific status check type. Support - type: HTTP' - enum: - - HTTP - type: string - required: - - type - type: object - stressChaos: - description: StressChaosSpec defines the desired state of StressChaos - properties: - containerNames: - description: ContainerNames indicates list of the name of affected - container. If not set, the first container will be injected - items: - type: string - type: array - duration: - description: Duration represents the duration of the chaos action - type: string - mode: - description: 'Mode defines the mode to run chaos action. Supported - mode: one / all / fixed / fixed-percent / random-max-percent' - enum: - - one - - all - - fixed - - fixed-percent - - random-max-percent - type: string - remoteCluster: - description: RemoteCluster represents the remote cluster where - the chaos will be deployed - type: string - selector: - description: Selector is used to select pods that are used to - inject chaos action. - properties: - annotationSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be used - to select objects. A selector based on annotations. - type: object - expressionSelectors: - description: a slice of label selector expressions that can - be used to select objects. A list of selectors based on - set-based label expressions. - items: - description: A label selector requirement is a selector - that contains values, a key, and an operator that relates - the key and values. - properties: - key: - description: key is the label key that the selector - applies to. - type: string - operator: - description: operator represents a key's relationship - to a set of values. Valid operators are In, NotIn, - Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. If - the operator is In or NotIn, the values array must - be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. This array is replaced - during a strategic merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - fieldSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be used - to select objects. A selector based on fields. - type: object - labelSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be used - to select objects. A selector based on labels. - type: object - namespaces: - description: Namespaces is a set of namespace to which objects - belong. - items: - type: string - type: array - nodeSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be used - to select nodes. Selector which must match a node's labels, - and objects must belong to these selected nodes. - type: object - nodes: - description: Nodes is a set of node name and objects must - belong to these nodes. - items: - type: string - type: array - podPhaseSelectors: - description: 'PodPhaseSelectors is a set of condition of a - pod at the current time. supported value: Pending / Running - / Succeeded / Failed / Unknown' - items: - type: string - type: array - pods: - additionalProperties: - items: - type: string - type: array - description: Pods is a map of string keys and a set values - that used to select pods. The key defines the namespace - which pods belong, and the each values is a set of pod names. - type: object - type: object - stressngStressors: - description: StressngStressors defines plenty of stressors just - like `Stressors` except that it's an experimental feature and - more powerful. You can define stressors in `stress-ng` (see - also `man stress-ng`) dialect, however not all of the supported - stressors are well tested. It maybe retired in later releases. - You should always use `Stressors` to define the stressors and - use this only when you want more stressors unsupported by `Stressors`. - When both `StressngStressors` and `Stressors` are defined, `StressngStressors` - wins. - type: string - stressors: - description: Stressors defines plenty of stressors supported to - stress system components out. You can use one or more of them - to make up various kinds of stresses. At least one of the stressors - should be specified. - properties: - cpu: - description: CPUStressor stresses CPU out - properties: - load: - description: Load specifies P percent loading per CPU - worker. 0 is effectively a sleep (no load) and 100 is - full loading. - maximum: 100 - minimum: 0 - type: integer - options: - description: extend stress-ng options - items: - type: string - type: array - workers: - description: Workers specifies N workers to apply the - stressor. Maximum 8192 workers can run by stress-ng - maximum: 8192 - type: integer - required: - - workers - type: object - memory: - description: MemoryStressor stresses virtual memory out - properties: - oomScoreAdj: - default: 0 - description: OOMScoreAdj sets the oom_score_adj of the - stress process. See `man 5 proc` to know more about - this option. - maximum: 1000 - minimum: -1000 - type: integer - options: - description: extend stress-ng options - items: - type: string - type: array - size: - description: Size 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 - workers: - description: Workers specifies N workers to apply the - stressor. Maximum 8192 workers can run by stress-ng - maximum: 8192 - type: integer - required: - - workers - type: object - type: object - value: - description: Value is required when the mode is set to `FixedMode` - / `FixedPercentMode` / `RandomMaxPercentMode`. If `FixedMode`, - provide an integer of pods to do chaos action. If `FixedPercentMode`, - provide a number from 0-100 to specify the percent of pods the - server can do chaos action. IF `RandomMaxPercentMode`, provide - a number from 0-100 to specify the max percent of pods to do - chaos action - type: string - required: - - mode - - selector - type: object - task: - properties: - container: - description: Container is the main container image to run in the - pod - properties: - args: - description: 'Arguments to the entrypoint. The container image''s - CMD is used if this is not provided. Variable references - $(VAR_NAME) are expanded using the container''s environment. - If a variable cannot be resolved, the reference in the input - string will be unchanged. Double $$ are reduced to a single - $, which allows for escaping the $(VAR_NAME) syntax: i.e. - "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". - Escaped references will never be expanded, regardless of - whether the variable exists or not. Cannot be updated. More - info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell' - items: - type: string - type: array - command: - description: 'Entrypoint array. Not executed within a shell. - The container image''s ENTRYPOINT is used if this is not - provided. Variable references $(VAR_NAME) are expanded using - the container''s environment. If a variable cannot be resolved, - the reference in the input string will be unchanged. Double - $$ are reduced to a single $, which allows for escaping - the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce - the string literal "$(VAR_NAME)". Escaped references will - never be expanded, regardless of whether the variable exists - or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell' - items: - type: string - type: array - env: - description: List of environment variables to set in the container. - Cannot be updated. - items: - description: EnvVar represents an environment variable present - in a Container. - properties: - name: - description: Name of the environment variable. Must - be a C_IDENTIFIER. - type: string - value: - description: 'Variable references $(VAR_NAME) are expanded - using the previously defined environment variables - in the container and any service environment variables. - If a variable cannot be resolved, the reference in - the input string will be unchanged. Double $$ are - reduced to a single $, which allows for escaping the - $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce - the string literal "$(VAR_NAME)". Escaped references - will never be expanded, regardless of whether the - variable exists or not. Defaults to "".' - type: string - valueFrom: - description: Source for the environment variable's value. - Cannot be used if value is not empty. - properties: - configMapKeyRef: - description: Selects a key of a ConfigMap. - properties: - key: - description: The key to select. - type: string - name: - description: 'Name of the referent. More info: - https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, - kind, uid?' - type: string - optional: - description: Specify whether the ConfigMap or - its key must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - fieldRef: - description: 'Selects a field of the pod: supports - metadata.name, metadata.namespace, `metadata.labels['''']`, - `metadata.annotations['''']`, spec.nodeName, - spec.serviceAccountName, status.hostIP, status.podIP, - status.podIPs.' - properties: - apiVersion: - description: Version of the schema the FieldPath - is written in terms of, defaults to "v1". - type: string - fieldPath: - description: Path of the field to select in - the specified API version. - type: string - required: - - fieldPath - type: object - x-kubernetes-map-type: atomic - resourceFieldRef: - description: 'Selects a resource of the container: - only resources limits and requests (limits.cpu, - limits.memory, limits.ephemeral-storage, requests.cpu, - requests.memory and requests.ephemeral-storage) - are currently supported.' - properties: - containerName: - description: 'Container name: required for volumes, - optional for env vars' - type: string - divisor: - anyOf: - - type: integer - - type: string - description: Specifies the output format of - the exposed resources, defaults to "1" - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - description: 'Required: resource to select' - type: string - required: - - resource - type: object - x-kubernetes-map-type: atomic - secretKeyRef: - description: Selects a key of a secret in the pod's - namespace - properties: - key: - description: The key of the secret to select - from. Must be a valid secret key. - type: string - name: - description: 'Name of the referent. More info: - https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, - kind, uid?' - type: string - optional: - description: Specify whether the Secret or its - key must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - type: object - required: - - name - type: object - type: array - envFrom: - description: List of sources to populate environment variables - in the container. The keys defined within a source must - be a C_IDENTIFIER. All invalid keys will be reported as - an event when the container is starting. When a key exists - in multiple sources, the value associated with the last - source will take precedence. Values defined by an Env with - a duplicate key will take precedence. Cannot be updated. - items: - description: EnvFromSource represents the source of a set - of ConfigMaps - properties: - configMapRef: - description: The ConfigMap to select from - properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' - type: string - optional: - description: Specify whether the ConfigMap must - be defined - type: boolean - type: object - x-kubernetes-map-type: atomic - prefix: - description: An optional identifier to prepend to each - key in the ConfigMap. Must be a C_IDENTIFIER. - type: string - secretRef: - description: The Secret to select from - properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' - type: string - optional: - description: Specify whether the Secret must be - defined - type: boolean - type: object - x-kubernetes-map-type: atomic - type: object - type: array - image: - description: 'Container image name. More info: https://kubernetes.io/docs/concepts/containers/images - This field is optional to allow higher level config management - to default or override container images in workload controllers - like Deployments and StatefulSets.' - type: string - imagePullPolicy: - description: 'Image pull policy. One of Always, Never, IfNotPresent. - Defaults to Always if :latest tag is specified, or IfNotPresent - otherwise. Cannot be updated. More info: https://kubernetes.io/docs/concepts/containers/images#updating-images' - type: string - lifecycle: - description: Actions that the management system should take - in response to container lifecycle events. Cannot be updated. - properties: - postStart: - description: 'PostStart is called immediately after a - container is created. If the handler fails, the container - is terminated and restarted according to its restart - policy. Other management of the container blocks until - the hook completes. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks' - properties: - exec: - description: Exec specifies the action to take. - properties: - command: - description: Command is the command line to execute - inside the container, the working directory - for the command is root ('/') in the container's - filesystem. The command is simply exec'd, it - is not run inside a shell, so traditional shell - instructions ('|', etc) won't work. To use a - shell, you need to explicitly call out to that - shell. Exit status of 0 is treated as live/healthy - and non-zero is unhealthy. - items: - type: string - type: array - type: object - httpGet: - description: HTTPGet specifies the http request to - perform. - properties: - host: - description: Host name to connect to, defaults - to the pod IP. You probably want to set "Host" - in httpHeaders instead. - type: string - httpHeaders: - description: Custom headers to set in the request. - HTTP allows repeated headers. - items: - description: HTTPHeader describes a custom header - to be used in HTTP probes - properties: - name: - description: The header field name. This - will be canonicalized upon output, so - case-variant names will be understood - as the same header. - type: string - value: - description: The header field value - type: string - required: - - name - - value - type: object - type: array - path: - description: Path to access on the HTTP server. - type: string - port: - anyOf: - - type: integer - - type: string - description: Name or number of the port to access - on the container. Number must be in the range - 1 to 65535. Name must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - scheme: - description: Scheme to use for connecting to the - host. Defaults to HTTP. - type: string - required: - - port - type: object - tcpSocket: - description: Deprecated. TCPSocket is NOT supported - as a LifecycleHandler and kept for the backward - compatibility. There are no validation of this field - and lifecycle hooks will fail in runtime when tcp - handler is specified. - properties: - host: - description: 'Optional: Host name to connect to, - defaults to the pod IP.' - type: string - port: - anyOf: - - type: integer - - type: string - description: Number or name of the port to access - on the container. Number must be in the range - 1 to 65535. Name must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - required: - - port - type: object - type: object - preStop: - description: 'PreStop is called immediately before a container - is terminated due to an API request or management event - such as liveness/startup probe failure, preemption, - resource contention, etc. The handler is not called - if the container crashes or exits. The Pod''s termination - grace period countdown begins before the PreStop hook - is executed. Regardless of the outcome of the handler, - the container will eventually terminate within the Pod''s - termination grace period (unless delayed by finalizers). - Other management of the container blocks until the hook - completes or until the termination grace period is reached. - More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks' - properties: - exec: - description: Exec specifies the action to take. - properties: - command: - description: Command is the command line to execute - inside the container, the working directory - for the command is root ('/') in the container's - filesystem. The command is simply exec'd, it - is not run inside a shell, so traditional shell - instructions ('|', etc) won't work. To use a - shell, you need to explicitly call out to that - shell. Exit status of 0 is treated as live/healthy - and non-zero is unhealthy. - items: - type: string - type: array - type: object - httpGet: - description: HTTPGet specifies the http request to - perform. - properties: - host: - description: Host name to connect to, defaults - to the pod IP. You probably want to set "Host" - in httpHeaders instead. - type: string - httpHeaders: - description: Custom headers to set in the request. - HTTP allows repeated headers. - items: - description: HTTPHeader describes a custom header - to be used in HTTP probes - properties: - name: - description: The header field name. This - will be canonicalized upon output, so - case-variant names will be understood - as the same header. - type: string - value: - description: The header field value - type: string - required: - - name - - value - type: object - type: array - path: - description: Path to access on the HTTP server. - type: string - port: - anyOf: - - type: integer - - type: string - description: Name or number of the port to access - on the container. Number must be in the range - 1 to 65535. Name must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - scheme: - description: Scheme to use for connecting to the - host. Defaults to HTTP. - type: string - required: - - port - type: object - tcpSocket: - description: Deprecated. TCPSocket is NOT supported - as a LifecycleHandler and kept for the backward - compatibility. There are no validation of this field - and lifecycle hooks will fail in runtime when tcp - handler is specified. - properties: - host: - description: 'Optional: Host name to connect to, - defaults to the pod IP.' - type: string - port: - anyOf: - - type: integer - - type: string - description: Number or name of the port to access - on the container. Number must be in the range - 1 to 65535. Name must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - required: - - port - type: object - type: object - type: object - livenessProbe: - description: 'Periodic probe of container liveness. Container - will be restarted if the probe fails. Cannot be updated. - More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' - properties: - exec: - description: Exec specifies the action to take. - properties: - command: - description: Command is the command line to execute - inside the container, the working directory for - the command is root ('/') in the container's filesystem. - The command is simply exec'd, it is not run inside - a shell, so traditional shell instructions ('|', - etc) won't work. To use a shell, you need to explicitly - call out to that shell. Exit status of 0 is treated - as live/healthy and non-zero is unhealthy. - items: - type: string - type: array - type: object - failureThreshold: - description: Minimum consecutive failures for the probe - to be considered failed after having succeeded. Defaults - to 3. Minimum value is 1. - format: int32 - type: integer - grpc: - description: GRPC specifies an action involving a GRPC - port. - properties: - port: - description: Port number of the gRPC service. Number - must be in the range 1 to 65535. - format: int32 - type: integer - service: - description: "Service is the name of the service to - place in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). - \n If this is not specified, the default behavior - is defined by gRPC." - type: string - required: - - port - type: object - httpGet: - description: HTTPGet specifies the http request to perform. - properties: - host: - description: Host name to connect to, defaults to - the pod IP. You probably want to set "Host" in httpHeaders - instead. - type: string - httpHeaders: - description: Custom headers to set in the request. - HTTP allows repeated headers. - items: - description: HTTPHeader describes a custom header - to be used in HTTP probes - properties: - name: - description: The header field name. This will - be canonicalized upon output, so case-variant - names will be understood as the same header. - type: string - value: - description: The header field value - type: string - required: - - name - - value - type: object - type: array - path: - description: Path to access on the HTTP server. - type: string - port: - anyOf: - - type: integer - - type: string - description: Name or number of the port to access - on the container. Number must be in the range 1 - to 65535. Name must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - scheme: - description: Scheme to use for connecting to the host. - Defaults to HTTP. - type: string - required: - - port - type: object - initialDelaySeconds: - description: 'Number of seconds after the container has - started before liveness probes are initiated. More info: - https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' - format: int32 - type: integer - periodSeconds: - description: How often (in seconds) to perform the probe. - Default to 10 seconds. Minimum value is 1. - format: int32 - type: integer - successThreshold: - description: Minimum consecutive successes for the probe - to be considered successful after having failed. Defaults - to 1. Must be 1 for liveness and startup. Minimum value - is 1. - format: int32 - type: integer - tcpSocket: - description: TCPSocket specifies an action involving a - TCP port. - properties: - host: - description: 'Optional: Host name to connect to, defaults - to the pod IP.' - type: string - port: - anyOf: - - type: integer - - type: string - description: Number or name of the port to access - on the container. Number must be in the range 1 - to 65535. Name must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - required: - - port - type: object - terminationGracePeriodSeconds: - description: Optional duration in seconds the pod needs - to terminate gracefully upon probe failure. The grace - period is the duration in seconds after the processes - running in the pod are sent a termination signal and - the time when the processes are forcibly halted with - a kill signal. Set this value longer than the expected - cleanup time for your process. If this value is nil, - the pod's terminationGracePeriodSeconds will be used. - Otherwise, this value overrides the value provided by - the pod spec. Value must be non-negative integer. The - value zero indicates stop immediately via the kill signal - (no opportunity to shut down). This is a beta field - and requires enabling ProbeTerminationGracePeriod feature - gate. Minimum value is 1. spec.terminationGracePeriodSeconds - is used if unset. - format: int64 - type: integer - timeoutSeconds: - description: 'Number of seconds after which the probe - times out. Defaults to 1 second. Minimum value is 1. - More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' - format: int32 - type: integer - type: object - name: - description: Name of the container specified as a DNS_LABEL. - Each container in a pod must have a unique name (DNS_LABEL). - Cannot be updated. - type: string - ports: - description: List of ports to expose from the container. Not - specifying a port here DOES NOT prevent that port from being - exposed. Any port which is listening on the default "0.0.0.0" - address inside a container will be accessible from the network. - Modifying this array with strategic merge patch may corrupt - the data. For more information See https://github.com/kubernetes/kubernetes/issues/108255. - Cannot be updated. - items: - description: ContainerPort represents a network port in - a single container. - properties: - containerPort: - description: Number of port to expose on the pod's IP - address. This must be a valid port number, 0 < x < - 65536. - format: int32 - type: integer - hostIP: - description: What host IP to bind the external port - to. - type: string - hostPort: - description: Number of port to expose on the host. If - specified, this must be a valid port number, 0 < x - < 65536. If HostNetwork is specified, this must match - ContainerPort. Most containers do not need this. - format: int32 - type: integer - name: - description: If specified, this must be an IANA_SVC_NAME - and unique within the pod. Each named port in a pod - must have a unique name. Name for the port that can - be referred to by services. - type: string - protocol: - default: TCP - description: Protocol for port. Must be UDP, TCP, or - SCTP. Defaults to "TCP". - type: string - required: - - containerPort - type: object - type: array - x-kubernetes-list-map-keys: - - containerPort - - protocol - x-kubernetes-list-type: map - readinessProbe: - description: 'Periodic probe of container service readiness. - Container will be removed from service endpoints if the - probe fails. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' - properties: - exec: - description: Exec specifies the action to take. - properties: - command: - description: Command is the command line to execute - inside the container, the working directory for - the command is root ('/') in the container's filesystem. - The command is simply exec'd, it is not run inside - a shell, so traditional shell instructions ('|', - etc) won't work. To use a shell, you need to explicitly - call out to that shell. Exit status of 0 is treated - as live/healthy and non-zero is unhealthy. - items: - type: string - type: array - type: object - failureThreshold: - description: Minimum consecutive failures for the probe - to be considered failed after having succeeded. Defaults - to 3. Minimum value is 1. - format: int32 - type: integer - grpc: - description: GRPC specifies an action involving a GRPC - port. - properties: - port: - description: Port number of the gRPC service. Number - must be in the range 1 to 65535. - format: int32 - type: integer - service: - description: "Service is the name of the service to - place in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). - \n If this is not specified, the default behavior - is defined by gRPC." - type: string - required: - - port - type: object - httpGet: - description: HTTPGet specifies the http request to perform. - properties: - host: - description: Host name to connect to, defaults to - the pod IP. You probably want to set "Host" in httpHeaders - instead. - type: string - httpHeaders: - description: Custom headers to set in the request. - HTTP allows repeated headers. - items: - description: HTTPHeader describes a custom header - to be used in HTTP probes - properties: - name: - description: The header field name. This will - be canonicalized upon output, so case-variant - names will be understood as the same header. - type: string - value: - description: The header field value - type: string - required: - - name - - value - type: object - type: array - path: - description: Path to access on the HTTP server. - type: string - port: - anyOf: - - type: integer - - type: string - description: Name or number of the port to access - on the container. Number must be in the range 1 - to 65535. Name must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - scheme: - description: Scheme to use for connecting to the host. - Defaults to HTTP. - type: string - required: - - port - type: object - initialDelaySeconds: - description: 'Number of seconds after the container has - started before liveness probes are initiated. More info: - https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' - format: int32 - type: integer - periodSeconds: - description: How often (in seconds) to perform the probe. - Default to 10 seconds. Minimum value is 1. - format: int32 - type: integer - successThreshold: - description: Minimum consecutive successes for the probe - to be considered successful after having failed. Defaults - to 1. Must be 1 for liveness and startup. Minimum value - is 1. - format: int32 - type: integer - tcpSocket: - description: TCPSocket specifies an action involving a - TCP port. - properties: - host: - description: 'Optional: Host name to connect to, defaults - to the pod IP.' - type: string - port: - anyOf: - - type: integer - - type: string - description: Number or name of the port to access - on the container. Number must be in the range 1 - to 65535. Name must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - required: - - port - type: object - terminationGracePeriodSeconds: - description: Optional duration in seconds the pod needs - to terminate gracefully upon probe failure. The grace - period is the duration in seconds after the processes - running in the pod are sent a termination signal and - the time when the processes are forcibly halted with - a kill signal. Set this value longer than the expected - cleanup time for your process. If this value is nil, - the pod's terminationGracePeriodSeconds will be used. - Otherwise, this value overrides the value provided by - the pod spec. Value must be non-negative integer. The - value zero indicates stop immediately via the kill signal - (no opportunity to shut down). This is a beta field - and requires enabling ProbeTerminationGracePeriod feature - gate. Minimum value is 1. spec.terminationGracePeriodSeconds - is used if unset. - format: int64 - type: integer - timeoutSeconds: - description: 'Number of seconds after which the probe - times out. Defaults to 1 second. Minimum value is 1. - More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' - format: int32 - type: integer - type: object - resizePolicy: - description: Resources resize policy for the container. - items: - description: ContainerResizePolicy represents resource resize - policy for the container. - properties: - resourceName: - description: 'Name of the resource to which this resource - resize policy applies. Supported values: cpu, memory.' - type: string - restartPolicy: - description: Restart policy to apply when specified - resource is resized. If not specified, it defaults - to NotRequired. - type: string - required: - - resourceName - - restartPolicy - type: object - type: array - x-kubernetes-list-type: atomic - resources: - description: 'Compute Resources required by this container. - Cannot be updated. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' - properties: - claims: - description: "Claims lists the names of resources, defined - in spec.resourceClaims, that are used by this container. - \n This is an alpha field and requires enabling the - DynamicResourceAllocation feature gate. \n This field - is immutable. It can only be set for containers." - items: - description: ResourceClaim references one entry in PodSpec.ResourceClaims. - properties: - name: - description: Name must match the name of one entry - in pod.spec.resourceClaims of the Pod where this - field is used. It makes that resource available - inside a container. - type: string - required: - - name - type: object - type: array - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Limits describes the maximum amount of compute - resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Requests describes the minimum amount of - compute resources required. If Requests is omitted for - a container, it defaults to Limits if that is explicitly - specified, otherwise to an implementation-defined value. - Requests cannot exceed Limits. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' - type: object - type: object - restartPolicy: - description: 'RestartPolicy defines the restart behavior of - individual containers in a pod. This field may only be set - for init containers, and the only allowed value is "Always". - For non-init containers or when this field is not specified, - the restart behavior is defined by the Pod''s restart policy - and the container type. Setting the RestartPolicy as "Always" - for the init container will have the following effect: this - init container will be continually restarted on exit until - all regular containers have terminated. Once all regular - containers have completed, all init containers with restartPolicy - "Always" will be shut down. This lifecycle differs from - normal init containers and is often referred to as a "sidecar" - container. Although this init container still starts in - the init container sequence, it does not wait for the container - to complete before proceeding to the next init container. - Instead, the next init container starts immediately after - this init container is started, or after any startupProbe - has successfully completed.' - type: string - 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/' - properties: - allowPrivilegeEscalation: - description: 'AllowPrivilegeEscalation controls whether - a process can gain more privileges than its parent process. - This bool directly controls if the no_new_privs flag - will be set on the container process. AllowPrivilegeEscalation - is true always when the container is: 1) run as Privileged - 2) has CAP_SYS_ADMIN Note that this field cannot be - set when spec.os.name is windows.' - type: boolean - capabilities: - description: The capabilities to add/drop when running - containers. Defaults to the default set of capabilities - granted by the container runtime. Note that this field - cannot be set when spec.os.name is windows. - properties: - add: - description: Added capabilities - items: - description: Capability represent POSIX capabilities - type - type: string - type: array - drop: - description: Removed capabilities - items: - description: Capability represent POSIX capabilities - type - type: string - type: array - type: object - privileged: - description: Run container in privileged mode. Processes - in privileged containers are essentially equivalent - to root on the host. Defaults to false. Note that this - field cannot be set when spec.os.name is windows. - type: boolean - procMount: - description: procMount denotes the type of proc mount - to use for the containers. The default is DefaultProcMount - which uses the container runtime defaults for readonly - paths and masked paths. This requires the ProcMountType - feature flag to be enabled. Note that this field cannot - be set when spec.os.name is windows. - type: string - readOnlyRootFilesystem: - description: Whether this container has a read-only root - filesystem. Default is false. Note that this field cannot - be set when spec.os.name is windows. - type: boolean - runAsGroup: - description: The GID to run the entrypoint of the container - process. Uses runtime default if unset. May also be - set in PodSecurityContext. If set in both SecurityContext - and PodSecurityContext, the value specified in SecurityContext - takes precedence. Note that this field cannot be set - when spec.os.name is windows. - format: int64 - type: integer - runAsNonRoot: - description: Indicates that the container must run as - a non-root user. If true, the Kubelet will validate - the image at runtime to ensure that it does not run - as UID 0 (root) and fail to start the container if it - does. If unset or false, no such validation will be - performed. May also be set in PodSecurityContext. If - set in both SecurityContext and PodSecurityContext, - the value specified in SecurityContext takes precedence. - type: boolean - runAsUser: - description: The UID to run the entrypoint of the container - process. Defaults to user specified in image metadata - if unspecified. May also be set in PodSecurityContext. If - set in both SecurityContext and PodSecurityContext, - the value specified in SecurityContext takes precedence. - Note that this field cannot be set when spec.os.name - is windows. - format: int64 - type: integer - seLinuxOptions: - description: The SELinux context to be applied to the - container. If unspecified, the container runtime will - allocate a random SELinux context for each container. May - also be set in PodSecurityContext. If set in both SecurityContext - and PodSecurityContext, the value specified in SecurityContext - takes precedence. Note that this field cannot be set - when spec.os.name is windows. - properties: - level: - description: Level is SELinux level label that applies - to the container. - type: string - role: - description: Role is a SELinux role label that applies - to the container. - type: string - type: - description: Type is a SELinux type label that applies - to the container. - type: string - user: - description: User is a SELinux user label that applies - to the container. - type: string - type: object - seccompProfile: - description: The seccomp options to use by this container. - If seccomp options are provided at both the pod & container - level, the container options override the pod options. - Note that this field cannot be set when spec.os.name - is windows. - properties: - localhostProfile: - description: localhostProfile indicates a profile - defined in a file on the node should be used. The - profile must be preconfigured on the node to work. - Must be a descending path, relative to the kubelet's - configured seccomp profile location. Must be set - if type is "Localhost". Must NOT be set for any - other type. - type: string - type: - description: "type indicates which kind of seccomp - profile will be applied. Valid options are: \n Localhost - - a profile defined in a file on the node should - be used. RuntimeDefault - the container runtime - default profile should be used. Unconfined - no - profile should be applied." - type: string - required: - - type - type: object - windowsOptions: - description: The Windows specific settings applied to - all containers. If unspecified, the options from the - PodSecurityContext will be used. If set in both SecurityContext - and PodSecurityContext, the value specified in SecurityContext - takes precedence. Note that this field cannot be set - when spec.os.name is linux. - properties: - gmsaCredentialSpec: - description: GMSACredentialSpec is where the GMSA - admission webhook (https://github.com/kubernetes-sigs/windows-gmsa) - inlines the contents of the GMSA credential spec - named by the GMSACredentialSpecName field. - type: string - gmsaCredentialSpecName: - description: GMSACredentialSpecName is the name of - the GMSA credential spec to use. - type: string - hostProcess: - description: HostProcess determines if a container - should be run as a 'Host Process' container. All - of a Pod's containers must have the same effective - HostProcess value (it is not allowed to have a mix - of HostProcess containers and non-HostProcess containers). - In addition, if HostProcess is true then HostNetwork - must also be set to true. - type: boolean - runAsUserName: - description: The UserName in Windows to run the entrypoint - of the container process. Defaults to the user specified - in image metadata if unspecified. May also be set - in PodSecurityContext. If set in both SecurityContext - and PodSecurityContext, the value specified in SecurityContext - takes precedence. - type: string - type: object - type: object - startupProbe: - description: 'StartupProbe indicates that the Pod has successfully - initialized. If specified, no other probes are executed - until this completes successfully. If this probe fails, - the Pod will be restarted, just as if the livenessProbe - failed. This can be used to provide different probe parameters - at the beginning of a Pod''s lifecycle, when it might take - a long time to load data or warm a cache, than during steady-state - operation. This cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' - properties: - exec: - description: Exec specifies the action to take. - properties: - command: - description: Command is the command line to execute - inside the container, the working directory for - the command is root ('/') in the container's filesystem. - The command is simply exec'd, it is not run inside - a shell, so traditional shell instructions ('|', - etc) won't work. To use a shell, you need to explicitly - call out to that shell. Exit status of 0 is treated - as live/healthy and non-zero is unhealthy. - items: - type: string - type: array - type: object - failureThreshold: - description: Minimum consecutive failures for the probe - to be considered failed after having succeeded. Defaults - to 3. Minimum value is 1. - format: int32 - type: integer - grpc: - description: GRPC specifies an action involving a GRPC - port. - properties: - port: - description: Port number of the gRPC service. Number - must be in the range 1 to 65535. - format: int32 - type: integer - service: - description: "Service is the name of the service to - place in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). - \n If this is not specified, the default behavior - is defined by gRPC." - type: string - required: - - port - type: object - httpGet: - description: HTTPGet specifies the http request to perform. - properties: - host: - description: Host name to connect to, defaults to - the pod IP. You probably want to set "Host" in httpHeaders - instead. - type: string - httpHeaders: - description: Custom headers to set in the request. - HTTP allows repeated headers. - items: - description: HTTPHeader describes a custom header - to be used in HTTP probes - properties: - name: - description: The header field name. This will - be canonicalized upon output, so case-variant - names will be understood as the same header. - type: string - value: - description: The header field value - type: string - required: - - name - - value - type: object - type: array - path: - description: Path to access on the HTTP server. - type: string - port: - anyOf: - - type: integer - - type: string - description: Name or number of the port to access - on the container. Number must be in the range 1 - to 65535. Name must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - scheme: - description: Scheme to use for connecting to the host. - Defaults to HTTP. - type: string - required: - - port - type: object - initialDelaySeconds: - description: 'Number of seconds after the container has - started before liveness probes are initiated. More info: - https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' - format: int32 - type: integer - periodSeconds: - description: How often (in seconds) to perform the probe. - Default to 10 seconds. Minimum value is 1. - format: int32 - type: integer - successThreshold: - description: Minimum consecutive successes for the probe - to be considered successful after having failed. Defaults - to 1. Must be 1 for liveness and startup. Minimum value - is 1. - format: int32 - type: integer - tcpSocket: - description: TCPSocket specifies an action involving a - TCP port. - properties: - host: - description: 'Optional: Host name to connect to, defaults - to the pod IP.' - type: string - port: - anyOf: - - type: integer - - type: string - description: Number or name of the port to access - on the container. Number must be in the range 1 - to 65535. Name must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - required: - - port - type: object - terminationGracePeriodSeconds: - description: Optional duration in seconds the pod needs - to terminate gracefully upon probe failure. The grace - period is the duration in seconds after the processes - running in the pod are sent a termination signal and - the time when the processes are forcibly halted with - a kill signal. Set this value longer than the expected - cleanup time for your process. If this value is nil, - the pod's terminationGracePeriodSeconds will be used. - Otherwise, this value overrides the value provided by - the pod spec. Value must be non-negative integer. The - value zero indicates stop immediately via the kill signal - (no opportunity to shut down). This is a beta field - and requires enabling ProbeTerminationGracePeriod feature - gate. Minimum value is 1. spec.terminationGracePeriodSeconds - is used if unset. - format: int64 - type: integer - timeoutSeconds: - description: 'Number of seconds after which the probe - times out. Defaults to 1 second. Minimum value is 1. - More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' - format: int32 - type: integer - type: object - stdin: - description: Whether this container should allocate a buffer - for stdin in the container runtime. If this is not set, - reads from stdin in the container will always result in - EOF. Default is false. - type: boolean - stdinOnce: - description: Whether the container runtime should close the - stdin channel after it has been opened by a single attach. - When stdin is true the stdin stream will remain open across - multiple attach sessions. If stdinOnce is set to true, stdin - is opened on container start, is empty until the first client - attaches to stdin, and then remains open and accepts data - until the client disconnects, at which time stdin is closed - and remains closed until the container is restarted. If - this flag is false, a container processes that reads from - stdin will never receive an EOF. Default is false - type: boolean - terminationMessagePath: - description: 'Optional: Path at which the file to which the - container''s termination message will be written is mounted - into the container''s filesystem. Message written is intended - to be brief final status, such as an assertion failure message. - Will be truncated by the node if greater than 4096 bytes. - The total message length across all containers will be limited - to 12kb. Defaults to /dev/termination-log. Cannot be updated.' - type: string - terminationMessagePolicy: - description: Indicate how the termination message should be - populated. File will use the contents of terminationMessagePath - to populate the container status message on both success - and failure. FallbackToLogsOnError will use the last chunk - of container log output if the termination message file - is empty and the container exited with an error. The log - output is limited to 2048 bytes or 80 lines, whichever is - smaller. Defaults to File. Cannot be updated. - type: string - tty: - description: Whether this container should allocate a TTY - for itself, also requires 'stdin' to be true. Default is - false. - type: boolean - volumeDevices: - description: volumeDevices is the list of block devices to - be used by the container. - items: - description: volumeDevice describes a mapping of a raw block - device within a container. - properties: - devicePath: - description: devicePath is the path inside of the container - that the device will be mapped to. - type: string - name: - description: name must match the name of a persistentVolumeClaim - in the pod - type: string - required: - - devicePath - - name - type: object - type: array - volumeMounts: - description: Pod volumes to mount into the container's filesystem. - Cannot be updated. - items: - description: VolumeMount describes a mounting of a Volume - within a container. - properties: - mountPath: - description: Path within the container at which the - volume should be mounted. Must not contain ':'. - type: string - mountPropagation: - description: mountPropagation determines how mounts - are propagated from the host to container and the - other way around. When not set, MountPropagationNone - is used. This field is beta in 1.10. - type: string - name: - description: This must match the Name of a Volume. - type: string - readOnly: - description: Mounted read-only if true, read-write otherwise - (false or unspecified). Defaults to false. - type: boolean - subPath: - description: Path within the volume from which the container's - volume should be mounted. Defaults to "" (volume's - root). - type: string - subPathExpr: - description: Expanded path within the volume from which - the container's volume should be mounted. Behaves - similarly to SubPath but environment variable references - $(VAR_NAME) are expanded using the container's environment. - Defaults to "" (volume's root). SubPathExpr and SubPath - are mutually exclusive. - type: string - required: - - mountPath - - name - type: object - type: array - workingDir: - description: Container's working directory. If not specified, - the container runtime's default will be used, which might - be configured in the container image. Cannot be updated. - type: string - required: - - name - type: object - volumes: - description: Volumes is a list of volumes that can be mounted - by containers in a template. - items: - description: Volume represents a named volume in a pod that - may be accessed by any container in the pod. - properties: - awsElasticBlockStore: - description: 'awsElasticBlockStore represents an AWS Disk - resource that is attached to a kubelet''s host machine - and then exposed to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore' - properties: - fsType: - description: 'fsType is the filesystem type of the volume - that you want to mount. Tip: Ensure that the filesystem - type is supported by the host operating system. Examples: - "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" - if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore - TODO: how do we prevent errors in the filesystem from - compromising the machine' - type: string - partition: - description: 'partition is the partition in the volume - that you want to mount. If omitted, the default is - to mount by volume name. Examples: For volume /dev/sda1, - you specify the partition as "1". Similarly, the volume - partition for /dev/sda is "0" (or you can leave the - property empty).' - format: int32 - type: integer - readOnly: - description: 'readOnly value true will force the readOnly - setting in VolumeMounts. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore' - type: boolean - volumeID: - description: 'volumeID is unique ID of the persistent - disk resource in AWS (Amazon EBS volume). More info: - https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore' - type: string - required: - - volumeID - type: object - azureDisk: - description: azureDisk represents an Azure Data Disk mount - on the host and bind mount to the pod. - properties: - cachingMode: - description: 'cachingMode is the Host Caching mode: - None, Read Only, Read Write.' - type: string - diskName: - description: diskName is the Name of the data disk in - the blob storage - type: string - diskURI: - description: diskURI is the URI of data disk in the - blob storage - type: string - fsType: - description: fsType is Filesystem type to mount. Must - be a filesystem type supported by the host operating - system. Ex. "ext4", "xfs", "ntfs". Implicitly inferred - to be "ext4" if unspecified. - type: string - kind: - description: 'kind expected values are Shared: multiple - blob disks per storage account Dedicated: single - blob disk per storage account Managed: azure managed - data disk (only in managed availability set). defaults - to shared' - type: string - readOnly: - description: readOnly Defaults to false (read/write). - ReadOnly here will force the ReadOnly setting in VolumeMounts. - type: boolean - required: - - diskName - - diskURI - type: object - azureFile: - description: azureFile represents an Azure File Service - mount on the host and bind mount to the pod. - properties: - readOnly: - description: readOnly defaults to false (read/write). - ReadOnly here will force the ReadOnly setting in VolumeMounts. - type: boolean - secretName: - description: secretName is the name of secret that - contains Azure Storage Account Name and Key - type: string - shareName: - description: shareName is the azure share Name - type: string - required: - - secretName - - shareName - type: object - cephfs: - description: cephFS represents a Ceph FS mount on the host - that shares a pod's lifetime - properties: - monitors: - description: 'monitors is Required: Monitors is a collection - of Ceph monitors More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' - items: - type: string - type: array - path: - description: 'path is Optional: Used as the mounted - root, rather than the full Ceph tree, default is /' - type: string - readOnly: - description: 'readOnly is Optional: Defaults to false - (read/write). ReadOnly here will force the ReadOnly - setting in VolumeMounts. More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' - type: boolean - secretFile: - description: 'secretFile is Optional: SecretFile is - the path to key ring for User, default is /etc/ceph/user.secret - More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' - type: string - secretRef: - description: 'secretRef is Optional: SecretRef is reference - to the authentication secret for User, default is - empty. More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' - properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' - type: string - type: object - x-kubernetes-map-type: atomic - user: - description: 'user is optional: User is the rados user - name, default is admin More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' - type: string - required: - - monitors - type: object - cinder: - description: 'cinder represents a cinder volume attached - and mounted on kubelets host machine. More info: https://examples.k8s.io/mysql-cinder-pd/README.md' - properties: - fsType: - description: 'fsType is the filesystem type to mount. - Must be a filesystem type supported by the host operating - system. Examples: "ext4", "xfs", "ntfs". Implicitly - inferred to be "ext4" if unspecified. More info: https://examples.k8s.io/mysql-cinder-pd/README.md' - type: string - readOnly: - description: 'readOnly defaults to false (read/write). - ReadOnly here will force the ReadOnly setting in VolumeMounts. - More info: https://examples.k8s.io/mysql-cinder-pd/README.md' - type: boolean - secretRef: - description: 'secretRef is optional: points to a secret - object containing parameters used to connect to OpenStack.' - properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' - type: string - type: object - x-kubernetes-map-type: atomic - volumeID: - description: 'volumeID used to identify the volume in - cinder. More info: https://examples.k8s.io/mysql-cinder-pd/README.md' - type: string - required: - - volumeID - type: object - configMap: - description: configMap represents a configMap that should - populate this volume - properties: - defaultMode: - description: 'defaultMode is optional: mode bits used - to set permissions on created files by default. Must - be an octal value between 0000 and 0777 or a decimal - value between 0 and 511. YAML accepts both octal and - decimal values, JSON requires decimal values for mode - bits. Defaults to 0644. Directories within the path - are not affected by this setting. This might be in - conflict with other options that affect the file mode, - like fsGroup, and the result can be other mode bits - set.' - format: int32 - type: integer - items: - description: items if unspecified, each key-value pair - in the Data field of the referenced ConfigMap will - be projected into the volume as a file whose name - is the key and content is the value. If specified, - the listed keys will be projected into the specified - paths, and unlisted keys will not be present. If a - key is specified which is not present in the ConfigMap, - the volume setup will error unless it is marked optional. - Paths must be relative and may not contain the '..' - path or start with '..'. - items: - description: Maps a string key to a path within a - volume. - properties: - key: - description: key is the key to project. - type: string - mode: - description: 'mode is Optional: mode bits used - to set permissions on this file. Must be an - octal value between 0000 and 0777 or a decimal - value between 0 and 511. YAML accepts both octal - and decimal values, JSON requires decimal values - for mode bits. If not specified, the volume - defaultMode will be used. This might be in conflict - with other options that affect the file mode, - like fsGroup, and the result can be other mode - bits set.' - format: int32 - type: integer - path: - description: path is the relative path of the - file to map the key to. May not be an absolute - path. May not contain the path element '..'. - May not start with the string '..'. - type: string - required: - - key - - path - type: object - 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?' - type: string - optional: - description: optional specify whether the ConfigMap - or its keys must be defined - type: boolean - type: object - x-kubernetes-map-type: atomic - csi: - description: csi (Container Storage Interface) represents - ephemeral storage that is handled by certain external - CSI drivers (Beta feature). - 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: fsType to mount. Ex. "ext4", "xfs", "ntfs". - If not provided, the empty value is passed to the - associated CSI driver which will determine the default - filesystem to apply. - type: string - nodePublishSecretRef: - description: nodePublishSecretRef is a reference to - the secret object containing sensitive information - to pass to the CSI driver to complete the CSI NodePublishVolume - and NodeUnpublishVolume calls. This field is optional, - and may be empty if no secret is required. If the - secret object contains more than one secret, all secret - references are passed. - properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' - type: string - type: object - x-kubernetes-map-type: atomic - readOnly: - description: readOnly specifies a read-only configuration - for the volume. Defaults to false (read/write). - 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. - type: object - required: - - driver - type: object - downwardAPI: - description: downwardAPI represents downward API about the - pod that should populate this volume - 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.' - format: int32 - type: integer - items: - description: Items is a list of downward API volume - file - items: - description: DownwardAPIVolumeFile represents information - to create the file containing the pod field - properties: - fieldRef: - description: 'Required: Selects a field of the - pod: only annotations, labels, name and namespace - are supported.' - properties: - apiVersion: - description: Version of the schema the FieldPath - is written in terms of, defaults to "v1". - type: string - fieldPath: - description: Path of the field to select in - the specified API version. - type: string - required: - - fieldPath - type: object - x-kubernetes-map-type: atomic - 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.' - format: int32 - 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 (limits.cpu, - limits.memory, requests.cpu and requests.memory) - are currently supported.' - properties: - containerName: - description: 'Container name: required for - volumes, optional for env vars' - type: string - divisor: - anyOf: - - type: integer - - type: string - description: Specifies the output format of - the exposed resources, defaults to "1" - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - description: 'Required: resource to select' - type: string - required: - - resource - type: object - x-kubernetes-map-type: atomic - required: - - path - type: object - type: array - type: object - emptyDir: - description: 'emptyDir represents a temporary directory - that shares a pod''s lifetime. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir' - properties: - medium: - description: 'medium represents what type of storage - medium should back this directory. The default is - "" which means to use the node''s default medium. - Must be an empty string (default) or Memory. More - info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir' - type: string - sizeLimit: - anyOf: - - type: integer - - type: string - description: 'sizeLimit is the total amount of local - storage required for this EmptyDir volume. The size - limit is also applicable for memory medium. The maximum - usage on memory medium EmptyDir would be the minimum - value between the SizeLimit specified here and the - sum of memory limits of all containers in a pod. The - default is nil which means that the limit is undefined. - More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir' - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - ephemeral: - description: "ephemeral represents a volume that is handled - by a cluster storage driver. The volume's lifecycle is - tied to the pod that defines it - it will be created before - the pod starts, and deleted when the pod is removed. \n - 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). \n Use PersistentVolumeClaim - or one of the vendor-specific APIs for volumes that persist - for longer than the lifecycle of an individual pod. \n - 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. \n A pod can use both - types of ephemeral volumes and persistent volumes at the - same time." - properties: - volumeClaimTemplate: - description: "Will be used to create a stand-alone PVC - to provision the volume. The pod in which this EphemeralVolumeSource - is embedded will be the owner of the PVC, i.e. the - PVC will be deleted together with the pod. The name - of the PVC will be `-` where - `` is the name from the `PodSpec.Volumes` - array entry. Pod validation will reject the pod if - the concatenated name is not valid for a PVC (for - example, too long). \n 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. - \n This field is read-only and no changes will be - made by Kubernetes to the PVC after it has been created. - \n Required, must not be nil." - properties: - metadata: - description: May contain labels and annotations - that will be copied into the PVC when creating - it. No other fields are allowed and will be rejected - during validation. - type: object - spec: - description: The specification for the PersistentVolumeClaim. - The entire content is copied unchanged into the - PVC that gets created from this template. The - same fields as in a PersistentVolumeClaim are - also valid here. - 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' - items: - type: string - type: array - dataSource: - description: 'dataSource field can be used to - specify either: * An existing VolumeSnapshot - object (snapshot.storage.k8s.io/VolumeSnapshot) - * An existing PVC (PersistentVolumeClaim) - If the provisioner or an external controller - can support the specified data source, it - will create a new volume based on the contents - of the specified data source. When the AnyVolumeDataSource - feature gate is enabled, dataSource contents - will be copied to dataSourceRef, and dataSourceRef - contents will be copied to dataSource when - dataSourceRef.namespace is not specified. - If the namespace is specified, then dataSourceRef - will not be copied to dataSource.' - properties: - apiGroup: - description: APIGroup is the group for the - resource being referenced. If APIGroup - is not specified, the specified Kind must - be in the core API group. For any other - third-party types, APIGroup is required. - type: string - kind: - description: Kind is the type of resource - being referenced - type: string - name: - description: Name is the name of resource - being referenced - type: string - required: - - kind - - name - type: object - x-kubernetes-map-type: atomic - dataSourceRef: - description: 'dataSourceRef specifies the object - from which to populate the volume with data, - if a non-empty volume is desired. This may - be any object from a non-empty API group (non - core object) or a PersistentVolumeClaim object. - When this field is specified, volume binding - will only succeed if the type of the specified - object matches some installed volume populator - or dynamic provisioner. This field will replace - the functionality of the dataSource field - and as such if both fields are non-empty, - they must have the same value. For backwards - compatibility, when namespace isn''t specified - in dataSourceRef, both fields (dataSource - and dataSourceRef) will be set to the same - value automatically if one of them is empty - and the other is non-empty. When namespace - is specified in dataSourceRef, dataSource - isn''t set to the same value and must be empty. - There are three important differences between - dataSource and dataSourceRef: * While dataSource - only allows two specific types of objects, - dataSourceRef 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. * While dataSource only - allows local objects, dataSourceRef allows - objects in any namespaces. (Beta) Using this - field requires the AnyVolumeDataSource feature - gate to be enabled. (Alpha) Using the namespace - field of dataSourceRef requires the CrossNamespaceVolumeDataSource - feature gate to be enabled.' - properties: - apiGroup: - description: APIGroup is the group for the - resource being referenced. If APIGroup - is not specified, the specified Kind must - be in the core API group. For any other - third-party types, APIGroup is required. - type: string - kind: - description: Kind is the type of resource - being referenced - type: string - name: - description: Name is the name of resource - being referenced - type: string - namespace: - description: Namespace is the namespace - of resource being referenced Note that - when a namespace is specified, a gateway.networking.k8s.io/ReferenceGrant - object is required in the referent namespace - to allow that namespace's owner to accept - the reference. See the ReferenceGrant - documentation for details. (Alpha) This - field requires the CrossNamespaceVolumeDataSource - feature gate to be enabled. - type: string - required: - - kind - - name - type: object - resources: - 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' - properties: - claims: - description: "Claims lists the names of - resources, defined in spec.resourceClaims, - that are used by this container. \n This - is an alpha field and requires enabling - the DynamicResourceAllocation feature - gate. \n This field is immutable. It can - only be set for containers." - items: - description: ResourceClaim references - one entry in PodSpec.ResourceClaims. - properties: - name: - description: Name must match the name - of one entry in pod.spec.resourceClaims - of the Pod where this field is used. - It makes that resource available - inside a container. - type: string - required: - - name - type: object - type: array - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Limits describes the maximum - amount of compute resources allowed. More - info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Requests describes the minimum - amount of compute resources required. - If Requests is omitted for a container, - it defaults to Limits if that is explicitly - specified, otherwise to an implementation-defined - value. Requests cannot exceed Limits. - More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' - type: object - type: object - selector: - description: selector is a label query over - volumes to consider for binding. - properties: - matchExpressions: - description: matchExpressions is a list - of label selector requirements. The requirements - are ANDed. - items: - description: A label selector requirement - is a selector that contains values, - a key, and an operator that relates - the key and values. - properties: - key: - description: key is the label key - that the selector applies to. - type: string - operator: - description: operator represents a - key's relationship to a set of values. - Valid operators are In, NotIn, Exists - and DoesNotExist. - type: string - values: - description: values is an array of - string values. If the operator is - In or NotIn, the values array must - be non-empty. If the operator is - Exists or DoesNotExist, the values - array must be empty. This array - is replaced during a strategic merge - patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} - pairs. A single {key,value} in the matchLabels - map is equivalent to an element of matchExpressions, - whose key field is "key", the operator - is "In", and the values array contains - only "value". The requirements are ANDed. - type: object - type: object - x-kubernetes-map-type: atomic - storageClassName: - description: 'storageClassName is the name of - the StorageClass required by the claim. More - info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1' - type: string - volumeMode: - description: volumeMode defines what type of - volume is required by the claim. Value of - Filesystem is implied when not included in - claim spec. - type: string - volumeName: - description: volumeName is the binding reference - to the PersistentVolume backing this claim. - type: string - type: object - required: - - spec - type: object - type: object - fc: - description: fc represents a Fibre Channel resource that - is attached to a kubelet's host machine and then exposed - to the pod. - properties: - fsType: - description: 'fsType is the filesystem type to mount. - Must be a filesystem type supported by the host operating - system. Ex. "ext4", "xfs", "ntfs". Implicitly inferred - to be "ext4" if unspecified. TODO: how do we prevent - errors in the filesystem from compromising the machine' - type: string - lun: - description: 'lun is Optional: FC target lun number' - format: int32 - type: integer - readOnly: - description: 'readOnly is Optional: Defaults to false - (read/write). ReadOnly here will force the ReadOnly - setting in VolumeMounts.' - type: boolean - targetWWNs: - description: 'targetWWNs is Optional: FC target worldwide - names (WWNs)' - items: - type: string - type: array - wwids: - description: 'wwids Optional: FC volume world wide identifiers - (wwids) Either wwids or combination of targetWWNs - and lun must be set, but not both simultaneously.' - items: - type: string - type: array - type: object - flexVolume: - description: flexVolume represents a generic volume resource - that is provisioned/attached using an exec based plugin. - properties: - driver: - description: driver is the name of the driver to use - for this volume. - type: string - fsType: - description: fsType is the filesystem type to mount. - Must be a filesystem type supported by the host operating - system. Ex. "ext4", "xfs", "ntfs". The default filesystem - depends on FlexVolume script. - type: string - options: - additionalProperties: - type: string - description: 'options is Optional: this field holds - extra command options if any.' - type: object - readOnly: - description: 'readOnly is Optional: defaults to false - (read/write). ReadOnly here will force the ReadOnly - setting in VolumeMounts.' - type: boolean - secretRef: - description: 'secretRef is Optional: secretRef is reference - to the secret object containing sensitive information - to pass to the plugin scripts. This may be empty if - no secret object is specified. If the secret object - contains more than one secret, all secrets are passed - to the plugin scripts.' - properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' - type: string - type: object - x-kubernetes-map-type: atomic - required: - - driver - type: object - flocker: - description: flocker represents a Flocker volume attached - to a kubelet's host machine. This depends on the Flocker - control service being running - properties: - datasetName: - description: datasetName is Name of the dataset stored - as metadata -> name on the dataset for Flocker should - be considered as deprecated - type: string - datasetUUID: - description: datasetUUID is the UUID of the dataset. - This is unique identifier of a Flocker dataset - type: string - type: object - gcePersistentDisk: - description: 'gcePersistentDisk represents a GCE Disk resource - that is attached to a kubelet''s host machine and then - exposed to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' - properties: - fsType: - description: 'fsType is filesystem type of the volume - that you want to mount. Tip: Ensure that the filesystem - type is supported by the host operating system. Examples: - "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" - if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk - TODO: how do we prevent errors in the filesystem from - compromising the machine' - type: string - partition: - description: 'partition is the partition in the volume - that you want to mount. If omitted, the default is - to mount by volume name. Examples: For volume /dev/sda1, - you specify the partition as "1". Similarly, the volume - partition for /dev/sda is "0" (or you can leave the - property empty). More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' - format: int32 - type: integer - pdName: - description: 'pdName is unique name of the PD resource - in GCE. Used to identify the disk in GCE. More info: - https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' - type: string - readOnly: - description: 'readOnly here will force the ReadOnly - setting in VolumeMounts. Defaults to false. More info: - https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' - type: boolean - required: - - pdName - type: object - gitRepo: - description: 'gitRepo represents a git repository at a particular - revision. DEPRECATED: GitRepo is deprecated. To provision - a container with a git repo, mount an EmptyDir into an - InitContainer that clones the repo using git, then mount - the EmptyDir into the Pod''s container.' - properties: - directory: - description: directory is the target directory name. - Must not contain or start with '..'. If '.' is supplied, - the volume directory will be the git repository. Otherwise, - if specified, the volume will contain the git repository - in the subdirectory with the given name. - type: string - repository: - description: repository is the URL - type: string - revision: - description: revision is the commit hash for the specified - revision. - type: string - required: - - repository - type: object - glusterfs: - description: 'glusterfs represents a Glusterfs mount on - the host that shares a pod''s lifetime. More info: https://examples.k8s.io/volumes/glusterfs/README.md' - properties: - endpoints: - description: 'endpoints is the endpoint name that details - Glusterfs topology. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod' - type: string - path: - description: 'path is the Glusterfs volume path. More - info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod' - type: string - readOnly: - description: 'readOnly here will force the Glusterfs - volume to be mounted with read-only permissions. Defaults - to false. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod' - type: boolean - required: - - endpoints - - path - type: object - hostPath: - description: 'hostPath represents a pre-existing file or - directory on the host machine that is directly exposed - to the container. This is generally used for system agents - or other privileged things that are allowed to see the - host machine. Most containers will NOT need this. More - info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath - --- TODO(jonesdl) We need to restrict who can use host - directory mounts and who can/can not mount host directories - as read/write.' - properties: - path: - description: 'path of the directory on the host. If - the path is a symlink, it will follow the link to - the real path. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath' - type: string - type: - description: 'type for HostPath Volume Defaults to "" - More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath' - type: string - required: - - path - type: object - iscsi: - description: 'iscsi represents an ISCSI Disk resource that - is attached to a kubelet''s host machine and then exposed - to the pod. More info: https://examples.k8s.io/volumes/iscsi/README.md' - properties: - chapAuthDiscovery: - description: chapAuthDiscovery defines whether support - iSCSI Discovery CHAP authentication - type: boolean - chapAuthSession: - description: chapAuthSession defines whether support - iSCSI Session CHAP authentication - type: boolean - fsType: - description: 'fsType is the filesystem type of the volume - that you want to mount. Tip: Ensure that the filesystem - type is supported by the host operating system. Examples: - "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" - if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#iscsi - TODO: how do we prevent errors in the filesystem from - compromising the machine' - type: string - initiatorName: - description: initiatorName is the custom iSCSI Initiator - Name. If initiatorName is specified with iscsiInterface - simultaneously, new iSCSI interface : will be created for the connection. - type: string - iqn: - description: iqn is the target iSCSI Qualified Name. - type: string - iscsiInterface: - description: iscsiInterface is the interface Name that - uses an iSCSI transport. Defaults to 'default' (tcp). - type: string - lun: - description: lun represents iSCSI Target Lun number. - format: int32 - type: integer - portals: - description: portals is the iSCSI Target Portal List. - The portal is either an IP or ip_addr:port if the - port is other than default (typically TCP ports 860 - and 3260). - items: - type: string - type: array - readOnly: - description: readOnly here will force the ReadOnly setting - in VolumeMounts. Defaults to false. - type: boolean - secretRef: - description: secretRef is the CHAP Secret for iSCSI - target and initiator authentication - properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' - type: string - type: object - x-kubernetes-map-type: atomic - targetPortal: - description: targetPortal is iSCSI Target Portal. The - Portal is either an IP or ip_addr:port if the port - is other than default (typically TCP ports 860 and - 3260). - type: string - required: - - iqn - - lun - - targetPortal - type: object - name: - description: 'name of the volume. Must be a DNS_LABEL and - unique within the pod. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' - type: string - nfs: - description: 'nfs represents an NFS mount on the host that - shares a pod''s lifetime More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' - properties: - path: - description: 'path that is exported by the NFS server. - More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' - type: string - readOnly: - description: 'readOnly here will force the NFS export - to be mounted with read-only permissions. Defaults - to false. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' - type: boolean - server: - description: 'server is the hostname or IP address of - the NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' - type: string - required: - - path - - server - type: object - persistentVolumeClaim: - description: 'persistentVolumeClaimVolumeSource represents - a reference to a PersistentVolumeClaim in the same namespace. - More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims' - 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: readOnly Will force the ReadOnly setting - in VolumeMounts. Default false. - type: boolean - required: - - claimName - type: object - photonPersistentDisk: - description: photonPersistentDisk represents a PhotonController - persistent disk attached and mounted on kubelets host - machine - properties: - fsType: - description: fsType is the filesystem type to mount. - Must be a filesystem type supported by the host operating - system. Ex. "ext4", "xfs", "ntfs". Implicitly inferred - to be "ext4" if unspecified. - type: string - pdID: - description: pdID is the ID that identifies Photon Controller - persistent disk - type: string - required: - - pdID - type: object - portworxVolume: - description: portworxVolume represents a portworx volume - attached and mounted on kubelets host machine - 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: readOnly defaults to false (read/write). - ReadOnly here will force the ReadOnly setting in VolumeMounts. - type: boolean - volumeID: - description: volumeID uniquely identifies a Portworx - volume - type: string - required: - - volumeID - type: object - projected: - description: projected items for all in one resources secrets, - configmaps, and downward API - properties: - defaultMode: - description: defaultMode are the mode bits used to set - permissions on created files by default. Must be an - octal value between 0000 and 0777 or a decimal value - between 0 and 511. YAML accepts both octal and decimal - values, JSON requires decimal values for mode bits. - Directories within the path are not affected by this - setting. This might be in conflict with other options - that affect the file mode, like fsGroup, and the result - can be other mode bits set. - format: int32 - type: integer - sources: - description: sources is the list of volume projections - items: - description: Projection that may be projected along - with other supported volume types - properties: - configMap: - description: configMap information about the configMap - data to project - properties: - items: - description: items if unspecified, each key-value - pair in the Data field of the referenced - ConfigMap will be projected into the volume - as a file whose name is the key and content - is the value. If specified, the listed keys - will be projected into the specified paths, - and unlisted keys will not be present. If - a key is specified which is not present - in the ConfigMap, the volume setup will - error unless it is marked optional. Paths - must be relative and may not contain the - '..' path or start with '..'. - items: - description: Maps a string key to a path - within a volume. - properties: - key: - description: key is the key to project. - type: string - mode: - description: 'mode is Optional: mode - bits used to set permissions on this - file. Must be an octal value between - 0000 and 0777 or a decimal value between - 0 and 511. YAML accepts both octal - and decimal values, JSON requires - decimal values for mode bits. If not - specified, the volume defaultMode - will be used. This might be in conflict - with other options that affect the - file mode, like fsGroup, and the result - can be other mode bits set.' - format: int32 - type: integer - path: - description: path is the relative path - of the file to map the key to. May - not be an absolute path. May not contain - the path element '..'. May not start - with the string '..'. - type: string - required: - - key - - path - type: object - 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?' - type: string - optional: - description: optional specify whether the - ConfigMap or its keys must be defined - type: boolean - type: object - x-kubernetes-map-type: atomic - downwardAPI: - description: downwardAPI information about the - downwardAPI data to project - properties: - items: - description: Items is a list of DownwardAPIVolume - file - items: - description: DownwardAPIVolumeFile represents - information to create the file containing - the pod field - properties: - fieldRef: - description: 'Required: Selects a field - of the pod: only annotations, labels, - name and namespace are supported.' - properties: - apiVersion: - description: Version of the schema - the FieldPath is written in terms - of, defaults to "v1". - type: string - fieldPath: - description: Path of the field to - select in the specified API version. - type: string - required: - - fieldPath - type: object - x-kubernetes-map-type: atomic - 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.' - format: int32 - 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 (limits.cpu, limits.memory, - requests.cpu and requests.memory) - are currently supported.' - properties: - containerName: - description: 'Container name: required - for volumes, optional for env - vars' - type: string - divisor: - anyOf: - - type: integer - - type: string - description: Specifies the output - format of the exposed resources, - defaults to "1" - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - description: 'Required: resource - to select' - type: string - required: - - resource - type: object - x-kubernetes-map-type: atomic - required: - - path - type: object - type: array - type: object - secret: - description: secret information about the secret - data to project - properties: - items: - description: items if unspecified, each key-value - pair in the Data field of the referenced - Secret will be projected into the volume - as a file whose name is the key and content - is the value. If specified, the listed keys - will be projected into the specified paths, - and unlisted keys will not be present. If - a key is specified which is not present - in the Secret, the volume setup will error - unless it is marked optional. Paths must - be relative and may not contain the '..' - path or start with '..'. - items: - description: Maps a string key to a path - within a volume. - properties: - key: - description: key is the key to project. - type: string - mode: - description: 'mode is Optional: mode - bits used to set permissions on this - file. Must be an octal value between - 0000 and 0777 or a decimal value between - 0 and 511. YAML accepts both octal - and decimal values, JSON requires - decimal values for mode bits. If not - specified, the volume defaultMode - will be used. This might be in conflict - with other options that affect the - file mode, like fsGroup, and the result - can be other mode bits set.' - format: int32 - type: integer - path: - description: path is the relative path - of the file to map the key to. May - not be an absolute path. May not contain - the path element '..'. May not start - with the string '..'. - type: string - required: - - key - - path - type: object - 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?' - type: string - optional: - description: optional field specify whether - the Secret or its key must be defined - type: boolean - type: object - x-kubernetes-map-type: atomic - serviceAccountToken: - description: serviceAccountToken is information - about the serviceAccountToken data to project - properties: - audience: - description: audience is the intended audience - of the token. A recipient of a token must - identify itself with an identifier specified - in the audience of the token, and otherwise - should reject the token. The audience defaults - to the identifier of the apiserver. - type: string - expirationSeconds: - description: expirationSeconds is the requested - duration of validity of the service account - token. As the token approaches expiration, - the kubelet volume plugin will proactively - rotate the service account token. The kubelet - will start trying to rotate the token if - the token is older than 80 percent of its - time to live or if the token is older than - 24 hours.Defaults to 1 hour and must be - at least 10 minutes. - format: int64 - type: integer - path: - description: path is the path relative to - the mount point of the file to project the - token into. - type: string - required: - - path - type: object - type: object - type: array - type: object - quobyte: - description: quobyte represents a Quobyte mount on the host - that shares a pod's lifetime - properties: - group: - description: group to map volume access to Default is - no group - type: string - readOnly: - description: readOnly here will force the Quobyte volume - to be mounted with read-only permissions. Defaults - to false. - type: boolean - registry: - description: registry represents a single or multiple - Quobyte Registry services specified as a string as - host:port pair (multiple entries are separated with - commas) which acts as the central registry for volumes - type: string - tenant: - description: tenant owning the given Quobyte volume - in the Backend Used with dynamically provisioned Quobyte - volumes, value is set by the plugin - type: string - user: - description: user to map volume access to Defaults to - serivceaccount user - type: string - volume: - description: volume is a string that references an already - created Quobyte volume by name. - type: string - required: - - registry - - volume - type: object - rbd: - description: 'rbd represents a Rados Block Device mount - on the host that shares a pod''s lifetime. More info: - https://examples.k8s.io/volumes/rbd/README.md' - properties: - fsType: - description: 'fsType is the filesystem type of the volume - that you want to mount. Tip: Ensure that the filesystem - type is supported by the host operating system. Examples: - "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" - if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#rbd - TODO: how do we prevent errors in the filesystem from - compromising the machine' - type: string - image: - description: 'image is the rados image name. More info: - https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' - type: string - keyring: - description: 'keyring is the path to key ring for RBDUser. - Default is /etc/ceph/keyring. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' - type: string - monitors: - description: 'monitors is 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: 'pool is the rados pool name. Default is - rbd. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' - type: string - readOnly: - description: 'readOnly here will force the ReadOnly - setting in VolumeMounts. Defaults to false. More info: - https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' - type: boolean - secretRef: - description: 'secretRef is name of the authentication - secret for RBDUser. If provided overrides keyring. - Default is nil. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' - properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' - type: string - type: object - x-kubernetes-map-type: atomic - user: - description: 'user is the rados user name. Default is - admin. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' - type: string - required: - - image - - monitors - type: object - scaleIO: - description: scaleIO represents a ScaleIO persistent volume - attached and mounted on Kubernetes nodes. - properties: - fsType: - description: fsType is the filesystem type to mount. - Must be a filesystem type supported by the host operating - system. Ex. "ext4", "xfs", "ntfs". Default is "xfs". - type: string - gateway: - description: gateway is the host address of the ScaleIO - API Gateway. - type: string - protectionDomain: - description: protectionDomain is the name of the ScaleIO - Protection Domain for the configured storage. - type: string - readOnly: - description: readOnly Defaults to false (read/write). - ReadOnly here will force the ReadOnly setting in VolumeMounts. - type: boolean - secretRef: - description: secretRef references to the secret for - ScaleIO user and other sensitive information. If this - is not provided, Login operation will fail. - properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' - type: string - type: object - x-kubernetes-map-type: atomic - sslEnabled: - description: sslEnabled Flag enable/disable SSL communication - with Gateway, default false - type: boolean - storageMode: - description: storageMode indicates whether the storage - for a volume should be ThickProvisioned or ThinProvisioned. - Default is ThinProvisioned. - type: string - storagePool: - description: storagePool is the ScaleIO Storage Pool - associated with the protection domain. - type: string - system: - description: system is the name of the storage system - as configured in ScaleIO. - type: string - volumeName: - description: volumeName is the name of a volume already - created in the ScaleIO system that is associated with - this volume source. - type: string - required: - - gateway - - secretRef - - system - type: object - secret: - description: 'secret represents a secret that should populate - this volume. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret' - properties: - defaultMode: - description: 'defaultMode is Optional: mode bits used - to set permissions on created files by default. Must - be an octal value between 0000 and 0777 or a decimal - value between 0 and 511. YAML accepts both octal and - decimal values, JSON requires decimal values for mode - bits. Defaults to 0644. Directories within the path - are not affected by this setting. This might be in - conflict with other options that affect the file mode, - like fsGroup, and the result can be other mode bits - set.' - format: int32 - type: integer - items: - description: items If unspecified, each key-value pair - in the Data field of the referenced Secret will be - projected into the volume as a file whose name is - the key and content is the value. If specified, the - listed keys will be projected into the specified paths, - and unlisted keys will not be present. If a key is - specified which is not present in the Secret, the - volume setup will error unless it is marked optional. - Paths must be relative and may not contain the '..' - path or start with '..'. - items: - description: Maps a string key to a path within a - volume. - properties: - key: - description: key is the key to project. - type: string - mode: - description: 'mode is Optional: mode bits used - to set permissions on this file. Must be an - octal value between 0000 and 0777 or a decimal - value between 0 and 511. YAML accepts both octal - and decimal values, JSON requires decimal values - for mode bits. If not specified, the volume - defaultMode will be used. This might be in conflict - with other options that affect the file mode, - like fsGroup, and the result can be other mode - bits set.' - format: int32 - type: integer - path: - description: path is the relative path of the - file to map the key to. May not be an absolute - path. May not contain the path element '..'. - May not start with the string '..'. - type: string - required: - - key - - path - type: object - type: array - optional: - description: optional field specify whether the Secret - or its keys must be defined - type: boolean - secretName: - description: 'secretName is the name of the secret in - the pod''s namespace to use. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret' - type: string - type: object - storageos: - description: storageOS represents a StorageOS volume attached - and mounted on Kubernetes nodes. - properties: - fsType: - description: fsType is the filesystem type to mount. - Must be a filesystem type supported by the host operating - system. Ex. "ext4", "xfs", "ntfs". Implicitly inferred - to be "ext4" if unspecified. - type: string - readOnly: - description: readOnly defaults to false (read/write). - ReadOnly here will force the ReadOnly setting in VolumeMounts. - type: boolean - secretRef: - description: secretRef specifies the secret to use for - obtaining the StorageOS API credentials. If not specified, - default values will be attempted. - properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' - type: string - type: object - x-kubernetes-map-type: atomic - volumeName: - description: volumeName is the human-readable name of - the StorageOS volume. Volume names are only unique - within a namespace. - type: string - volumeNamespace: - description: volumeNamespace specifies the scope of - the volume within StorageOS. If no namespace is specified - then the Pod's namespace will be used. This allows - the Kubernetes name scoping to be mirrored within - StorageOS for tighter integration. Set VolumeName - to any name to override the default behaviour. Set - to "default" if you are not using namespaces within - StorageOS. Namespaces that do not pre-exist within - StorageOS will be created. - type: string - type: object - vsphereVolume: - description: vsphereVolume represents a vSphere volume attached - and mounted on kubelets host machine - properties: - fsType: - description: fsType is filesystem type to mount. Must - be a filesystem type supported by the host operating - system. Ex. "ext4", "xfs", "ntfs". Implicitly inferred - to be "ext4" if unspecified. - type: string - storagePolicyID: - description: storagePolicyID is the storage Policy Based - Management (SPBM) profile ID associated with the StoragePolicyName. - type: string - storagePolicyName: - description: storagePolicyName is the storage Policy - Based Management (SPBM) profile name. - type: string - volumePath: - description: volumePath is the path that identifies - vSphere volume vmdk - type: string - required: - - volumePath - type: object - required: - - name - type: object - type: array - type: object - templateName: - type: string - timeChaos: - description: TimeChaosSpec defines the desired state of TimeChaos - properties: - clockIds: - description: ClockIds defines all affected clock id All available - options are ["CLOCK_REALTIME","CLOCK_MONOTONIC","CLOCK_PROCESS_CPUTIME_ID","CLOCK_THREAD_CPUTIME_ID", - "CLOCK_MONOTONIC_RAW","CLOCK_REALTIME_COARSE","CLOCK_MONOTONIC_COARSE","CLOCK_BOOTTIME","CLOCK_REALTIME_ALARM", - "CLOCK_BOOTTIME_ALARM"] Default value is ["CLOCK_REALTIME"] - items: - type: string - type: array - containerNames: - description: ContainerNames indicates list of the name of affected - container. If not set, the first container will be injected - items: - type: string - type: array - duration: - description: Duration represents the duration of the chaos action - type: string - mode: - description: 'Mode defines the mode to run chaos action. Supported - mode: one / all / fixed / fixed-percent / random-max-percent' - enum: - - one - - all - - fixed - - fixed-percent - - random-max-percent - type: string - remoteCluster: - description: RemoteCluster represents the remote cluster where - the chaos will be deployed - type: string - selector: - description: Selector is used to select pods that are used to - inject chaos action. - properties: - annotationSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be used - to select objects. A selector based on annotations. - type: object - expressionSelectors: - description: a slice of label selector expressions that can - be used to select objects. A list of selectors based on - set-based label expressions. - items: - description: A label selector requirement is a selector - that contains values, a key, and an operator that relates - the key and values. - properties: - key: - description: key is the label key that the selector - applies to. - type: string - operator: - description: operator represents a key's relationship - to a set of values. Valid operators are In, NotIn, - Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. If - the operator is In or NotIn, the values array must - be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. This array is replaced - during a strategic merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - fieldSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be used - to select objects. A selector based on fields. - type: object - labelSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be used - to select objects. A selector based on labels. - type: object - namespaces: - description: Namespaces is a set of namespace to which objects - belong. - items: - type: string - type: array - nodeSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can be used - to select nodes. Selector which must match a node's labels, - and objects must belong to these selected nodes. - type: object - nodes: - description: Nodes is a set of node name and objects must - belong to these nodes. - items: - type: string - type: array - podPhaseSelectors: - description: 'PodPhaseSelectors is a set of condition of a - pod at the current time. supported value: Pending / Running - / Succeeded / Failed / Unknown' - items: - type: string - type: array - pods: - additionalProperties: - items: - type: string - type: array - description: Pods is a map of string keys and a set values - that used to select pods. The key defines the namespace - which pods belong, and the each values is a set of pod names. - type: object - type: object - timeOffset: - description: TimeOffset defines the delta time of injected program. - It's a possibly signed sequence of decimal numbers, such as - "300ms", "-1.5h" or "2h45m". Valid time units are "ns", "us" - (or "µs"), "ms", "s", "m", "h". - type: string - value: - description: Value is required when the mode is set to `FixedMode` - / `FixedPercentMode` / `RandomMaxPercentMode`. If `FixedMode`, - provide an integer of pods to do chaos action. If `FixedPercentMode`, - provide a number from 0-100 to specify the percent of pods the - server can do chaos action. IF `RandomMaxPercentMode`, provide - a number from 0-100 to specify the max percent of pods to do - chaos action - type: string - required: - - mode - - selector - - timeOffset - type: object - type: - type: string - workflowName: - type: string - required: - - startTime - - templateName - - type - - workflowName - type: object - status: - description: Most recently observed status of the workflow node - properties: - activeChildren: - description: ActiveChildren means the created children node - items: - description: LocalObjectReference contains enough information to - let you locate the referenced object inside the same namespace. - properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - type: object - x-kubernetes-map-type: atomic - type: array - chaosResource: - description: ChaosResource refs to the real chaos CR object. - properties: - apiGroup: - description: APIGroup is the group for the resource being referenced. - If APIGroup is not specified, the specified Kind must be in - the core API group. For any other third-party types, APIGroup - is required. - type: string - kind: - description: Kind is the type of resource being referenced - type: string - name: - description: Name is the name of resource being referenced - type: string - required: - - kind - - name - type: object - x-kubernetes-map-type: atomic - conditionalBranchesStatus: - description: ConditionalBranchesStatus records the evaluation result - of each ConditionalBranch - properties: - branches: - items: - properties: - evaluationResult: - type: string - target: - type: string - required: - - evaluationResult - - target - type: object - type: array - context: - items: - type: string - type: array - type: object - conditions: - description: Represents the latest available observations of a workflow - node's current state. - items: - properties: - reason: - type: string - status: - type: string - type: - type: string - required: - - reason - - status - - type - type: object - type: array - finishedChildren: - description: Children is necessary for representing the order when - replicated child template references by parent template. - items: - description: LocalObjectReference contains enough information to - let you locate the referenced object inside the same namespace. - properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - type: object - x-kubernetes-map-type: atomic - type: array - type: object - required: - - spec - type: object - served: true - storage: true - subresources: - status: {} - ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.13.0 - name: workflows.chaos-mesh.org -spec: - group: chaos-mesh.org - names: - kind: Workflow - listKind: WorkflowList - plural: workflows - shortNames: - - wf - singular: workflow - scope: Namespaced - versions: - - name: v1alpha1 - schema: - openAPIV3Schema: - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - description: Spec defines the behavior of a workflow - properties: - entry: - type: string - templates: - items: - properties: - abortWithStatusCheck: - description: AbortWithStatusCheck describe whether to abort - the workflow when the failure threshold of StatusCheck is - exceeded. Only used when Type is TypeStatusCheck. - type: boolean - awsChaos: - description: AWSChaosSpec is the content of the specification - for an AWSChaos - properties: - action: - description: 'Action defines the specific aws chaos action. - Supported action: ec2-stop / ec2-restart / detach-volume - Default action: ec2-stop' - 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. - Needed in detach-volume. - type: string - duration: - description: Duration represents the duration of the chaos - action. - type: string - ec2Instance: - description: Ec2Instance indicates the ID of the ec2 instance. - type: string - endpoint: - description: Endpoint indicates the endpoint of the aws - server. Just used it in test now. - type: string - remoteCluster: - description: RemoteCluster represents the remote cluster - where the chaos will be deployed - type: string - secretName: - description: SecretName defines the name of kubernetes secret. - type: string - volumeID: - description: EbsVolume indicates the ID of the EBS volume. - Needed in detach-volume. - type: string - required: - - action - - awsRegion - - ec2Instance - type: object - azureChaos: - description: AzureChaosSpec is the content of the specification - for an AzureChaos - properties: - action: - description: 'Action defines the specific azure chaos action. - Supported action: vm-stop / vm-restart / disk-detach Default - action: vm-stop' - enum: - - vm-stop - - vm-restart - - disk-detach - type: string - diskName: - description: DiskName indicates the name of the disk. Needed - in disk-detach. - type: string - duration: - description: Duration represents the duration of the chaos - action. - type: string - lun: - description: LUN indicates the Logical Unit Number of the - data disk. Needed in disk-detach. - type: integer - remoteCluster: - description: RemoteCluster represents the remote cluster - where the chaos will be deployed - type: string - resourceGroupName: - description: ResourceGroupName defines the name of ResourceGroup - type: string - secretName: - description: SecretName defines the name of kubernetes secret. - It is used for Azure credentials. - type: string - subscriptionID: - description: SubscriptionID defines the id of Azure subscription. - type: string - vmName: - description: VMName defines the name of Virtual Machine - type: string - required: - - action - - resourceGroupName - - subscriptionID - - vmName - type: object - blockChaos: - description: BlockChaosSpec is the content of the specification - for a BlockChaos - properties: - action: - description: 'Action defines the specific block chaos action. - Supported action: delay' - enum: - - delay - type: string - containerNames: - description: ContainerNames indicates list of the name of - affected container. If not set, the first container will - be injected - items: - type: string - type: array - delay: - description: Delay defines the delay distribution. - properties: - correlation: - type: string - jitter: - type: string - latency: - description: Latency defines the latency of every io - request. - type: string - type: object - duration: - description: Duration represents the duration of the chaos - action. - type: string - mode: - description: 'Mode defines the mode to run chaos action. - Supported mode: one / all / fixed / fixed-percent / random-max-percent' - enum: - - one - - all - - fixed - - fixed-percent - - random-max-percent - type: string - remoteCluster: - description: RemoteCluster represents the remote cluster - where the chaos will be deployed - type: string - selector: - description: Selector is used to select pods that are used - to inject chaos action. - properties: - annotationSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can - be used to select objects. A selector based on annotations. - type: object - expressionSelectors: - description: a slice of label selector expressions that - can be used to select objects. A list of selectors - based on set-based label expressions. - items: - description: A label selector requirement is a selector - that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the label key that the selector - applies to. - type: string - operator: - description: operator represents a key's relationship - to a set of values. Valid operators are In, - NotIn, Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. - If the operator is In or NotIn, the values array - must be non-empty. If the operator is Exists - or DoesNotExist, the values array must be empty. - This array is replaced during a strategic merge - patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - fieldSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can - be used to select objects. A selector based on fields. - type: object - labelSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can - be used to select objects. A selector based on labels. - type: object - namespaces: - description: Namespaces is a set of namespace to which - objects belong. - items: - type: string - type: array - nodeSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can - be used to select nodes. Selector which must match - a node's labels, and objects must belong to these - selected nodes. - type: object - nodes: - description: Nodes is a set of node name and objects - must belong to these nodes. - items: - type: string - type: array - podPhaseSelectors: - description: 'PodPhaseSelectors is a set of condition - of a pod at the current time. supported value: Pending - / Running / Succeeded / Failed / Unknown' - items: - type: string - type: array - pods: - additionalProperties: - items: - type: string - type: array - description: Pods is a map of string keys and a set - values that used to select pods. The key defines the - namespace which pods belong, and the each values is - a set of pod names. - type: object - type: object - value: - description: Value is required when the mode is set to `FixedMode` - / `FixedPercentMode` / `RandomMaxPercentMode`. If `FixedMode`, - provide an integer of pods to do chaos action. If `FixedPercentMode`, - provide a number from 0-100 to specify the percent of - pods the server can do chaos action. IF `RandomMaxPercentMode`, provide - a number from 0-100 to specify the max percent of pods - to do chaos action - type: string - volumeName: - type: string - required: - - action - - mode - - selector - - volumeName - type: object - children: - description: Children describes the children steps of serial - or parallel node. Only used when Type is TypeSerial or TypeParallel. - items: - type: string - type: array - conditionalBranches: - description: ConditionalBranches describes the conditional branches - of custom tasks. Only used when Type is TypeTask. - items: - properties: - expression: - description: Expression is the expression for this conditional - branch, expected type of result is boolean. If expression - is empty, this branch will always be selected/the template - will be spawned. - type: string - target: - description: Target is the name of other template, if - expression is evaluated as true, this template will - be spawned. - type: string - required: - - target - type: object - type: array - deadline: - type: string - dnsChaos: - description: DNSChaosSpec defines the desired state of DNSChaos - properties: - action: - description: 'Action defines the specific DNS chaos action. - Supported action: error, random Default action: error' - enum: - - error - - random - type: string - containerNames: - description: ContainerNames indicates list of the name of - affected container. If not set, the first container will - be injected - items: - type: string - type: array - duration: - description: Duration represents the duration of the chaos - action - type: string - mode: - description: 'Mode defines the mode to run chaos action. - Supported mode: one / all / fixed / fixed-percent / random-max-percent' - enum: - - one - - all - - fixed - - fixed-percent - - random-max-percent - type: string - patterns: - description: 'Choose which domain names to take effect, - support the placeholder ? and wildcard *, or the Specified - domain name. Note: 1. The wildcard * must be at the end - of the string. For example, chaos-*.org is invalid. 2. - if the patterns is empty, will take effect on all the - domain names. For example: The value is ["google.com", - "github.*", "chaos-mes?.org"], will take effect on "google.com", - "github.com" and "chaos-mesh.org"' - items: - type: string - type: array - remoteCluster: - description: RemoteCluster represents the remote cluster - where the chaos will be deployed - type: string - selector: - description: Selector is used to select pods that are used - to inject chaos action. - properties: - annotationSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can - be used to select objects. A selector based on annotations. - type: object - expressionSelectors: - description: a slice of label selector expressions that - can be used to select objects. A list of selectors - based on set-based label expressions. - items: - description: A label selector requirement is a selector - that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the label key that the selector - applies to. - type: string - operator: - description: operator represents a key's relationship - to a set of values. Valid operators are In, - NotIn, Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. - If the operator is In or NotIn, the values array - must be non-empty. If the operator is Exists - or DoesNotExist, the values array must be empty. - This array is replaced during a strategic merge - patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - fieldSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can - be used to select objects. A selector based on fields. - type: object - labelSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can - be used to select objects. A selector based on labels. - type: object - namespaces: - description: Namespaces is a set of namespace to which - objects belong. - items: - type: string - type: array - nodeSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can - be used to select nodes. Selector which must match - a node's labels, and objects must belong to these - selected nodes. - type: object - nodes: - description: Nodes is a set of node name and objects - must belong to these nodes. - items: - type: string - type: array - podPhaseSelectors: - description: 'PodPhaseSelectors is a set of condition - of a pod at the current time. supported value: Pending - / Running / Succeeded / Failed / Unknown' - items: - type: string - type: array - pods: - additionalProperties: - items: - type: string - type: array - description: Pods is a map of string keys and a set - values that used to select pods. The key defines the - namespace which pods belong, and the each values is - a set of pod names. - type: object - type: object - value: - description: Value is required when the mode is set to `FixedMode` - / `FixedPercentMode` / `RandomMaxPercentMode`. If `FixedMode`, - provide an integer of pods to do chaos action. If `FixedPercentMode`, - provide a number from 0-100 to specify the percent of - pods the server can do chaos action. IF `RandomMaxPercentMode`, provide - a number from 0-100 to specify the max percent of pods - to do chaos action - type: string - required: - - action - - mode - - selector - type: object - gcpChaos: - description: GCPChaosSpec is the content of the specification - for a GCPChaos - properties: - action: - description: 'Action defines the specific gcp chaos action. - Supported action: node-stop / node-reset / disk-loss Default - action: node-stop' - enum: - - node-stop - - node-reset - - disk-loss - type: string - deviceNames: - description: The device name of disks to detach. Needed - in disk-loss. - items: - type: string - type: array - duration: - description: Duration represents the duration of the chaos - action. - type: string - instance: - description: Instance defines the name of the instance - type: string - project: - description: Project defines the ID of gcp project. - type: string - remoteCluster: - description: RemoteCluster represents the remote cluster - where the chaos will be deployed - type: string - secretName: - description: SecretName defines the name of kubernetes secret. - It is used for GCP credentials. - type: string - zone: - description: Zone defines the zone of gcp project. - type: string - required: - - action - - instance - - project - - zone - type: object - httpChaos: - properties: - abort: - description: Abort is a rule to abort a http session. - type: boolean - code: - description: Code is a rule to select target by http status - code in response. - format: int32 - type: integer - delay: - description: Delay represents the delay of the target request/response. - A duration string is a possibly unsigned sequence of decimal - numbers, each with optional fraction and a unit suffix, - such as "300ms", "2h45m". Valid time units are "ns", "us" - (or "µs"), "ms", "s", "m", "h". - type: string - duration: - description: Duration represents the duration of the chaos - action. - type: string - method: - description: Method is a rule to select target by http method - in request. - type: string - mode: - description: 'Mode defines the mode to run chaos action. - Supported mode: one / all / fixed / fixed-percent / random-max-percent' - enum: - - one - - all - - fixed - - fixed-percent - - random-max-percent - type: string - patch: - description: Patch is a rule to patch some contents in target. - properties: - body: - description: Body is a rule to patch message body of - target. - properties: - type: - description: Type represents the patch type, only - support `JSON` as [merge patch json](https://tools.ietf.org/html/rfc7396) - currently. - type: string - value: - description: Value is the patch contents. - type: string - required: - - type - - value - type: object - headers: - description: 'Headers is a rule to append http headers - of target. For example: `[["Set-Cookie", ""], - ["Set-Cookie", ""]]`.' - items: - items: - type: string - type: array - type: array - queries: - description: 'Queries is a rule to append uri queries - of target(Request only). For example: `[["foo", "bar"], - ["foo", "unknown"]]`.' - items: - items: - type: string - type: array - type: array - type: object - path: - description: Path is a rule to select target by uri path - in http request. - type: string - port: - description: Port represents the target port to be proxy - of. - format: int32 - type: integer - remoteCluster: - description: RemoteCluster represents the remote cluster - where the chaos will be deployed - type: string - replace: - description: Replace is a rule to replace some contents - in target. - properties: - body: - description: Body is a rule to replace http message - body in target. - format: byte - type: string - code: - description: Code is a rule to replace http status code - in response. - format: int32 - type: integer - headers: - additionalProperties: - type: string - description: Headers is a rule to replace http headers - of target. The key-value pairs represent header name - and header value pairs. - type: object - method: - description: Method is a rule to replace http method - in request. - type: string - path: - description: Path is rule to to replace uri path in - http request. - type: string - queries: - additionalProperties: - type: string - description: 'Queries is a rule to replace uri queries - in http request. For example, with value `{ "foo": - "unknown" }`, the `/?foo=bar` will be altered to `/?foo=unknown`,' - type: object - type: object - request_headers: - additionalProperties: - type: string - description: RequestHeaders is a rule to select target by - http headers in request. The key-value pairs represent - header name and header value pairs. - type: object - response_headers: - additionalProperties: - type: string - description: ResponseHeaders is a rule to select target - by http headers in response. The key-value pairs represent - header name and header value pairs. - type: object - selector: - description: Selector is used to select pods that are used - to inject chaos action. - properties: - annotationSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can - be used to select objects. A selector based on annotations. - type: object - expressionSelectors: - description: a slice of label selector expressions that - can be used to select objects. A list of selectors - based on set-based label expressions. - items: - description: A label selector requirement is a selector - that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the label key that the selector - applies to. - type: string - operator: - description: operator represents a key's relationship - to a set of values. Valid operators are In, - NotIn, Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. - If the operator is In or NotIn, the values array - must be non-empty. If the operator is Exists - or DoesNotExist, the values array must be empty. - This array is replaced during a strategic merge - patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - fieldSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can - be used to select objects. A selector based on fields. - type: object - labelSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can - be used to select objects. A selector based on labels. - type: object - namespaces: - description: Namespaces is a set of namespace to which - objects belong. - items: - type: string - type: array - nodeSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can - be used to select nodes. Selector which must match - a node's labels, and objects must belong to these - selected nodes. - type: object - nodes: - description: Nodes is a set of node name and objects - must belong to these nodes. - items: - type: string - type: array - podPhaseSelectors: - description: 'PodPhaseSelectors is a set of condition - of a pod at the current time. supported value: Pending - / Running / Succeeded / Failed / Unknown' - items: - type: string - type: array - pods: - additionalProperties: - items: - type: string - type: array - description: Pods is a map of string keys and a set - values that used to select pods. The key defines the - namespace which pods belong, and the each values is - a set of pod names. - type: object - type: object - target: - description: Target is the object to be selected and injected. - enum: - - Request - - Response - type: string - tls: - description: TLS is the tls config, will override PodHttpChaos - if there are multiple HTTPChaos experiments are applied - properties: - caName: - description: CAName represents the data name of ca file - in secret, `ca.crt` for example - type: string - certName: - description: CertName represents the data name of cert - file in secret, `tls.crt` for example - type: string - keyName: - description: KeyName represents the data name of key - file in secret, `tls.key` for example - type: string - secretName: - description: SecretName represents the name of required - secret resource - type: string - secretNamespace: - description: SecretNamespace represents the namespace - of required secret resource - type: string - required: - - certName - - keyName - - secretName - - secretNamespace - type: object - value: - description: Value is required when the mode is set to `FixedMode` - / `FixedPercentMode` / `RandomMaxPercentMode`. If `FixedMode`, - provide an integer of pods to do chaos action. If `FixedPercentMode`, - provide a number from 0-100 to specify the percent of - pods the server can do chaos action. IF `RandomMaxPercentMode`, provide - a number from 0-100 to specify the max percent of pods - to do chaos action - type: string - required: - - mode - - selector - - target - type: object - ioChaos: - description: IOChaosSpec defines the desired state of IOChaos - properties: - action: - description: 'Action defines the specific pod chaos action. - Supported action: latency / fault / attrOverride / mistake' - enum: - - latency - - fault - - attrOverride - - mistake - type: string - attr: - description: Attr defines the overrided attribution - properties: - atime: - description: Timespec represents a time - properties: - nsec: - format: int64 - type: integer - sec: - format: int64 - type: integer - required: - - nsec - - sec - type: object - blocks: - format: int64 - type: integer - ctime: - description: Timespec represents a time - properties: - nsec: - format: int64 - type: integer - sec: - format: int64 - type: integer - required: - - nsec - - sec - type: object - gid: - format: int32 - type: integer - ino: - format: int64 - type: integer - kind: - description: FileType represents type of file - type: string - mtime: - description: Timespec represents a time - properties: - nsec: - format: int64 - type: integer - sec: - format: int64 - type: integer - required: - - nsec - - sec - type: object - nlink: - format: int32 - type: integer - perm: - type: integer - rdev: - format: int32 - type: integer - size: - format: int64 - type: integer - uid: - format: int32 - type: integer - type: object - containerNames: - description: ContainerNames indicates list of the name of - affected container. If not set, the first container will - be injected - items: - type: string - type: array - delay: - description: Delay defines the value of I/O chaos action - delay. A delay string is a possibly signed sequence of - decimal numbers, each with optional fraction and a unit - suffix, such as "300ms". Valid time units are "ns", "us" - (or "µs"), "ms", "s", "m", "h". - type: string - duration: - description: Duration represents the duration of the chaos - action. It is required when the action is `PodFailureAction`. - A duration string is a possibly signed sequence of decimal - numbers, each with optional fraction and a unit suffix, - such as "300ms", "-1.5h" or "2h45m". Valid time units - are "ns", "us" (or "µs"), "ms", "s", "m", "h". - type: string - errno: - description: 'Errno defines the error code that returned - by I/O action. refer to: https://www-numi.fnal.gov/offline_software/srt_public_context/WebDocs/Errors/unix_system_errors.html' - format: int32 - type: integer - methods: - description: 'Methods defines the I/O methods for injecting - I/O chaos action. default: all I/O methods.' - items: - type: string - type: array - mistake: - description: Mistake defines what types of incorrectness - are injected to IO operations - properties: - filling: - description: Filling determines what is filled in the - mistake data. - enum: - - zero - - random - type: string - maxLength: - description: Max length of each wrong data segment in - bytes - format: int64 - minimum: 1 - type: integer - maxOccurrences: - description: There will be [1, MaxOccurrences] segments - of wrong data. - format: int64 - minimum: 1 - type: integer - type: object - mode: - description: 'Mode defines the mode to run chaos action. - Supported mode: one / all / fixed / fixed-percent / random-max-percent' - enum: - - one - - all - - fixed - - fixed-percent - - random-max-percent - type: string - path: - description: Path defines the path of files for injecting - I/O chaos action. - type: string - percent: - default: 100 - description: 'Percent defines the percentage of injection - errors and provides a number from 0-100. default: 100.' - type: integer - remoteCluster: - description: RemoteCluster represents the remote cluster - where the chaos will be deployed - type: string - selector: - description: Selector is used to select pods that are used - to inject chaos action. - properties: - annotationSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can - be used to select objects. A selector based on annotations. - type: object - expressionSelectors: - description: a slice of label selector expressions that - can be used to select objects. A list of selectors - based on set-based label expressions. - items: - description: A label selector requirement is a selector - that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the label key that the selector - applies to. - type: string - operator: - description: operator represents a key's relationship - to a set of values. Valid operators are In, - NotIn, Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. - If the operator is In or NotIn, the values array - must be non-empty. If the operator is Exists - or DoesNotExist, the values array must be empty. - This array is replaced during a strategic merge - patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - fieldSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can - be used to select objects. A selector based on fields. - type: object - labelSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can - be used to select objects. A selector based on labels. - type: object - namespaces: - description: Namespaces is a set of namespace to which - objects belong. - items: - type: string - type: array - nodeSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can - be used to select nodes. Selector which must match - a node's labels, and objects must belong to these - selected nodes. - type: object - nodes: - description: Nodes is a set of node name and objects - must belong to these nodes. - items: - type: string - type: array - podPhaseSelectors: - description: 'PodPhaseSelectors is a set of condition - of a pod at the current time. supported value: Pending - / Running / Succeeded / Failed / Unknown' - items: - type: string - type: array - pods: - additionalProperties: - items: - type: string - type: array - description: Pods is a map of string keys and a set - values that used to select pods. The key defines the - namespace which pods belong, and the each values is - a set of pod names. - type: object - type: object - value: - description: Value is required when the mode is set to `FixedMode` - / `FixedPercentMode` / `RandomMaxPercentMode`. If `FixedMode`, - provide an integer of pods to do chaos action. If `FixedPercentMode`, - provide a number from 0-100 to specify the percent of - pods the server can do chaos action. IF `RandomMaxPercentMode`, provide - a number from 0-100 to specify the max percent of pods - to do chaos action - type: string - volumePath: - description: VolumePath represents the mount path of injected - volume - type: string - required: - - action - - mode - - selector - - volumePath - type: object - jvmChaos: - description: JVMChaosSpec defines the desired state of JVMChaos - properties: - action: - description: 'Action defines the specific jvm chaos action. - Supported action: latency;return;exception;stress;gc;ruleData' - enum: - - latency - - return - - exception - - stress - - gc - - ruleData - - mysql - type: string - class: - description: Java class - type: string - containerNames: - description: ContainerNames indicates list of the name of - affected container. If not set, the first container will - be injected - items: - type: string - type: array - cpuCount: - description: the CPU core number needs to use, only set - it when action is stress - type: integer - database: - description: the match database default value is "", means - match all database - type: string - duration: - description: Duration represents the duration of the chaos - action - type: string - exception: - description: the exception which needs to throw for action - `exception` or the exception message needs to throw in - action `mysql` - type: string - latency: - description: the latency duration for action 'latency', - unit ms or the latency duration in action `mysql` - type: integer - memType: - description: the memory type needs to locate, only set it - when action is stress, the value can be 'stack' or 'heap' - type: string - method: - description: the method in Java class - type: string - mode: - description: 'Mode defines the mode to run chaos action. - Supported mode: one / all / fixed / fixed-percent / random-max-percent' - enum: - - one - - all - - fixed - - fixed-percent - - random-max-percent - type: string - mysqlConnectorVersion: - description: the version of mysql-connector-java, only support - 5.X.X(set to "5") and 8.X.X(set to "8") now - type: string - name: - description: byteman rule name, should be unique, and will - generate one if not set - type: string - pid: - description: the pid of Java process which needs to attach - type: integer - port: - description: the port of agent server, default 9277 - format: int32 - type: integer - remoteCluster: - description: RemoteCluster represents the remote cluster - where the chaos will be deployed - type: string - ruleData: - description: the byteman rule's data for action 'ruleData' - type: string - selector: - description: Selector is used to select pods that are used - to inject chaos action. - properties: - annotationSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can - be used to select objects. A selector based on annotations. - type: object - expressionSelectors: - description: a slice of label selector expressions that - can be used to select objects. A list of selectors - based on set-based label expressions. - items: - description: A label selector requirement is a selector - that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the label key that the selector - applies to. - type: string - operator: - description: operator represents a key's relationship - to a set of values. Valid operators are In, - NotIn, Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. - If the operator is In or NotIn, the values array - must be non-empty. If the operator is Exists - or DoesNotExist, the values array must be empty. - This array is replaced during a strategic merge - patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - fieldSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can - be used to select objects. A selector based on fields. - type: object - labelSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can - be used to select objects. A selector based on labels. - type: object - namespaces: - description: Namespaces is a set of namespace to which - objects belong. - items: - type: string - type: array - nodeSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can - be used to select nodes. Selector which must match - a node's labels, and objects must belong to these - selected nodes. - type: object - nodes: - description: Nodes is a set of node name and objects - must belong to these nodes. - items: - type: string - type: array - podPhaseSelectors: - description: 'PodPhaseSelectors is a set of condition - of a pod at the current time. supported value: Pending - / Running / Succeeded / Failed / Unknown' - items: - type: string - type: array - pods: - additionalProperties: - items: - type: string - type: array - description: Pods is a map of string keys and a set - values that used to select pods. The key defines the - namespace which pods belong, and the each values is - a set of pod names. - type: object - type: object - sqlType: - description: the match sql type default value is "", means - match all SQL type. The value can be 'select', 'insert', - 'update', 'delete', 'replace'. - type: string - table: - description: the match table default value is "", means - match all table - type: string - value: - description: Value is required when the mode is set to `FixedMode` - / `FixedPercentMode` / `RandomMaxPercentMode`. If `FixedMode`, - provide an integer of pods to do chaos action. If `FixedPercentMode`, - provide a number from 0-100 to specify the percent of - pods the server can do chaos action. IF `RandomMaxPercentMode`, provide - a number from 0-100 to specify the max percent of pods - to do chaos action - type: string - required: - - action - - mode - - selector - type: object - kernelChaos: - description: KernelChaosSpec defines the desired state of KernelChaos - properties: - containerNames: - description: ContainerNames indicates list of the name of - affected container. If not set, the first container will - be injected - items: - type: string - type: array - duration: - description: Duration represents the duration of the chaos - action - type: string - failKernRequest: - description: FailKernRequest defines the request of kernel - injection - properties: - callchain: - description: 'Callchain indicate a special call chain, - such as: ext4_mount -> mount_subtree -> ... -> should_failslab - With an optional set of predicates and an optional - set of parameters, which used with predicates. You - can read call chan and predicate examples from https://github.com/chaos-mesh/bpfki/tree/develop/examples - to learn more. If no special call chain, just keep - Callchain empty, which means it will fail at any call - chain with slab alloc (eg: kmalloc).' - items: - description: Frame defines the function signature - and predicate in function's body - properties: - funcname: - description: Funcname can be find from kernel - source or `/proc/kallsyms`, such as `ext4_mount` - type: string - parameters: - description: Parameters is used with predicate, - for example, if you want to inject slab error - in `d_alloc_parallel(struct dentry *parent, - const struct qstr *name)` with a special name - `bananas`, you need to set it to `struct dentry - *parent, const struct qstr *name` otherwise - omit it. - type: string - predicate: - description: Predicate will access the arguments - of this Frame, example with Parameters's, you - can set it to `STRNCMP(name->name, "bananas", - 8)` to make inject only with it, or omit it - to inject for all d_alloc_parallel call chain. - type: string - type: object - type: array - failtype: - description: 'FailType indicates what to fail, can be - set to ''0'' / ''1'' / ''2'' If `0`, indicates slab - to fail (should_failslab) If `1`, indicates alloc_page - to fail (should_fail_alloc_page) If `2`, indicates - bio to fail (should_fail_bio) You can read: 1. https://www.kernel.org/doc/html/latest/fault-injection/fault-injection.html - 2. http://github.com/iovisor/bcc/blob/master/tools/inject_example.txt - to learn more' - format: int32 - maximum: 2 - minimum: 0 - type: integer - headers: - description: 'Headers indicates the appropriate kernel - headers you need. Eg: "linux/mmzone.h", "linux/blkdev.h" - and so on' - items: - type: string - type: array - probability: - description: Probability indicates the fails with probability. - If you want 1%, please set this field with 1. - format: int32 - maximum: 100 - minimum: 0 - type: integer - times: - description: Times indicates the max times of fails. - format: int32 - minimum: 0 - type: integer - required: - - failtype - type: object - mode: - description: 'Mode defines the mode to run chaos action. - Supported mode: one / all / fixed / fixed-percent / random-max-percent' - enum: - - one - - all - - fixed - - fixed-percent - - random-max-percent - type: string - remoteCluster: - description: RemoteCluster represents the remote cluster - where the chaos will be deployed - type: string - selector: - description: Selector is used to select pods that are used - to inject chaos action. - properties: - annotationSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can - be used to select objects. A selector based on annotations. - type: object - expressionSelectors: - description: a slice of label selector expressions that - can be used to select objects. A list of selectors - based on set-based label expressions. - items: - description: A label selector requirement is a selector - that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the label key that the selector - applies to. - type: string - operator: - description: operator represents a key's relationship - to a set of values. Valid operators are In, - NotIn, Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. - If the operator is In or NotIn, the values array - must be non-empty. If the operator is Exists - or DoesNotExist, the values array must be empty. - This array is replaced during a strategic merge - patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - fieldSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can - be used to select objects. A selector based on fields. - type: object - labelSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can - be used to select objects. A selector based on labels. - type: object - namespaces: - description: Namespaces is a set of namespace to which - objects belong. - items: - type: string - type: array - nodeSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can - be used to select nodes. Selector which must match - a node's labels, and objects must belong to these - selected nodes. - type: object - nodes: - description: Nodes is a set of node name and objects - must belong to these nodes. - items: - type: string - type: array - podPhaseSelectors: - description: 'PodPhaseSelectors is a set of condition - of a pod at the current time. supported value: Pending - / Running / Succeeded / Failed / Unknown' - items: - type: string - type: array - pods: - additionalProperties: - items: - type: string - type: array - description: Pods is a map of string keys and a set - values that used to select pods. The key defines the - namespace which pods belong, and the each values is - a set of pod names. - type: object - type: object - value: - description: Value is required when the mode is set to `FixedMode` - / `FixedPercentMode` / `RandomMaxPercentMode`. If `FixedMode`, - provide an integer of pods to do chaos action. If `FixedPercentMode`, - provide a number from 0-100 to specify the percent of - pods the server can do chaos action. IF `RandomMaxPercentMode`, provide - a number from 0-100 to specify the max percent of pods - to do chaos action - type: string - required: - - failKernRequest - - mode - - selector - type: object - name: - type: string - networkChaos: - description: NetworkChaosSpec defines the desired state of NetworkChaos - properties: - action: - description: 'Action defines the specific network chaos - action. Supported action: partition, netem, delay, loss, - duplicate, corrupt Default action: delay' - enum: - - netem - - delay - - loss - - duplicate - - corrupt - - partition - - bandwidth - type: string - bandwidth: - description: Bandwidth represents the detail about bandwidth - control action - properties: - buffer: - description: Buffer is the maximum amount of bytes that - tokens can be available for instantaneously. - format: int32 - minimum: 1 - type: integer - limit: - description: Limit is the number of bytes that can be - queued waiting for tokens to become available. - format: int32 - minimum: 1 - type: integer - minburst: - description: Minburst specifies the size of the peakrate - bucket. For perfect accuracy, should be set to the - MTU of the interface. If a peakrate is needed, but - some burstiness is acceptable, this size can be raised. - A 3000 byte minburst allows around 3mbit/s of peakrate, - given 1000 byte packets. - format: int32 - minimum: 0 - type: integer - peakrate: - description: Peakrate is the maximum depletion rate - of the bucket. The peakrate does not need to be set, - it is only necessary if perfect millisecond timescale - shaping is required. - format: int64 - minimum: 0 - type: integer - rate: - description: Rate is the speed knob. Allows bit, kbit, - mbit, gbit, tbit, bps, kbps, mbps, gbps, tbps unit. - bps means bytes per second. - type: string - required: - - buffer - - limit - - rate - type: object - corrupt: - description: Corrupt represents the detail about corrupt - action - properties: - correlation: - type: string - corrupt: - type: string - required: - - corrupt - type: object - delay: - description: Delay represents the detail about delay action - properties: - correlation: - type: string - jitter: - type: string - latency: - type: string - reorder: - description: ReorderSpec defines details of packet reorder. - properties: - correlation: - type: string - gap: - type: integer - reorder: - type: string - required: - - gap - - reorder - type: object - required: - - latency - type: object - device: - description: Device represents the network device to be - affected. - type: string - direction: - default: to - description: Direction represents the direction, this applies - on netem and network partition action - enum: - - to - - from - - both - type: string - duplicate: - description: DuplicateSpec represents the detail about loss - action - properties: - correlation: - type: string - duplicate: - type: string - required: - - duplicate - type: object - duration: - description: Duration represents the duration of the chaos - action - type: string - externalTargets: - description: ExternalTargets represents network targets - outside k8s - items: - type: string - type: array - loss: - description: Loss represents the detail about loss action - properties: - correlation: - type: string - loss: - type: string - required: - - loss - type: object - mode: - description: 'Mode defines the mode to run chaos action. - Supported mode: one / all / fixed / fixed-percent / random-max-percent' - enum: - - one - - all - - fixed - - fixed-percent - - random-max-percent - type: string - rate: - description: Rate represents the detail about rate control - action - properties: - rate: - description: Rate is the speed knob. Allows bit, kbit, - mbit, gbit, tbit, bps, kbps, mbps, gbps, tbps unit. - bps means bytes per second. - type: string - required: - - rate - type: object - remoteCluster: - description: RemoteCluster represents the remote cluster - where the chaos will be deployed - type: string - selector: - description: Selector is used to select pods that are used - to inject chaos action. - properties: - annotationSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can - be used to select objects. A selector based on annotations. - type: object - expressionSelectors: - description: a slice of label selector expressions that - can be used to select objects. A list of selectors - based on set-based label expressions. - items: - description: A label selector requirement is a selector - that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the label key that the selector - applies to. - type: string - operator: - description: operator represents a key's relationship - to a set of values. Valid operators are In, - NotIn, Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. - If the operator is In or NotIn, the values array - must be non-empty. If the operator is Exists - or DoesNotExist, the values array must be empty. - This array is replaced during a strategic merge - patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - fieldSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can - be used to select objects. A selector based on fields. - type: object - labelSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can - be used to select objects. A selector based on labels. - type: object - namespaces: - description: Namespaces is a set of namespace to which - objects belong. - items: - type: string - type: array - nodeSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can - be used to select nodes. Selector which must match - a node's labels, and objects must belong to these - selected nodes. - type: object - nodes: - description: Nodes is a set of node name and objects - must belong to these nodes. - items: - type: string - type: array - podPhaseSelectors: - description: 'PodPhaseSelectors is a set of condition - of a pod at the current time. supported value: Pending - / Running / Succeeded / Failed / Unknown' - items: - type: string - type: array - pods: - additionalProperties: - items: - type: string - type: array - description: Pods is a map of string keys and a set - values that used to select pods. The key defines the - namespace which pods belong, and the each values is - a set of pod names. - type: object - type: object - target: - description: Target represents network target, this applies - on netem and network partition action - properties: - mode: - description: 'Mode defines the mode to run chaos action. - Supported mode: one / all / fixed / fixed-percent - / random-max-percent' - enum: - - one - - all - - fixed - - fixed-percent - - random-max-percent - type: string - selector: - description: Selector is used to select pods that are - used to inject chaos action. - properties: - annotationSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select objects. A selector based - on annotations. - type: object - expressionSelectors: - description: a slice of label selector expressions - that can be used to select objects. A list of - selectors based on set-based label expressions. - items: - description: A label selector requirement is a - selector that contains values, a key, and an - operator that relates the key and values. - properties: - key: - description: key is the label key that the - selector applies to. - type: string - operator: - description: operator represents a key's relationship - to a set of values. Valid operators are - In, NotIn, Exists and DoesNotExist. - type: string - values: - description: values is an array of string - values. If the operator is In or NotIn, - the values array must be non-empty. If the - operator is Exists or DoesNotExist, the - values array must be empty. This array is - replaced during a strategic merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - fieldSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select objects. A selector based - on fields. - type: object - labelSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select objects. A selector based - on labels. - type: object - namespaces: - description: Namespaces is a set of namespace to - which objects belong. - items: - type: string - type: array - nodeSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select nodes. Selector which must - match a node's labels, and objects must belong - to these selected nodes. - type: object - nodes: - description: Nodes is a set of node name and objects - must belong to these nodes. - items: - type: string - type: array - podPhaseSelectors: - description: 'PodPhaseSelectors is a set of condition - of a pod at the current time. supported value: - Pending / Running / Succeeded / Failed / Unknown' - items: - type: string - type: array - pods: - additionalProperties: - items: - type: string - type: array - description: Pods is a map of string keys and a - set values that used to select pods. The key defines - the namespace which pods belong, and the each - values is a set of pod names. - type: object - type: object - value: - description: Value is required when the mode is set - to `FixedMode` / `FixedPercentMode` / `RandomMaxPercentMode`. - If `FixedMode`, provide an integer of pods to do chaos - action. If `FixedPercentMode`, provide a number from - 0-100 to specify the percent of pods the server can - do chaos action. IF `RandomMaxPercentMode`, provide - a number from 0-100 to specify the max percent of - pods to do chaos action - type: string - required: - - mode - - selector - type: object - targetDevice: - description: TargetDevice represents the network device - to be affected in target scope. - type: string - value: - description: Value is required when the mode is set to `FixedMode` - / `FixedPercentMode` / `RandomMaxPercentMode`. If `FixedMode`, - provide an integer of pods to do chaos action. If `FixedPercentMode`, - provide a number from 0-100 to specify the percent of - pods the server can do chaos action. IF `RandomMaxPercentMode`, provide - a number from 0-100 to specify the max percent of pods - to do chaos action - type: string - required: - - action - - mode - - selector - type: object - physicalmachineChaos: - description: PhysicalMachineChaosSpec defines the desired state - of PhysicalMachineChaos - properties: - action: - description: the subAction, generate automatically - enum: - - stress-cpu - - stress-mem - - disk-read-payload - - disk-write-payload - - disk-fill - - network-corrupt - - network-duplicate - - network-loss - - network-delay - - network-partition - - network-dns - - network-bandwidth - - network-flood - - network-down - - process - - jvm-exception - - jvm-gc - - jvm-latency - - jvm-return - - jvm-stress - - jvm-rule-data - - jvm-mysql - - clock - - redis-expiration - - redis-penetration - - redis-cacheLimit - - redis-restart - - redis-stop - - kafka-fill - - kafka-flood - - kafka-io - - file-create - - file-modify - - file-delete - - file-rename - - file-append - - file-replace - - vm - - user_defined - type: string - address: - description: 'DEPRECATED: Use Selector instead. Only one - of Address and Selector could be specified.' - items: - type: string - type: array - clock: - properties: - clock-ids-slice: - description: the identifier of the particular clock - on which to act. More clock description in linux kernel - can be found in man page of clock_getres, clock_gettime, - clock_settime. Muti clock ids should be split with - "," - type: string - pid: - description: the pid of target program. - type: integer - time-offset: - description: specifies the length of time offset. - type: string - type: object - disk-fill: - properties: - fill-by-fallocate: - description: fill disk by fallocate - type: boolean - path: - description: specifies the location to fill data in. - if path not provided, payload will read/write from/into - a temp file, temp file will be deleted after writing - type: string - size: - description: 'specifies how many units of data will - write into the file path. support unit: c=1, w=2, - b=512, kB=1000, K=1024, MB=1000*1000, M=1024*1024, - GB=1000*1000*1000, G=1024*1024*1024 BYTES. example - : 1M | 512kB' - type: string - type: object - disk-read-payload: - properties: - path: - description: specifies the location to fill data in. - if path not provided, payload will read/write from/into - a temp file, temp file will be deleted after writing - type: string - payload-process-num: - description: specifies the number of process work on - writing, default 1, only 1-255 is valid value - type: integer - size: - description: 'specifies how many units of data will - write into the file path. support unit: c=1, w=2, - b=512, kB=1000, K=1024, MB=1000*1000, M=1024*1024, - GB=1000*1000*1000, G=1024*1024*1024 BYTES. example - : 1M | 512kB' - type: string - type: object - disk-write-payload: - properties: - path: - description: specifies the location to fill data in. - if path not provided, payload will read/write from/into - a temp file, temp file will be deleted after writing - type: string - payload-process-num: - description: specifies the number of process work on - writing, default 1, only 1-255 is valid value - type: integer - size: - description: 'specifies how many units of data will - write into the file path. support unit: c=1, w=2, - b=512, kB=1000, K=1024, MB=1000*1000, M=1024*1024, - GB=1000*1000*1000, G=1024*1024*1024 BYTES. example - : 1M | 512kB' - type: string - type: object - duration: - description: Duration represents the duration of the chaos - action - type: string - file-append: - properties: - count: - description: Count is the number of times to append - the data. - type: integer - data: - description: Data is the data for append. - type: string - file-name: - description: FileName is the name of the file to be - created, modified, deleted, renamed, or appended. - type: string - type: object - file-create: - properties: - dir-name: - description: DirName is the directory name to create - or delete. - type: string - file-name: - description: FileName is the name of the file to be - created, modified, deleted, renamed, or appended. - type: string - type: object - file-delete: - properties: - dir-name: - description: DirName is the directory name to create - or delete. - type: string - file-name: - description: FileName is the name of the file to be - created, modified, deleted, renamed, or appended. - type: string - type: object - file-modify: - properties: - file-name: - description: FileName is the name of the file to be - created, modified, deleted, renamed, or appended. - type: string - privilege: - description: Privilege is the file privilege to be set. - format: int32 - type: integer - type: object - file-rename: - properties: - dest-file: - description: DestFile is the name to be renamed. - type: string - source-file: - description: SourceFile is the name need to be renamed. - type: string - type: object - file-replace: - properties: - dest-string: - description: DestStr is the destination string of the - file. - type: string - file-name: - description: FileName is the name of the file to be - created, modified, deleted, renamed, or appended. - type: string - line: - description: Line is the line number of the file to - be replaced. - type: integer - origin-string: - description: OriginStr is the origin string of the file. - type: string - type: object - http-abort: - properties: - code: - description: Code is a rule to select target by http - status code in response - type: string - method: - description: HTTP method - type: string - path: - description: Match path of Uri with wildcard matches - type: string - port: - description: The TCP port that the target service listens - on - format: int32 - type: integer - proxy_ports: - description: Composed with one of the port of HTTP connection, - we will only attack HTTP connection with port inside - proxy_ports - items: - type: integer - type: array - target: - description: 'HTTP target: Request or Response' - type: string - required: - - proxy_ports - - target - type: object - http-config: - properties: - file_path: - description: The config file path - type: string - type: object - http-delay: - properties: - code: - description: Code is a rule to select target by http - status code in response - type: string - delay: - description: Delay represents the delay of the target - request/response - type: string - method: - description: HTTP method - type: string - path: - description: Match path of Uri with wildcard matches - type: string - port: - description: The TCP port that the target service listens - on - format: int32 - type: integer - proxy_ports: - description: Composed with one of the port of HTTP connection, - we will only attack HTTP connection with port inside - proxy_ports - items: - type: integer - type: array - target: - description: 'HTTP target: Request or Response' - type: string - required: - - delay - - proxy_ports - - target - type: object - http-request: - description: used for HTTP request, now only support GET - properties: - count: - description: The number of requests to send - type: integer - enable-conn-pool: - description: Enable connection pool - type: boolean - url: - description: Request to send" - type: string - type: object - jvm-exception: - properties: - class: - description: Java class - type: string - exception: - description: the exception which needs to throw for - action `exception` - type: string - method: - description: the method in Java class - type: string - pid: - description: the pid of Java process which needs to - attach - type: integer - port: - description: the port of agent server, default 9277 - format: int32 - type: integer - type: object - jvm-gc: - properties: - pid: - description: the pid of Java process which needs to - attach - type: integer - port: - description: the port of agent server, default 9277 - format: int32 - type: integer - type: object - jvm-latency: - properties: - class: - description: Java class - type: string - latency: - description: the latency duration for action 'latency', - unit ms - type: integer - method: - description: the method in Java class - type: string - pid: - description: the pid of Java process which needs to - attach - type: integer - port: - description: the port of agent server, default 9277 - format: int32 - type: integer - type: object - jvm-mysql: - properties: - database: - description: the match database default value is "", - means match all database - type: string - exception: - description: The exception which needs to throw for - action `exception` or the exception message needs - to throw in action `mysql` - type: string - latency: - description: The latency duration for action 'latency' - or the latency duration in action `mysql` - type: integer - mysqlConnectorVersion: - description: the version of mysql-connector-java, only - support 5.X.X(set to "5") and 8.X.X(set to "8") now - type: string - pid: - description: the pid of Java process which needs to - attach - type: integer - port: - description: the port of agent server, default 9277 - format: int32 - type: integer - sqlType: - description: the match sql type default value is "", - means match all SQL type. The value can be 'select', - 'insert', 'update', 'delete', 'replace'. - type: string - table: - description: the match table default value is "", means - match all table - type: string - type: object - jvm-return: - properties: - class: - description: Java class - type: string - method: - description: the method in Java class - type: string - pid: - description: the pid of Java process which needs to - attach - type: integer - port: - description: the port of agent server, default 9277 - format: int32 - type: integer - value: - description: the return value for action 'return' - type: string - type: object - jvm-rule-data: - properties: - pid: - description: the pid of Java process which needs to - attach - type: integer - port: - description: the port of agent server, default 9277 - format: int32 - type: integer - rule-data: - description: RuleData used to save the rule file's data, - will use it when recover - type: string - type: object - jvm-stress: - properties: - cpu-count: - description: the CPU core number need to use, only set - it when action is stress - type: integer - mem-type: - description: the memory type need to locate, only set - it when action is stress, the value can be 'stack' - or 'heap' - type: string - pid: - description: the pid of Java process which needs to - attach - type: integer - port: - description: the port of agent server, default 9277 - format: int32 - type: integer - type: object - kafka-fill: - properties: - host: - description: The host of kafka server - type: string - maxBytes: - description: The max bytes to fill - format: int64 - type: integer - messageSize: - description: The size of each message - type: integer - password: - description: The password of kafka client - type: string - port: - description: The port of kafka server - type: integer - reloadCommand: - description: The command to reload kafka config - type: string - topic: - description: The topic to attack - type: string - username: - description: The username of kafka client - type: string - type: object - kafka-flood: - properties: - host: - description: The host of kafka server - type: string - messageSize: - description: The size of each message - type: integer - password: - description: The password of kafka client - type: string - port: - description: The port of kafka server - type: integer - threads: - description: The number of worker threads - type: integer - topic: - description: The topic to attack - type: string - username: - description: The username of kafka client - type: string - type: object - kafka-io: - properties: - configFile: - description: The path of server config - type: string - nonReadable: - description: Make kafka cluster non-readable - type: boolean - nonWritable: - description: Make kafka cluster non-writable - type: boolean - topic: - description: The topic to attack - type: string - type: object - mode: - description: 'Mode defines the mode to run chaos action. - Supported mode: one / all / fixed / fixed-percent / random-max-percent' - enum: - - one - - all - - fixed - - fixed-percent - - random-max-percent - type: string - network-bandwidth: - properties: - buffer: - format: int32 - minimum: 1 - type: integer - device: - type: string - hostname: - type: string - ip-address: - type: string - limit: - format: int32 - minimum: 1 - type: integer - minburst: - format: int32 - type: integer - peakrate: - format: int64 - type: integer - rate: - type: string - required: - - buffer - - limit - - rate - type: object - network-corrupt: - properties: - correlation: - description: correlation is percentage (10 is 10%) - type: string - device: - description: the network interface to impact - type: string - egress-port: - description: only impact egress traffic to these destination - ports, use a ',' to separate or to indicate the range, - such as 80, 8001:8010. it can only be used in conjunction - with -p tcp or -p udp - type: string - hostname: - description: only impact traffic to these hostnames - type: string - ip-address: - description: only impact egress traffic to these IP - addresses - type: string - ip-protocol: - description: 'only impact traffic using this IP protocol, - supported: tcp, udp, icmp, all' - type: string - percent: - description: percentage of packets to corrupt (10 is - 10%) - type: string - source-port: - description: only impact egress traffic from these source - ports, use a ',' to separate or to indicate the range, - such as 80, 8001:8010. it can only be used in conjunction - with -p tcp or -p udp - type: string - type: object - network-delay: - properties: - accept-tcp-flags: - description: only the packet which match the tcp flag - can be accepted, others will be dropped. only set - when the IPProtocol is tcp, used for partition. - type: string - correlation: - description: correlation is percentage (10 is 10%) - type: string - device: - description: the network interface to impact - type: string - egress-port: - description: only impact egress traffic to these destination - ports, use a ',' to separate or to indicate the range, - such as 80, 8001:8010. it can only be used in conjunction - with -p tcp or -p udp - type: string - hostname: - description: only impact traffic to these hostnames - type: string - ip-address: - description: only impact egress traffic to these IP - addresses - type: string - ip-protocol: - description: 'only impact traffic using this IP protocol, - supported: tcp, udp, icmp, all' - type: string - jitter: - description: 'jitter time, time units: ns, us (or µs), - ms, s, m, h.' - type: string - latency: - description: 'delay egress time, time units: ns, us - (or µs), ms, s, m, h.' - type: string - source-port: - description: only impact egress traffic from these source - ports, use a ',' to separate or to indicate the range, - such as 80, 8001:8010. it can only be used in conjunction - with -p tcp or -p udp - type: string - type: object - network-dns: - properties: - dns-domain-name: - description: map this host to specified IP - type: string - dns-ip: - description: map specified host to this IP address - type: string - dns-server: - description: update the DNS server in /etc/resolv.conf - with this value - type: string - type: object - network-down: - properties: - device: - description: The network interface to impact - type: string - duration: - description: 'NIC down time, time units: ns, us (or - µs), ms, s, m, h.' - type: string - type: object - network-duplicate: - properties: - correlation: - description: correlation is percentage (10 is 10%) - type: string - device: - description: the network interface to impact - type: string - egress-port: - description: only impact egress traffic to these destination - ports, use a ',' to separate or to indicate the range, - such as 80, 8001:8010. it can only be used in conjunction - with -p tcp or -p udp - type: string - hostname: - description: only impact traffic to these hostnames - type: string - ip-address: - description: only impact egress traffic to these IP - addresses - type: string - ip-protocol: - description: 'only impact traffic using this IP protocol, - supported: tcp, udp, icmp, all' - type: string - percent: - description: percentage of packets to duplicate (10 - is 10%) - type: string - source-port: - description: only impact egress traffic from these source - ports, use a ',' to separate or to indicate the range, - such as 80, 8001:8010. it can only be used in conjunction - with -p tcp or -p udp - type: string - type: object - network-flood: - properties: - duration: - description: The number of seconds to run the iperf - test - type: string - ip-address: - description: Generate traffic to this IP address - type: string - parallel: - description: The number of iperf parallel client threads - to run - format: int32 - type: integer - port: - description: Generate traffic to this port on the IP - address - type: string - rate: - description: The speed of network traffic, allows bps, - kbps, mbps, gbps, tbps unit. bps means bytes per second - type: string - required: - - duration - - rate - type: object - network-loss: - properties: - correlation: - description: correlation is percentage (10 is 10%) - type: string - device: - description: the network interface to impact - type: string - egress-port: - description: only impact egress traffic to these destination - ports, use a ',' to separate or to indicate the range, - such as 80, 8001:8010. it can only be used in conjunction - with -p tcp or -p udp - type: string - hostname: - description: only impact traffic to these hostnames - type: string - ip-address: - description: only impact egress traffic to these IP - addresses - type: string - ip-protocol: - description: 'only impact traffic using this IP protocol, - supported: tcp, udp, icmp, all' - type: string - percent: - description: percentage of packets to loss (10 is 10%) - type: string - source-port: - description: only impact egress traffic from these source - ports, use a ',' to separate or to indicate the range, - such as 80, 8001:8010. it can only be used in conjunction - with -p tcp or -p udp - type: string - type: object - network-partition: - properties: - accept-tcp-flags: - description: only the packet which match the tcp flag - can be accepted, others will be dropped. only set - when the IPProtocol is tcp, used for partition. - type: string - device: - description: the network interface to impact - type: string - direction: - description: specifies the partition direction, values - can be 'from', 'to'. 'from' means packets coming from - the 'IPAddress' or 'Hostname' and going to your server, - 'to' means packets originating from your server and - going to the 'IPAddress' or 'Hostname'. - type: string - hostname: - description: only impact traffic to these hostnames - type: string - ip-address: - description: only impact egress traffic to these IP - addresses - type: string - ip-protocol: - description: only impact egress traffic to these IP - addresses - type: string - type: object - process: - properties: - process: - description: the process name or the process ID - type: string - recoverCmd: - description: the command to be run when recovering experiment - type: string - signal: - description: the signal number to send - type: integer - type: object - redis-cacheLimit: - properties: - addr: - description: The adress of Redis server - type: string - cacheSize: - description: The size of `maxmemory` - type: string - password: - description: The password of Redis server - type: string - percent: - description: Specifies maxmemory as a percentage of - the original value - type: string - type: object - redis-expiration: - properties: - addr: - description: The adress of Redis server - type: string - expiration: - description: The expiration of the keys - type: string - key: - description: The keys to be expired - type: string - option: - description: Additional options for `expiration` - type: string - password: - description: The password of Redis server - type: string - type: object - redis-penetration: - properties: - addr: - description: The adress of Redis server - type: string - password: - description: The password of Redis server - type: string - requestNum: - description: The number of requests to be sent - type: integer - type: object - redis-restart: - properties: - addr: - description: The adress of Redis server - type: string - conf: - description: The path of Sentinel conf - type: string - flushConfig: - description: The control flag determines whether to - flush config - type: boolean - password: - description: The password of Redis server - type: string - redisPath: - description: The path of `redis-server` command-line - tool - type: boolean - type: object - redis-stop: - properties: - addr: - description: The adress of Redis server - type: string - conf: - description: The path of Sentinel conf - type: string - flushConfig: - description: The control flag determines whether to - flush config - type: boolean - password: - description: The password of Redis server - type: string - redisPath: - description: The path of `redis-server` command-line - tool - type: boolean - type: object - remoteCluster: - description: RemoteCluster represents the remote cluster - where the chaos will be deployed - type: string - selector: - description: Selector is used to select physical machines - that are used to inject chaos action. - properties: - annotationSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can - be used to select objects. A selector based on annotations. - type: object - expressionSelectors: - description: a slice of label selector expressions that - can be used to select objects. A list of selectors - based on set-based label expressions. - items: - description: A label selector requirement is a selector - that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the label key that the selector - applies to. - type: string - operator: - description: operator represents a key's relationship - to a set of values. Valid operators are In, - NotIn, Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. - If the operator is In or NotIn, the values array - must be non-empty. If the operator is Exists - or DoesNotExist, the values array must be empty. - This array is replaced during a strategic merge - patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - fieldSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can - be used to select objects. A selector based on fields. - type: object - labelSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can - be used to select objects. A selector based on labels. - type: object - namespaces: - description: Namespaces is a set of namespace to which - objects belong. - items: - type: string - type: array - physicalMachines: - additionalProperties: - items: - type: string - type: array - description: PhysicalMachines is a map of string keys - and a set values that used to select physical machines. - The key defines the namespace which physical machine - belong, and each value is a set of physical machine - names. - type: object - type: object - stress-cpu: - properties: - load: - description: specifies P percent loading per CPU worker. - 0 is effectively a sleep (no load) and 100 is full - loading. - type: integer - options: - description: extend stress-ng options - items: - type: string - type: array - workers: - description: specifies N workers to apply the stressor. - type: integer - type: object - stress-mem: - properties: - options: - description: extend stress-ng options - items: - type: string - type: array - size: - description: 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 - type: object - uid: - description: the experiment ID - type: string - user_defined: - properties: - attackCmd: - description: The command to be executed when attack - type: string - recoverCmd: - description: The command to be executed when recover - type: string - type: object - value: - description: Value is required when the mode is set to `FixedMode` - / `FixedPercentMode` / `RandomMaxPercentMode`. If `FixedMode`, - provide an integer of physical machines to do chaos action. - If `FixedPercentMode`, provide a number from 0-100 to - specify the percent of physical machines the server can - do chaos action. IF `RandomMaxPercentMode`, provide a - number from 0-100 to specify the max percent of pods to - do chaos action - type: string - vm: - properties: - vm-name: - description: The name of the VM to be injected - type: string - type: object - required: - - action - - mode - type: object - podChaos: - description: PodChaosSpec defines the attributes that a user - creates on a chaos experiment about pods. - properties: - action: - description: 'Action defines the specific pod chaos action. - Supported action: pod-kill / pod-failure / container-kill - Default action: pod-kill' - enum: - - pod-kill - - pod-failure - - container-kill - type: string - containerNames: - description: ContainerNames indicates list of the name of - affected container. If not set, the first container will - be injected - items: - type: string - type: array - duration: - description: Duration represents the duration of the chaos - action. It is required when the action is `PodFailureAction`. - A duration string is a possibly signed sequence of decimal - numbers, each with optional fraction and a unit suffix, - such as "300ms", "-1.5h" or "2h45m". Valid time units - are "ns", "us" (or "µs"), "ms", "s", "m", "h". - type: string - gracePeriod: - description: GracePeriod is used in pod-kill action. It - represents the duration in seconds before the pod should - be deleted. Value must be non-negative integer. The default - value is zero that indicates delete immediately. - format: int64 - minimum: 0 - type: integer - mode: - description: 'Mode defines the mode to run chaos action. - Supported mode: one / all / fixed / fixed-percent / random-max-percent' - enum: - - one - - all - - fixed - - fixed-percent - - random-max-percent - type: string - remoteCluster: - description: RemoteCluster represents the remote cluster - where the chaos will be deployed - type: string - selector: - description: Selector is used to select pods that are used - to inject chaos action. - properties: - annotationSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can - be used to select objects. A selector based on annotations. - type: object - expressionSelectors: - description: a slice of label selector expressions that - can be used to select objects. A list of selectors - based on set-based label expressions. - items: - description: A label selector requirement is a selector - that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the label key that the selector - applies to. - type: string - operator: - description: operator represents a key's relationship - to a set of values. Valid operators are In, - NotIn, Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. - If the operator is In or NotIn, the values array - must be non-empty. If the operator is Exists - or DoesNotExist, the values array must be empty. - This array is replaced during a strategic merge - patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - fieldSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can - be used to select objects. A selector based on fields. - type: object - labelSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can - be used to select objects. A selector based on labels. - type: object - namespaces: - description: Namespaces is a set of namespace to which - objects belong. - items: - type: string - type: array - nodeSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can - be used to select nodes. Selector which must match - a node's labels, and objects must belong to these - selected nodes. - type: object - nodes: - description: Nodes is a set of node name and objects - must belong to these nodes. - items: - type: string - type: array - podPhaseSelectors: - description: 'PodPhaseSelectors is a set of condition - of a pod at the current time. supported value: Pending - / Running / Succeeded / Failed / Unknown' - items: - type: string - type: array - pods: - additionalProperties: - items: - type: string - type: array - description: Pods is a map of string keys and a set - values that used to select pods. The key defines the - namespace which pods belong, and the each values is - a set of pod names. - type: object - type: object - value: - description: Value is required when the mode is set to `FixedMode` - / `FixedPercentMode` / `RandomMaxPercentMode`. If `FixedMode`, - provide an integer of pods to do chaos action. If `FixedPercentMode`, - provide a number from 0-100 to specify the percent of - pods the server can do chaos action. IF `RandomMaxPercentMode`, provide - a number from 0-100 to specify the max percent of pods - to do chaos action - type: string - required: - - action - - mode - - selector - type: object - schedule: - description: Schedule describe the Schedule(describing scheduled - chaos) to be injected with chaos nodes. Only used when Type - is TypeSchedule. - properties: - awsChaos: - description: AWSChaosSpec is the content of the specification - for an AWSChaos - properties: - action: - description: 'Action defines the specific aws chaos - action. Supported action: ec2-stop / ec2-restart / - detach-volume Default action: ec2-stop' - 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. - Needed in detach-volume. - type: string - duration: - description: Duration represents the duration of the - chaos action. - type: string - ec2Instance: - description: Ec2Instance indicates the ID of the ec2 - instance. - type: string - endpoint: - description: Endpoint indicates the endpoint of the - aws server. Just used it in test now. - type: string - remoteCluster: - description: RemoteCluster represents the remote cluster - where the chaos will be deployed - type: string - secretName: - description: SecretName defines the name of kubernetes - secret. - type: string - volumeID: - description: EbsVolume indicates the ID of the EBS volume. - Needed in detach-volume. - type: string - required: - - action - - awsRegion - - ec2Instance - type: object - azureChaos: - description: AzureChaosSpec is the content of the specification - for an AzureChaos - properties: - action: - description: 'Action defines the specific azure chaos - action. Supported action: vm-stop / vm-restart / disk-detach - Default action: vm-stop' - enum: - - vm-stop - - vm-restart - - disk-detach - type: string - diskName: - description: DiskName indicates the name of the disk. - Needed in disk-detach. - type: string - duration: - description: Duration represents the duration of the - chaos action. - type: string - lun: - description: LUN indicates the Logical Unit Number of - the data disk. Needed in disk-detach. - type: integer - remoteCluster: - description: RemoteCluster represents the remote cluster - where the chaos will be deployed - type: string - resourceGroupName: - description: ResourceGroupName defines the name of ResourceGroup - type: string - secretName: - description: SecretName defines the name of kubernetes - secret. It is used for Azure credentials. - type: string - subscriptionID: - description: SubscriptionID defines the id of Azure - subscription. - type: string - vmName: - description: VMName defines the name of Virtual Machine - type: string - required: - - action - - resourceGroupName - - subscriptionID - - vmName - type: object - blockChaos: - description: BlockChaosSpec is the content of the specification - for a BlockChaos - properties: - action: - description: 'Action defines the specific block chaos - action. Supported action: delay' - enum: - - delay - type: string - containerNames: - description: ContainerNames indicates list of the name - of affected container. If not set, the first container - will be injected - items: - type: string - type: array - delay: - description: Delay defines the delay distribution. - properties: - correlation: - type: string - jitter: - type: string - latency: - description: Latency defines the latency of every - io request. - type: string - type: object - duration: - description: Duration represents the duration of the - chaos action. - type: string - mode: - description: 'Mode defines the mode to run chaos action. - Supported mode: one / all / fixed / fixed-percent - / random-max-percent' - enum: - - one - - all - - fixed - - fixed-percent - - random-max-percent - type: string - remoteCluster: - description: RemoteCluster represents the remote cluster - where the chaos will be deployed - type: string - selector: - description: Selector is used to select pods that are - used to inject chaos action. - properties: - annotationSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select objects. A selector based - on annotations. - type: object - expressionSelectors: - description: a slice of label selector expressions - that can be used to select objects. A list of - selectors based on set-based label expressions. - items: - description: A label selector requirement is a - selector that contains values, a key, and an - operator that relates the key and values. - properties: - key: - description: key is the label key that the - selector applies to. - type: string - operator: - description: operator represents a key's relationship - to a set of values. Valid operators are - In, NotIn, Exists and DoesNotExist. - type: string - values: - description: values is an array of string - values. If the operator is In or NotIn, - the values array must be non-empty. If the - operator is Exists or DoesNotExist, the - values array must be empty. This array is - replaced during a strategic merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - fieldSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select objects. A selector based - on fields. - type: object - labelSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select objects. A selector based - on labels. - type: object - namespaces: - description: Namespaces is a set of namespace to - which objects belong. - items: - type: string - type: array - nodeSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select nodes. Selector which must - match a node's labels, and objects must belong - to these selected nodes. - type: object - nodes: - description: Nodes is a set of node name and objects - must belong to these nodes. - items: - type: string - type: array - podPhaseSelectors: - description: 'PodPhaseSelectors is a set of condition - of a pod at the current time. supported value: - Pending / Running / Succeeded / Failed / Unknown' - items: - type: string - type: array - pods: - additionalProperties: - items: - type: string - type: array - description: Pods is a map of string keys and a - set values that used to select pods. The key defines - the namespace which pods belong, and the each - values is a set of pod names. - type: object - type: object - value: - description: Value is required when the mode is set - to `FixedMode` / `FixedPercentMode` / `RandomMaxPercentMode`. - If `FixedMode`, provide an integer of pods to do chaos - action. If `FixedPercentMode`, provide a number from - 0-100 to specify the percent of pods the server can - do chaos action. IF `RandomMaxPercentMode`, provide - a number from 0-100 to specify the max percent of - pods to do chaos action - type: string - volumeName: - type: string - required: - - action - - mode - - selector - - volumeName - type: object - concurrencyPolicy: - enum: - - Forbid - - Allow - type: string - dnsChaos: - description: DNSChaosSpec defines the desired state of DNSChaos - properties: - action: - description: 'Action defines the specific DNS chaos - action. Supported action: error, random Default action: - error' - enum: - - error - - random - type: string - containerNames: - description: ContainerNames indicates list of the name - of affected container. If not set, the first container - will be injected - items: - type: string - type: array - duration: - description: Duration represents the duration of the - chaos action - type: string - mode: - description: 'Mode defines the mode to run chaos action. - Supported mode: one / all / fixed / fixed-percent - / random-max-percent' - enum: - - one - - all - - fixed - - fixed-percent - - random-max-percent - type: string - patterns: - description: 'Choose which domain names to take effect, - support the placeholder ? and wildcard *, or the Specified - domain name. Note: 1. The wildcard * must be at the - end of the string. For example, chaos-*.org is invalid. - 2. if the patterns is empty, will take effect on all - the domain names. For example: The value is ["google.com", - "github.*", "chaos-mes?.org"], will take effect on - "google.com", "github.com" and "chaos-mesh.org"' - items: - type: string - type: array - remoteCluster: - description: RemoteCluster represents the remote cluster - where the chaos will be deployed - type: string - selector: - description: Selector is used to select pods that are - used to inject chaos action. - properties: - annotationSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select objects. A selector based - on annotations. - type: object - expressionSelectors: - description: a slice of label selector expressions - that can be used to select objects. A list of - selectors based on set-based label expressions. - items: - description: A label selector requirement is a - selector that contains values, a key, and an - operator that relates the key and values. - properties: - key: - description: key is the label key that the - selector applies to. - type: string - operator: - description: operator represents a key's relationship - to a set of values. Valid operators are - In, NotIn, Exists and DoesNotExist. - type: string - values: - description: values is an array of string - values. If the operator is In or NotIn, - the values array must be non-empty. If the - operator is Exists or DoesNotExist, the - values array must be empty. This array is - replaced during a strategic merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - fieldSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select objects. A selector based - on fields. - type: object - labelSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select objects. A selector based - on labels. - type: object - namespaces: - description: Namespaces is a set of namespace to - which objects belong. - items: - type: string - type: array - nodeSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select nodes. Selector which must - match a node's labels, and objects must belong - to these selected nodes. - type: object - nodes: - description: Nodes is a set of node name and objects - must belong to these nodes. - items: - type: string - type: array - podPhaseSelectors: - description: 'PodPhaseSelectors is a set of condition - of a pod at the current time. supported value: - Pending / Running / Succeeded / Failed / Unknown' - items: - type: string - type: array - pods: - additionalProperties: - items: - type: string - type: array - description: Pods is a map of string keys and a - set values that used to select pods. The key defines - the namespace which pods belong, and the each - values is a set of pod names. - type: object - type: object - value: - description: Value is required when the mode is set - to `FixedMode` / `FixedPercentMode` / `RandomMaxPercentMode`. - If `FixedMode`, provide an integer of pods to do chaos - action. If `FixedPercentMode`, provide a number from - 0-100 to specify the percent of pods the server can - do chaos action. IF `RandomMaxPercentMode`, provide - a number from 0-100 to specify the max percent of - pods to do chaos action - type: string - required: - - action - - mode - - selector - type: object - gcpChaos: - description: GCPChaosSpec is the content of the specification - for a GCPChaos - properties: - action: - description: 'Action defines the specific gcp chaos - action. Supported action: node-stop / node-reset / - disk-loss Default action: node-stop' - enum: - - node-stop - - node-reset - - disk-loss - type: string - deviceNames: - description: The device name of disks to detach. Needed - in disk-loss. - items: - type: string - type: array - duration: - description: Duration represents the duration of the - chaos action. - type: string - instance: - description: Instance defines the name of the instance - type: string - project: - description: Project defines the ID of gcp project. - type: string - remoteCluster: - description: RemoteCluster represents the remote cluster - where the chaos will be deployed - type: string - secretName: - description: SecretName defines the name of kubernetes - secret. It is used for GCP credentials. - type: string - zone: - description: Zone defines the zone of gcp project. - type: string - required: - - action - - instance - - project - - zone - type: object - historyLimit: - minimum: 1 - type: integer - httpChaos: - properties: - abort: - description: Abort is a rule to abort a http session. - type: boolean - code: - description: Code is a rule to select target by http - status code in response. - format: int32 - type: integer - delay: - description: Delay represents the delay of the target - request/response. A duration string is a possibly - unsigned sequence of decimal numbers, each with optional - fraction and a unit suffix, such as "300ms", "2h45m". - Valid time units are "ns", "us" (or "µs"), "ms", "s", - "m", "h". - type: string - duration: - description: Duration represents the duration of the - chaos action. - type: string - method: - description: Method is a rule to select target by http - method in request. - type: string - mode: - description: 'Mode defines the mode to run chaos action. - Supported mode: one / all / fixed / fixed-percent - / random-max-percent' - enum: - - one - - all - - fixed - - fixed-percent - - random-max-percent - type: string - patch: - description: Patch is a rule to patch some contents - in target. - properties: - body: - description: Body is a rule to patch message body - of target. - properties: - type: - description: Type represents the patch type, - only support `JSON` as [merge patch json](https://tools.ietf.org/html/rfc7396) - currently. - type: string - value: - description: Value is the patch contents. - type: string - required: - - type - - value - type: object - headers: - description: 'Headers is a rule to append http headers - of target. For example: `[["Set-Cookie", ""], ["Set-Cookie", ""]]`.' - items: - items: - type: string - type: array - type: array - queries: - description: 'Queries is a rule to append uri queries - of target(Request only). For example: `[["foo", - "bar"], ["foo", "unknown"]]`.' - items: - items: - type: string - type: array - type: array - type: object - path: - description: Path is a rule to select target by uri - path in http request. - type: string - port: - description: Port represents the target port to be proxy - of. - format: int32 - type: integer - remoteCluster: - description: RemoteCluster represents the remote cluster - where the chaos will be deployed - type: string - replace: - description: Replace is a rule to replace some contents - in target. - properties: - body: - description: Body is a rule to replace http message - body in target. - format: byte - type: string - code: - description: Code is a rule to replace http status - code in response. - format: int32 - type: integer - headers: - additionalProperties: - type: string - description: Headers is a rule to replace http headers - of target. The key-value pairs represent header - name and header value pairs. - type: object - method: - description: Method is a rule to replace http method - in request. - type: string - path: - description: Path is rule to to replace uri path - in http request. - type: string - queries: - additionalProperties: - type: string - description: 'Queries is a rule to replace uri queries - in http request. For example, with value `{ "foo": - "unknown" }`, the `/?foo=bar` will be altered - to `/?foo=unknown`,' - type: object - type: object - request_headers: - additionalProperties: - type: string - description: RequestHeaders is a rule to select target - by http headers in request. The key-value pairs represent - header name and header value pairs. - type: object - response_headers: - additionalProperties: - type: string - description: ResponseHeaders is a rule to select target - by http headers in response. The key-value pairs represent - header name and header value pairs. - type: object - selector: - description: Selector is used to select pods that are - used to inject chaos action. - properties: - annotationSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select objects. A selector based - on annotations. - type: object - expressionSelectors: - description: a slice of label selector expressions - that can be used to select objects. A list of - selectors based on set-based label expressions. - items: - description: A label selector requirement is a - selector that contains values, a key, and an - operator that relates the key and values. - properties: - key: - description: key is the label key that the - selector applies to. - type: string - operator: - description: operator represents a key's relationship - to a set of values. Valid operators are - In, NotIn, Exists and DoesNotExist. - type: string - values: - description: values is an array of string - values. If the operator is In or NotIn, - the values array must be non-empty. If the - operator is Exists or DoesNotExist, the - values array must be empty. This array is - replaced during a strategic merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - fieldSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select objects. A selector based - on fields. - type: object - labelSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select objects. A selector based - on labels. - type: object - namespaces: - description: Namespaces is a set of namespace to - which objects belong. - items: - type: string - type: array - nodeSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select nodes. Selector which must - match a node's labels, and objects must belong - to these selected nodes. - type: object - nodes: - description: Nodes is a set of node name and objects - must belong to these nodes. - items: - type: string - type: array - podPhaseSelectors: - description: 'PodPhaseSelectors is a set of condition - of a pod at the current time. supported value: - Pending / Running / Succeeded / Failed / Unknown' - items: - type: string - type: array - pods: - additionalProperties: - items: - type: string - type: array - description: Pods is a map of string keys and a - set values that used to select pods. The key defines - the namespace which pods belong, and the each - values is a set of pod names. - type: object - type: object - target: - description: Target is the object to be selected and - injected. - enum: - - Request - - Response - type: string - tls: - description: TLS is the tls config, will override PodHttpChaos - if there are multiple HTTPChaos experiments are applied - properties: - caName: - description: CAName represents the data name of - ca file in secret, `ca.crt` for example - type: string - certName: - description: CertName represents the data name of - cert file in secret, `tls.crt` for example - type: string - keyName: - description: KeyName represents the data name of - key file in secret, `tls.key` for example - type: string - secretName: - description: SecretName represents the name of required - secret resource - type: string - secretNamespace: - description: SecretNamespace represents the namespace - of required secret resource - type: string - required: - - certName - - keyName - - secretName - - secretNamespace - type: object - value: - description: Value is required when the mode is set - to `FixedMode` / `FixedPercentMode` / `RandomMaxPercentMode`. - If `FixedMode`, provide an integer of pods to do chaos - action. If `FixedPercentMode`, provide a number from - 0-100 to specify the percent of pods the server can - do chaos action. IF `RandomMaxPercentMode`, provide - a number from 0-100 to specify the max percent of - pods to do chaos action - type: string - required: - - mode - - selector - - target - type: object - ioChaos: - description: IOChaosSpec defines the desired state of IOChaos - properties: - action: - description: 'Action defines the specific pod chaos - action. Supported action: latency / fault / attrOverride - / mistake' - enum: - - latency - - fault - - attrOverride - - mistake - type: string - attr: - description: Attr defines the overrided attribution - properties: - atime: - description: Timespec represents a time - properties: - nsec: - format: int64 - type: integer - sec: - format: int64 - type: integer - required: - - nsec - - sec - type: object - blocks: - format: int64 - type: integer - ctime: - description: Timespec represents a time - properties: - nsec: - format: int64 - type: integer - sec: - format: int64 - type: integer - required: - - nsec - - sec - type: object - gid: - format: int32 - type: integer - ino: - format: int64 - type: integer - kind: - description: FileType represents type of file - type: string - mtime: - description: Timespec represents a time - properties: - nsec: - format: int64 - type: integer - sec: - format: int64 - type: integer - required: - - nsec - - sec - type: object - nlink: - format: int32 - type: integer - perm: - type: integer - rdev: - format: int32 - type: integer - size: - format: int64 - type: integer - uid: - format: int32 - type: integer - type: object - containerNames: - description: ContainerNames indicates list of the name - of affected container. If not set, the first container - will be injected - items: - type: string - type: array - delay: - description: Delay defines the value of I/O chaos action - delay. A delay string is a possibly signed sequence - of decimal numbers, each with optional fraction and - a unit suffix, such as "300ms". Valid time units are - "ns", "us" (or "µs"), "ms", "s", "m", "h". - type: string - duration: - description: Duration represents the duration of the - chaos action. It is required when the action is `PodFailureAction`. - A duration string is a possibly signed sequence of - decimal numbers, each with optional fraction and a - unit suffix, such as "300ms", "-1.5h" or "2h45m". - Valid time units are "ns", "us" (or "µs"), "ms", "s", - "m", "h". - type: string - errno: - description: 'Errno defines the error code that returned - by I/O action. refer to: https://www-numi.fnal.gov/offline_software/srt_public_context/WebDocs/Errors/unix_system_errors.html' - format: int32 - type: integer - methods: - description: 'Methods defines the I/O methods for injecting - I/O chaos action. default: all I/O methods.' - items: - type: string - type: array - mistake: - description: Mistake defines what types of incorrectness - are injected to IO operations - properties: - filling: - description: Filling determines what is filled in - the mistake data. - enum: - - zero - - random - type: string - maxLength: - description: Max length of each wrong data segment - in bytes - format: int64 - minimum: 1 - type: integer - maxOccurrences: - description: There will be [1, MaxOccurrences] segments - of wrong data. - format: int64 - minimum: 1 - type: integer - type: object - mode: - description: 'Mode defines the mode to run chaos action. - Supported mode: one / all / fixed / fixed-percent - / random-max-percent' - enum: - - one - - all - - fixed - - fixed-percent - - random-max-percent - type: string - path: - description: Path defines the path of files for injecting - I/O chaos action. - type: string - percent: - default: 100 - description: 'Percent defines the percentage of injection - errors and provides a number from 0-100. default: - 100.' - type: integer - remoteCluster: - description: RemoteCluster represents the remote cluster - where the chaos will be deployed - type: string - selector: - description: Selector is used to select pods that are - used to inject chaos action. - properties: - annotationSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select objects. A selector based - on annotations. - type: object - expressionSelectors: - description: a slice of label selector expressions - that can be used to select objects. A list of - selectors based on set-based label expressions. - items: - description: A label selector requirement is a - selector that contains values, a key, and an - operator that relates the key and values. - properties: - key: - description: key is the label key that the - selector applies to. - type: string - operator: - description: operator represents a key's relationship - to a set of values. Valid operators are - In, NotIn, Exists and DoesNotExist. - type: string - values: - description: values is an array of string - values. If the operator is In or NotIn, - the values array must be non-empty. If the - operator is Exists or DoesNotExist, the - values array must be empty. This array is - replaced during a strategic merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - fieldSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select objects. A selector based - on fields. - type: object - labelSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select objects. A selector based - on labels. - type: object - namespaces: - description: Namespaces is a set of namespace to - which objects belong. - items: - type: string - type: array - nodeSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select nodes. Selector which must - match a node's labels, and objects must belong - to these selected nodes. - type: object - nodes: - description: Nodes is a set of node name and objects - must belong to these nodes. - items: - type: string - type: array - podPhaseSelectors: - description: 'PodPhaseSelectors is a set of condition - of a pod at the current time. supported value: - Pending / Running / Succeeded / Failed / Unknown' - items: - type: string - type: array - pods: - additionalProperties: - items: - type: string - type: array - description: Pods is a map of string keys and a - set values that used to select pods. The key defines - the namespace which pods belong, and the each - values is a set of pod names. - type: object - type: object - value: - description: Value is required when the mode is set - to `FixedMode` / `FixedPercentMode` / `RandomMaxPercentMode`. - If `FixedMode`, provide an integer of pods to do chaos - action. If `FixedPercentMode`, provide a number from - 0-100 to specify the percent of pods the server can - do chaos action. IF `RandomMaxPercentMode`, provide - a number from 0-100 to specify the max percent of - pods to do chaos action - type: string - volumePath: - description: VolumePath represents the mount path of - injected volume - type: string - required: - - action - - mode - - selector - - volumePath - type: object - jvmChaos: - description: JVMChaosSpec defines the desired state of JVMChaos - properties: - action: - description: 'Action defines the specific jvm chaos - action. Supported action: latency;return;exception;stress;gc;ruleData' - enum: - - latency - - return - - exception - - stress - - gc - - ruleData - - mysql - type: string - class: - description: Java class - type: string - containerNames: - description: ContainerNames indicates list of the name - of affected container. If not set, the first container - will be injected - items: - type: string - type: array - cpuCount: - description: the CPU core number needs to use, only - set it when action is stress - type: integer - database: - description: the match database default value is "", - means match all database - type: string - duration: - description: Duration represents the duration of the - chaos action - type: string - exception: - description: the exception which needs to throw for - action `exception` or the exception message needs - to throw in action `mysql` - type: string - latency: - description: the latency duration for action 'latency', - unit ms or the latency duration in action `mysql` - type: integer - memType: - description: the memory type needs to locate, only set - it when action is stress, the value can be 'stack' - or 'heap' - type: string - method: - description: the method in Java class - type: string - mode: - description: 'Mode defines the mode to run chaos action. - Supported mode: one / all / fixed / fixed-percent - / random-max-percent' - enum: - - one - - all - - fixed - - fixed-percent - - random-max-percent - type: string - mysqlConnectorVersion: - description: the version of mysql-connector-java, only - support 5.X.X(set to "5") and 8.X.X(set to "8") now - type: string - name: - description: byteman rule name, should be unique, and - will generate one if not set - type: string - pid: - description: the pid of Java process which needs to - attach - type: integer - port: - description: the port of agent server, default 9277 - format: int32 - type: integer - remoteCluster: - description: RemoteCluster represents the remote cluster - where the chaos will be deployed - type: string - ruleData: - description: the byteman rule's data for action 'ruleData' - type: string - selector: - description: Selector is used to select pods that are - used to inject chaos action. - properties: - annotationSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select objects. A selector based - on annotations. - type: object - expressionSelectors: - description: a slice of label selector expressions - that can be used to select objects. A list of - selectors based on set-based label expressions. - items: - description: A label selector requirement is a - selector that contains values, a key, and an - operator that relates the key and values. - properties: - key: - description: key is the label key that the - selector applies to. - type: string - operator: - description: operator represents a key's relationship - to a set of values. Valid operators are - In, NotIn, Exists and DoesNotExist. - type: string - values: - description: values is an array of string - values. If the operator is In or NotIn, - the values array must be non-empty. If the - operator is Exists or DoesNotExist, the - values array must be empty. This array is - replaced during a strategic merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - fieldSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select objects. A selector based - on fields. - type: object - labelSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select objects. A selector based - on labels. - type: object - namespaces: - description: Namespaces is a set of namespace to - which objects belong. - items: - type: string - type: array - nodeSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select nodes. Selector which must - match a node's labels, and objects must belong - to these selected nodes. - type: object - nodes: - description: Nodes is a set of node name and objects - must belong to these nodes. - items: - type: string - type: array - podPhaseSelectors: - description: 'PodPhaseSelectors is a set of condition - of a pod at the current time. supported value: - Pending / Running / Succeeded / Failed / Unknown' - items: - type: string - type: array - pods: - additionalProperties: - items: - type: string - type: array - description: Pods is a map of string keys and a - set values that used to select pods. The key defines - the namespace which pods belong, and the each - values is a set of pod names. - type: object - type: object - sqlType: - description: the match sql type default value is "", - means match all SQL type. The value can be 'select', - 'insert', 'update', 'delete', 'replace'. - type: string - table: - description: the match table default value is "", means - match all table - type: string - value: - description: Value is required when the mode is set - to `FixedMode` / `FixedPercentMode` / `RandomMaxPercentMode`. - If `FixedMode`, provide an integer of pods to do chaos - action. If `FixedPercentMode`, provide a number from - 0-100 to specify the percent of pods the server can - do chaos action. IF `RandomMaxPercentMode`, provide - a number from 0-100 to specify the max percent of - pods to do chaos action - type: string - required: - - action - - mode - - selector - type: object - kernelChaos: - description: KernelChaosSpec defines the desired state of - KernelChaos - properties: - containerNames: - description: ContainerNames indicates list of the name - of affected container. If not set, the first container - will be injected - items: - type: string - type: array - duration: - description: Duration represents the duration of the - chaos action - type: string - failKernRequest: - description: FailKernRequest defines the request of - kernel injection - properties: - callchain: - description: 'Callchain indicate a special call - chain, such as: ext4_mount -> mount_subtree -> - ... -> should_failslab With an optional set of - predicates and an optional set of parameters, - which used with predicates. You can read call - chan and predicate examples from https://github.com/chaos-mesh/bpfki/tree/develop/examples - to learn more. If no special call chain, just - keep Callchain empty, which means it will fail - at any call chain with slab alloc (eg: kmalloc).' - items: - description: Frame defines the function signature - and predicate in function's body - properties: - funcname: - description: Funcname can be find from kernel - source or `/proc/kallsyms`, such as `ext4_mount` - type: string - parameters: - description: Parameters is used with predicate, - for example, if you want to inject slab - error in `d_alloc_parallel(struct dentry - *parent, const struct qstr *name)` with - a special name `bananas`, you need to set - it to `struct dentry *parent, const struct - qstr *name` otherwise omit it. - type: string - predicate: - description: Predicate will access the arguments - of this Frame, example with Parameters's, - you can set it to `STRNCMP(name->name, "bananas", - 8)` to make inject only with it, or omit - it to inject for all d_alloc_parallel call - chain. - type: string - type: object - type: array - failtype: - description: 'FailType indicates what to fail, can - be set to ''0'' / ''1'' / ''2'' If `0`, indicates - slab to fail (should_failslab) If `1`, indicates - alloc_page to fail (should_fail_alloc_page) If - `2`, indicates bio to fail (should_fail_bio) You - can read: 1. https://www.kernel.org/doc/html/latest/fault-injection/fault-injection.html - 2. http://github.com/iovisor/bcc/blob/master/tools/inject_example.txt - to learn more' - format: int32 - maximum: 2 - minimum: 0 - type: integer - headers: - description: 'Headers indicates the appropriate - kernel headers you need. Eg: "linux/mmzone.h", - "linux/blkdev.h" and so on' - items: - type: string - type: array - probability: - description: Probability indicates the fails with - probability. If you want 1%, please set this field - with 1. - format: int32 - maximum: 100 - minimum: 0 - type: integer - times: - description: Times indicates the max times of fails. - format: int32 - minimum: 0 - type: integer - required: - - failtype - type: object - mode: - description: 'Mode defines the mode to run chaos action. - Supported mode: one / all / fixed / fixed-percent - / random-max-percent' - enum: - - one - - all - - fixed - - fixed-percent - - random-max-percent - type: string - remoteCluster: - description: RemoteCluster represents the remote cluster - where the chaos will be deployed - type: string - selector: - description: Selector is used to select pods that are - used to inject chaos action. - properties: - annotationSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select objects. A selector based - on annotations. - type: object - expressionSelectors: - description: a slice of label selector expressions - that can be used to select objects. A list of - selectors based on set-based label expressions. - items: - description: A label selector requirement is a - selector that contains values, a key, and an - operator that relates the key and values. - properties: - key: - description: key is the label key that the - selector applies to. - type: string - operator: - description: operator represents a key's relationship - to a set of values. Valid operators are - In, NotIn, Exists and DoesNotExist. - type: string - values: - description: values is an array of string - values. If the operator is In or NotIn, - the values array must be non-empty. If the - operator is Exists or DoesNotExist, the - values array must be empty. This array is - replaced during a strategic merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - fieldSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select objects. A selector based - on fields. - type: object - labelSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select objects. A selector based - on labels. - type: object - namespaces: - description: Namespaces is a set of namespace to - which objects belong. - items: - type: string - type: array - nodeSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select nodes. Selector which must - match a node's labels, and objects must belong - to these selected nodes. - type: object - nodes: - description: Nodes is a set of node name and objects - must belong to these nodes. - items: - type: string - type: array - podPhaseSelectors: - description: 'PodPhaseSelectors is a set of condition - of a pod at the current time. supported value: - Pending / Running / Succeeded / Failed / Unknown' - items: - type: string - type: array - pods: - additionalProperties: - items: - type: string - type: array - description: Pods is a map of string keys and a - set values that used to select pods. The key defines - the namespace which pods belong, and the each - values is a set of pod names. - type: object - type: object - value: - description: Value is required when the mode is set - to `FixedMode` / `FixedPercentMode` / `RandomMaxPercentMode`. - If `FixedMode`, provide an integer of pods to do chaos - action. If `FixedPercentMode`, provide a number from - 0-100 to specify the percent of pods the server can - do chaos action. IF `RandomMaxPercentMode`, provide - a number from 0-100 to specify the max percent of - pods to do chaos action - type: string - required: - - failKernRequest - - mode - - selector - type: object - networkChaos: - description: NetworkChaosSpec defines the desired state - of NetworkChaos - properties: - action: - description: 'Action defines the specific network chaos - action. Supported action: partition, netem, delay, - loss, duplicate, corrupt Default action: delay' - enum: - - netem - - delay - - loss - - duplicate - - corrupt - - partition - - bandwidth - type: string - bandwidth: - description: Bandwidth represents the detail about bandwidth - control action - properties: - buffer: - description: Buffer is the maximum amount of bytes - that tokens can be available for instantaneously. - format: int32 - minimum: 1 - type: integer - limit: - description: Limit is the number of bytes that can - be queued waiting for tokens to become available. - format: int32 - minimum: 1 - type: integer - minburst: - description: Minburst specifies the size of the - peakrate bucket. For perfect accuracy, should - be set to the MTU of the interface. If a peakrate - is needed, but some burstiness is acceptable, - this size can be raised. A 3000 byte minburst - allows around 3mbit/s of peakrate, given 1000 - byte packets. - format: int32 - minimum: 0 - type: integer - peakrate: - description: Peakrate is the maximum depletion rate - of the bucket. The peakrate does not need to be - set, it is only necessary if perfect millisecond - timescale shaping is required. - format: int64 - minimum: 0 - type: integer - rate: - description: Rate is the speed knob. Allows bit, - kbit, mbit, gbit, tbit, bps, kbps, mbps, gbps, - tbps unit. bps means bytes per second. - type: string - required: - - buffer - - limit - - rate - type: object - corrupt: - description: Corrupt represents the detail about corrupt - action - properties: - correlation: - type: string - corrupt: - type: string - required: - - corrupt - type: object - delay: - description: Delay represents the detail about delay - action - properties: - correlation: - type: string - jitter: - type: string - latency: - type: string - reorder: - description: ReorderSpec defines details of packet - reorder. - properties: - correlation: - type: string - gap: - type: integer - reorder: - type: string - required: - - gap - - reorder - type: object - required: - - latency - type: object - device: - description: Device represents the network device to - be affected. - type: string - direction: - default: to - description: Direction represents the direction, this - applies on netem and network partition action - enum: - - to - - from - - both - type: string - duplicate: - description: DuplicateSpec represents the detail about - loss action - properties: - correlation: - type: string - duplicate: - type: string - required: - - duplicate - type: object - duration: - description: Duration represents the duration of the - chaos action - type: string - externalTargets: - description: ExternalTargets represents network targets - outside k8s - items: - type: string - type: array - loss: - description: Loss represents the detail about loss action - properties: - correlation: - type: string - loss: - type: string - required: - - loss - type: object - mode: - description: 'Mode defines the mode to run chaos action. - Supported mode: one / all / fixed / fixed-percent - / random-max-percent' - enum: - - one - - all - - fixed - - fixed-percent - - random-max-percent - type: string - rate: - description: Rate represents the detail about rate control - action - properties: - rate: - description: Rate is the speed knob. Allows bit, - kbit, mbit, gbit, tbit, bps, kbps, mbps, gbps, - tbps unit. bps means bytes per second. - type: string - required: - - rate - type: object - remoteCluster: - description: RemoteCluster represents the remote cluster - where the chaos will be deployed - type: string - selector: - description: Selector is used to select pods that are - used to inject chaos action. - properties: - annotationSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select objects. A selector based - on annotations. - type: object - expressionSelectors: - description: a slice of label selector expressions - that can be used to select objects. A list of - selectors based on set-based label expressions. - items: - description: A label selector requirement is a - selector that contains values, a key, and an - operator that relates the key and values. - properties: - key: - description: key is the label key that the - selector applies to. - type: string - operator: - description: operator represents a key's relationship - to a set of values. Valid operators are - In, NotIn, Exists and DoesNotExist. - type: string - values: - description: values is an array of string - values. If the operator is In or NotIn, - the values array must be non-empty. If the - operator is Exists or DoesNotExist, the - values array must be empty. This array is - replaced during a strategic merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - fieldSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select objects. A selector based - on fields. - type: object - labelSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select objects. A selector based - on labels. - type: object - namespaces: - description: Namespaces is a set of namespace to - which objects belong. - items: - type: string - type: array - nodeSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select nodes. Selector which must - match a node's labels, and objects must belong - to these selected nodes. - type: object - nodes: - description: Nodes is a set of node name and objects - must belong to these nodes. - items: - type: string - type: array - podPhaseSelectors: - description: 'PodPhaseSelectors is a set of condition - of a pod at the current time. supported value: - Pending / Running / Succeeded / Failed / Unknown' - items: - type: string - type: array - pods: - additionalProperties: - items: - type: string - type: array - description: Pods is a map of string keys and a - set values that used to select pods. The key defines - the namespace which pods belong, and the each - values is a set of pod names. - type: object - type: object - target: - description: Target represents network target, this - applies on netem and network partition action - properties: - mode: - description: 'Mode defines the mode to run chaos - action. Supported mode: one / all / fixed / fixed-percent - / random-max-percent' - enum: - - one - - all - - fixed - - fixed-percent - - random-max-percent - type: string - selector: - description: Selector is used to select pods that - are used to inject chaos action. - properties: - annotationSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select objects. A selector - based on annotations. - type: object - expressionSelectors: - description: a slice of label selector expressions - that can be used to select objects. A list - of selectors based on set-based label expressions. - items: - description: A label selector requirement - is a selector that contains values, a key, - and an operator that relates the key and - values. - properties: - key: - description: key is the label key that - the selector applies to. - type: string - operator: - description: operator represents a key's - relationship to a set of values. Valid - operators are In, NotIn, Exists and - DoesNotExist. - type: string - values: - description: values is an array of string - values. If the operator is In or NotIn, - the values array must be non-empty. - If the operator is Exists or DoesNotExist, - the values array must be empty. This - array is replaced during a strategic - merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - fieldSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select objects. A selector - based on fields. - type: object - labelSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select objects. A selector - based on labels. - type: object - namespaces: - description: Namespaces is a set of namespace - to which objects belong. - items: - type: string - type: array - nodeSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select nodes. Selector which - must match a node's labels, and objects must - belong to these selected nodes. - type: object - nodes: - description: Nodes is a set of node name and - objects must belong to these nodes. - items: - type: string - type: array - podPhaseSelectors: - description: 'PodPhaseSelectors is a set of - condition of a pod at the current time. supported - value: Pending / Running / Succeeded / Failed - / Unknown' - items: - type: string - type: array - pods: - additionalProperties: - items: - type: string - type: array - description: Pods is a map of string keys and - a set values that used to select pods. The - key defines the namespace which pods belong, - and the each values is a set of pod names. - type: object - type: object - value: - description: Value is required when the mode is - set to `FixedMode` / `FixedPercentMode` / `RandomMaxPercentMode`. - If `FixedMode`, provide an integer of pods to - do chaos action. If `FixedPercentMode`, provide - a number from 0-100 to specify the percent of - pods the server can do chaos action. IF `RandomMaxPercentMode`, provide - a number from 0-100 to specify the max percent - of pods to do chaos action - type: string - required: - - mode - - selector - type: object - targetDevice: - description: TargetDevice represents the network device - to be affected in target scope. - type: string - value: - description: Value is required when the mode is set - to `FixedMode` / `FixedPercentMode` / `RandomMaxPercentMode`. - If `FixedMode`, provide an integer of pods to do chaos - action. If `FixedPercentMode`, provide a number from - 0-100 to specify the percent of pods the server can - do chaos action. IF `RandomMaxPercentMode`, provide - a number from 0-100 to specify the max percent of - pods to do chaos action - type: string - required: - - action - - mode - - selector - type: object - physicalmachineChaos: - description: PhysicalMachineChaosSpec defines the desired - state of PhysicalMachineChaos - properties: - action: - description: the subAction, generate automatically - enum: - - stress-cpu - - stress-mem - - disk-read-payload - - disk-write-payload - - disk-fill - - network-corrupt - - network-duplicate - - network-loss - - network-delay - - network-partition - - network-dns - - network-bandwidth - - network-flood - - network-down - - process - - jvm-exception - - jvm-gc - - jvm-latency - - jvm-return - - jvm-stress - - jvm-rule-data - - jvm-mysql - - clock - - redis-expiration - - redis-penetration - - redis-cacheLimit - - redis-restart - - redis-stop - - kafka-fill - - kafka-flood - - kafka-io - - file-create - - file-modify - - file-delete - - file-rename - - file-append - - file-replace - - vm - - user_defined - type: string - address: - description: 'DEPRECATED: Use Selector instead. Only - one of Address and Selector could be specified.' - items: - type: string - type: array - clock: - properties: - clock-ids-slice: - description: the identifier of the particular clock - on which to act. More clock description in linux - kernel can be found in man page of clock_getres, - clock_gettime, clock_settime. Muti clock ids should - be split with "," - type: string - pid: - description: the pid of target program. - type: integer - time-offset: - description: specifies the length of time offset. - type: string - type: object - disk-fill: - properties: - fill-by-fallocate: - description: fill disk by fallocate - type: boolean - path: - description: specifies the location to fill data - in. if path not provided, payload will read/write - from/into a temp file, temp file will be deleted - after writing - type: string - size: - description: 'specifies how many units of data will - write into the file path. support unit: c=1, w=2, - b=512, kB=1000, K=1024, MB=1000*1000, M=1024*1024, - GB=1000*1000*1000, G=1024*1024*1024 BYTES. example - : 1M | 512kB' - type: string - type: object - disk-read-payload: - properties: - path: - description: specifies the location to fill data - in. if path not provided, payload will read/write - from/into a temp file, temp file will be deleted - after writing - type: string - payload-process-num: - description: specifies the number of process work - on writing, default 1, only 1-255 is valid value - type: integer - size: - description: 'specifies how many units of data will - write into the file path. support unit: c=1, w=2, - b=512, kB=1000, K=1024, MB=1000*1000, M=1024*1024, - GB=1000*1000*1000, G=1024*1024*1024 BYTES. example - : 1M | 512kB' - type: string - type: object - disk-write-payload: - properties: - path: - description: specifies the location to fill data - in. if path not provided, payload will read/write - from/into a temp file, temp file will be deleted - after writing - type: string - payload-process-num: - description: specifies the number of process work - on writing, default 1, only 1-255 is valid value - type: integer - size: - description: 'specifies how many units of data will - write into the file path. support unit: c=1, w=2, - b=512, kB=1000, K=1024, MB=1000*1000, M=1024*1024, - GB=1000*1000*1000, G=1024*1024*1024 BYTES. example - : 1M | 512kB' - type: string - type: object - duration: - description: Duration represents the duration of the - chaos action - type: string - file-append: - properties: - count: - description: Count is the number of times to append - the data. - type: integer - data: - description: Data is the data for append. - type: string - file-name: - description: FileName is the name of the file to - be created, modified, deleted, renamed, or appended. - type: string - type: object - file-create: - properties: - dir-name: - description: DirName is the directory name to create - or delete. - type: string - file-name: - description: FileName is the name of the file to - be created, modified, deleted, renamed, or appended. - type: string - type: object - file-delete: - properties: - dir-name: - description: DirName is the directory name to create - or delete. - type: string - file-name: - description: FileName is the name of the file to - be created, modified, deleted, renamed, or appended. - type: string - type: object - file-modify: - properties: - file-name: - description: FileName is the name of the file to - be created, modified, deleted, renamed, or appended. - type: string - privilege: - description: Privilege is the file privilege to - be set. - format: int32 - type: integer - type: object - file-rename: - properties: - dest-file: - description: DestFile is the name to be renamed. - type: string - source-file: - description: SourceFile is the name need to be renamed. - type: string - type: object - file-replace: - properties: - dest-string: - description: DestStr is the destination string of - the file. - type: string - file-name: - description: FileName is the name of the file to - be created, modified, deleted, renamed, or appended. - type: string - line: - description: Line is the line number of the file - to be replaced. - type: integer - origin-string: - description: OriginStr is the origin string of the - file. - type: string - type: object - http-abort: - properties: - code: - description: Code is a rule to select target by - http status code in response - type: string - method: - description: HTTP method - type: string - path: - description: Match path of Uri with wildcard matches - type: string - port: - description: The TCP port that the target service - listens on - format: int32 - type: integer - proxy_ports: - description: Composed with one of the port of HTTP - connection, we will only attack HTTP connection - with port inside proxy_ports - items: - type: integer - type: array - target: - description: 'HTTP target: Request or Response' - type: string - required: - - proxy_ports - - target - type: object - http-config: - properties: - file_path: - description: The config file path - type: string - type: object - http-delay: - properties: - code: - description: Code is a rule to select target by - http status code in response - type: string - delay: - description: Delay represents the delay of the target - request/response - type: string - method: - description: HTTP method - type: string - path: - description: Match path of Uri with wildcard matches - type: string - port: - description: The TCP port that the target service - listens on - format: int32 - type: integer - proxy_ports: - description: Composed with one of the port of HTTP - connection, we will only attack HTTP connection - with port inside proxy_ports - items: - type: integer - type: array - target: - description: 'HTTP target: Request or Response' - type: string - required: - - delay - - proxy_ports - - target - type: object - http-request: - description: used for HTTP request, now only support - GET - properties: - count: - description: The number of requests to send - type: integer - enable-conn-pool: - description: Enable connection pool - type: boolean - url: - description: Request to send" - type: string - type: object - jvm-exception: - properties: - class: - description: Java class - type: string - exception: - description: the exception which needs to throw - for action `exception` - type: string - method: - description: the method in Java class - type: string - pid: - description: the pid of Java process which needs - to attach - type: integer - port: - description: the port of agent server, default 9277 - format: int32 - type: integer - type: object - jvm-gc: - properties: - pid: - description: the pid of Java process which needs - to attach - type: integer - port: - description: the port of agent server, default 9277 - format: int32 - type: integer - type: object - jvm-latency: - properties: - class: - description: Java class - type: string - latency: - description: the latency duration for action 'latency', - unit ms - type: integer - method: - description: the method in Java class - type: string - pid: - description: the pid of Java process which needs - to attach - type: integer - port: - description: the port of agent server, default 9277 - format: int32 - type: integer - type: object - jvm-mysql: - properties: - database: - description: the match database default value is - "", means match all database - type: string - exception: - description: The exception which needs to throw - for action `exception` or the exception message - needs to throw in action `mysql` - type: string - latency: - description: The latency duration for action 'latency' - or the latency duration in action `mysql` - type: integer - mysqlConnectorVersion: - description: the version of mysql-connector-java, - only support 5.X.X(set to "5") and 8.X.X(set to - "8") now - type: string - pid: - description: the pid of Java process which needs - to attach - type: integer - port: - description: the port of agent server, default 9277 - format: int32 - type: integer - sqlType: - description: the match sql type default value is - "", means match all SQL type. The value can be - 'select', 'insert', 'update', 'delete', 'replace'. - type: string - table: - description: the match table default value is "", - means match all table - type: string - type: object - jvm-return: - properties: - class: - description: Java class - type: string - method: - description: the method in Java class - type: string - pid: - description: the pid of Java process which needs - to attach - type: integer - port: - description: the port of agent server, default 9277 - format: int32 - type: integer - value: - description: the return value for action 'return' - type: string - type: object - jvm-rule-data: - properties: - pid: - description: the pid of Java process which needs - to attach - type: integer - port: - description: the port of agent server, default 9277 - format: int32 - type: integer - rule-data: - description: RuleData used to save the rule file's - data, will use it when recover - type: string - type: object - jvm-stress: - properties: - cpu-count: - description: the CPU core number need to use, only - set it when action is stress - type: integer - mem-type: - description: the memory type need to locate, only - set it when action is stress, the value can be - 'stack' or 'heap' - type: string - pid: - description: the pid of Java process which needs - to attach - type: integer - port: - description: the port of agent server, default 9277 - format: int32 - type: integer - type: object - kafka-fill: - properties: - host: - description: The host of kafka server - type: string - maxBytes: - description: The max bytes to fill - format: int64 - type: integer - messageSize: - description: The size of each message - type: integer - password: - description: The password of kafka client - type: string - port: - description: The port of kafka server - type: integer - reloadCommand: - description: The command to reload kafka config - type: string - topic: - description: The topic to attack - type: string - username: - description: The username of kafka client - type: string - type: object - kafka-flood: - properties: - host: - description: The host of kafka server - type: string - messageSize: - description: The size of each message - type: integer - password: - description: The password of kafka client - type: string - port: - description: The port of kafka server - type: integer - threads: - description: The number of worker threads - type: integer - topic: - description: The topic to attack - type: string - username: - description: The username of kafka client - type: string - type: object - kafka-io: - properties: - configFile: - description: The path of server config - type: string - nonReadable: - description: Make kafka cluster non-readable - type: boolean - nonWritable: - description: Make kafka cluster non-writable - type: boolean - topic: - description: The topic to attack - type: string - type: object - mode: - description: 'Mode defines the mode to run chaos action. - Supported mode: one / all / fixed / fixed-percent - / random-max-percent' - enum: - - one - - all - - fixed - - fixed-percent - - random-max-percent - type: string - network-bandwidth: - properties: - buffer: - format: int32 - minimum: 1 - type: integer - device: - type: string - hostname: - type: string - ip-address: - type: string - limit: - format: int32 - minimum: 1 - type: integer - minburst: - format: int32 - type: integer - peakrate: - format: int64 - type: integer - rate: - type: string - required: - - buffer - - limit - - rate - type: object - network-corrupt: - properties: - correlation: - description: correlation is percentage (10 is 10%) - type: string - device: - description: the network interface to impact - type: string - egress-port: - description: only impact egress traffic to these - destination ports, use a ',' to separate or to - indicate the range, such as 80, 8001:8010. it - can only be used in conjunction with -p tcp or - -p udp - type: string - hostname: - description: only impact traffic to these hostnames - type: string - ip-address: - description: only impact egress traffic to these - IP addresses - type: string - ip-protocol: - description: 'only impact traffic using this IP - protocol, supported: tcp, udp, icmp, all' - type: string - percent: - description: percentage of packets to corrupt (10 - is 10%) - type: string - source-port: - description: only impact egress traffic from these - source ports, use a ',' to separate or to indicate - the range, such as 80, 8001:8010. it can only - be used in conjunction with -p tcp or -p udp - type: string - type: object - network-delay: - properties: - accept-tcp-flags: - description: only the packet which match the tcp - flag can be accepted, others will be dropped. - only set when the IPProtocol is tcp, used for - partition. - type: string - correlation: - description: correlation is percentage (10 is 10%) - type: string - device: - description: the network interface to impact - type: string - egress-port: - description: only impact egress traffic to these - destination ports, use a ',' to separate or to - indicate the range, such as 80, 8001:8010. it - can only be used in conjunction with -p tcp or - -p udp - type: string - hostname: - description: only impact traffic to these hostnames - type: string - ip-address: - description: only impact egress traffic to these - IP addresses - type: string - ip-protocol: - description: 'only impact traffic using this IP - protocol, supported: tcp, udp, icmp, all' - type: string - jitter: - description: 'jitter time, time units: ns, us (or - µs), ms, s, m, h.' - type: string - latency: - description: 'delay egress time, time units: ns, - us (or µs), ms, s, m, h.' - type: string - source-port: - description: only impact egress traffic from these - source ports, use a ',' to separate or to indicate - the range, such as 80, 8001:8010. it can only - be used in conjunction with -p tcp or -p udp - type: string - type: object - network-dns: - properties: - dns-domain-name: - description: map this host to specified IP - type: string - dns-ip: - description: map specified host to this IP address - type: string - dns-server: - description: update the DNS server in /etc/resolv.conf - with this value - type: string - type: object - network-down: - properties: - device: - description: The network interface to impact - type: string - duration: - description: 'NIC down time, time units: ns, us - (or µs), ms, s, m, h.' - type: string - type: object - network-duplicate: - properties: - correlation: - description: correlation is percentage (10 is 10%) - type: string - device: - description: the network interface to impact - type: string - egress-port: - description: only impact egress traffic to these - destination ports, use a ',' to separate or to - indicate the range, such as 80, 8001:8010. it - can only be used in conjunction with -p tcp or - -p udp - type: string - hostname: - description: only impact traffic to these hostnames - type: string - ip-address: - description: only impact egress traffic to these - IP addresses - type: string - ip-protocol: - description: 'only impact traffic using this IP - protocol, supported: tcp, udp, icmp, all' - type: string - percent: - description: percentage of packets to duplicate - (10 is 10%) - type: string - source-port: - description: only impact egress traffic from these - source ports, use a ',' to separate or to indicate - the range, such as 80, 8001:8010. it can only - be used in conjunction with -p tcp or -p udp - type: string - type: object - network-flood: - properties: - duration: - description: The number of seconds to run the iperf - test - type: string - ip-address: - description: Generate traffic to this IP address - type: string - parallel: - description: The number of iperf parallel client - threads to run - format: int32 - type: integer - port: - description: Generate traffic to this port on the - IP address - type: string - rate: - description: The speed of network traffic, allows - bps, kbps, mbps, gbps, tbps unit. bps means bytes - per second - type: string - required: - - duration - - rate - type: object - network-loss: - properties: - correlation: - description: correlation is percentage (10 is 10%) - type: string - device: - description: the network interface to impact - type: string - egress-port: - description: only impact egress traffic to these - destination ports, use a ',' to separate or to - indicate the range, such as 80, 8001:8010. it - can only be used in conjunction with -p tcp or - -p udp - type: string - hostname: - description: only impact traffic to these hostnames - type: string - ip-address: - description: only impact egress traffic to these - IP addresses - type: string - ip-protocol: - description: 'only impact traffic using this IP - protocol, supported: tcp, udp, icmp, all' - type: string - percent: - description: percentage of packets to loss (10 is - 10%) - type: string - source-port: - description: only impact egress traffic from these - source ports, use a ',' to separate or to indicate - the range, such as 80, 8001:8010. it can only - be used in conjunction with -p tcp or -p udp - type: string - type: object - network-partition: - properties: - accept-tcp-flags: - description: only the packet which match the tcp - flag can be accepted, others will be dropped. - only set when the IPProtocol is tcp, used for - partition. - type: string - device: - description: the network interface to impact - type: string - direction: - description: specifies the partition direction, - values can be 'from', 'to'. 'from' means packets - coming from the 'IPAddress' or 'Hostname' and - going to your server, 'to' means packets originating - from your server and going to the 'IPAddress' - or 'Hostname'. - type: string - hostname: - description: only impact traffic to these hostnames - type: string - ip-address: - description: only impact egress traffic to these - IP addresses - type: string - ip-protocol: - description: only impact egress traffic to these - IP addresses - type: string - type: object - process: - properties: - process: - description: the process name or the process ID - type: string - recoverCmd: - description: the command to be run when recovering - experiment - type: string - signal: - description: the signal number to send - type: integer - type: object - redis-cacheLimit: - properties: - addr: - description: The adress of Redis server - type: string - cacheSize: - description: The size of `maxmemory` - type: string - password: - description: The password of Redis server - type: string - percent: - description: Specifies maxmemory as a percentage - of the original value - type: string - type: object - redis-expiration: - properties: - addr: - description: The adress of Redis server - type: string - expiration: - description: The expiration of the keys - type: string - key: - description: The keys to be expired - type: string - option: - description: Additional options for `expiration` - type: string - password: - description: The password of Redis server - type: string - type: object - redis-penetration: - properties: - addr: - description: The adress of Redis server - type: string - password: - description: The password of Redis server - type: string - requestNum: - description: The number of requests to be sent - type: integer - type: object - redis-restart: - properties: - addr: - description: The adress of Redis server - type: string - conf: - description: The path of Sentinel conf - type: string - flushConfig: - description: The control flag determines whether - to flush config - type: boolean - password: - description: The password of Redis server - type: string - redisPath: - description: The path of `redis-server` command-line - tool - type: boolean - type: object - redis-stop: - properties: - addr: - description: The adress of Redis server - type: string - conf: - description: The path of Sentinel conf - type: string - flushConfig: - description: The control flag determines whether - to flush config - type: boolean - password: - description: The password of Redis server - type: string - redisPath: - description: The path of `redis-server` command-line - tool - type: boolean - type: object - remoteCluster: - description: RemoteCluster represents the remote cluster - where the chaos will be deployed - type: string - selector: - description: Selector is used to select physical machines - that are used to inject chaos action. - properties: - annotationSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select objects. A selector based - on annotations. - type: object - expressionSelectors: - description: a slice of label selector expressions - that can be used to select objects. A list of - selectors based on set-based label expressions. - items: - description: A label selector requirement is a - selector that contains values, a key, and an - operator that relates the key and values. - properties: - key: - description: key is the label key that the - selector applies to. - type: string - operator: - description: operator represents a key's relationship - to a set of values. Valid operators are - In, NotIn, Exists and DoesNotExist. - type: string - values: - description: values is an array of string - values. If the operator is In or NotIn, - the values array must be non-empty. If the - operator is Exists or DoesNotExist, the - values array must be empty. This array is - replaced during a strategic merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - fieldSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select objects. A selector based - on fields. - type: object - labelSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select objects. A selector based - on labels. - type: object - namespaces: - description: Namespaces is a set of namespace to - which objects belong. - items: - type: string - type: array - physicalMachines: - additionalProperties: - items: - type: string - type: array - description: PhysicalMachines is a map of string - keys and a set values that used to select physical - machines. The key defines the namespace which - physical machine belong, and each value is a set - of physical machine names. - type: object - type: object - stress-cpu: - properties: - load: - description: specifies P percent loading per CPU - worker. 0 is effectively a sleep (no load) and - 100 is full loading. - type: integer - options: - description: extend stress-ng options - items: - type: string - type: array - workers: - description: specifies N workers to apply the stressor. - type: integer - type: object - stress-mem: - properties: - options: - description: extend stress-ng options - items: - type: string - type: array - size: - description: 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 - type: object - uid: - description: the experiment ID - type: string - user_defined: - properties: - attackCmd: - description: The command to be executed when attack - type: string - recoverCmd: - description: The command to be executed when recover - type: string - type: object - value: - description: Value is required when the mode is set - to `FixedMode` / `FixedPercentMode` / `RandomMaxPercentMode`. - If `FixedMode`, provide an integer of physical machines - to do chaos action. If `FixedPercentMode`, provide - a number from 0-100 to specify the percent of physical - machines the server can do chaos action. IF `RandomMaxPercentMode`, provide - a number from 0-100 to specify the max percent of - pods to do chaos action - type: string - vm: - properties: - vm-name: - description: The name of the VM to be injected - type: string - type: object - required: - - action - - mode - type: object - podChaos: - description: PodChaosSpec defines the attributes that a - user creates on a chaos experiment about pods. - properties: - action: - description: 'Action defines the specific pod chaos - action. Supported action: pod-kill / pod-failure / - container-kill Default action: pod-kill' - enum: - - pod-kill - - pod-failure - - container-kill - type: string - containerNames: - description: ContainerNames indicates list of the name - of affected container. If not set, the first container - will be injected - items: - type: string - type: array - duration: - description: Duration represents the duration of the - chaos action. It is required when the action is `PodFailureAction`. - A duration string is a possibly signed sequence of - decimal numbers, each with optional fraction and a - unit suffix, such as "300ms", "-1.5h" or "2h45m". - Valid time units are "ns", "us" (or "µs"), "ms", "s", - "m", "h". - type: string - gracePeriod: - description: GracePeriod is used in pod-kill action. - It represents the duration in seconds before the pod - should be deleted. Value must be non-negative integer. - The default value is zero that indicates delete immediately. - format: int64 - minimum: 0 - type: integer - mode: - description: 'Mode defines the mode to run chaos action. - Supported mode: one / all / fixed / fixed-percent - / random-max-percent' - enum: - - one - - all - - fixed - - fixed-percent - - random-max-percent - type: string - remoteCluster: - description: RemoteCluster represents the remote cluster - where the chaos will be deployed - type: string - selector: - description: Selector is used to select pods that are - used to inject chaos action. - properties: - annotationSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select objects. A selector based - on annotations. - type: object - expressionSelectors: - description: a slice of label selector expressions - that can be used to select objects. A list of - selectors based on set-based label expressions. - items: - description: A label selector requirement is a - selector that contains values, a key, and an - operator that relates the key and values. - properties: - key: - description: key is the label key that the - selector applies to. - type: string - operator: - description: operator represents a key's relationship - to a set of values. Valid operators are - In, NotIn, Exists and DoesNotExist. - type: string - values: - description: values is an array of string - values. If the operator is In or NotIn, - the values array must be non-empty. If the - operator is Exists or DoesNotExist, the - values array must be empty. This array is - replaced during a strategic merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - fieldSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select objects. A selector based - on fields. - type: object - labelSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select objects. A selector based - on labels. - type: object - namespaces: - description: Namespaces is a set of namespace to - which objects belong. - items: - type: string - type: array - nodeSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select nodes. Selector which must - match a node's labels, and objects must belong - to these selected nodes. - type: object - nodes: - description: Nodes is a set of node name and objects - must belong to these nodes. - items: - type: string - type: array - podPhaseSelectors: - description: 'PodPhaseSelectors is a set of condition - of a pod at the current time. supported value: - Pending / Running / Succeeded / Failed / Unknown' - items: - type: string - type: array - pods: - additionalProperties: - items: - type: string - type: array - description: Pods is a map of string keys and a - set values that used to select pods. The key defines - the namespace which pods belong, and the each - values is a set of pod names. - type: object - type: object - value: - description: Value is required when the mode is set - to `FixedMode` / `FixedPercentMode` / `RandomMaxPercentMode`. - If `FixedMode`, provide an integer of pods to do chaos - action. If `FixedPercentMode`, provide a number from - 0-100 to specify the percent of pods the server can - do chaos action. IF `RandomMaxPercentMode`, provide - a number from 0-100 to specify the max percent of - pods to do chaos action - type: string - required: - - action - - mode - - selector - type: object - schedule: - type: string - startingDeadlineSeconds: - format: int64 - minimum: 0 - nullable: true - type: integer - stressChaos: - description: StressChaosSpec defines the desired state of - StressChaos - properties: - containerNames: - description: ContainerNames indicates list of the name - of affected container. If not set, the first container - will be injected - items: - type: string - type: array - duration: - description: Duration represents the duration of the - chaos action - type: string - mode: - description: 'Mode defines the mode to run chaos action. - Supported mode: one / all / fixed / fixed-percent - / random-max-percent' - enum: - - one - - all - - fixed - - fixed-percent - - random-max-percent - type: string - remoteCluster: - description: RemoteCluster represents the remote cluster - where the chaos will be deployed - type: string - selector: - description: Selector is used to select pods that are - used to inject chaos action. - properties: - annotationSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select objects. A selector based - on annotations. - type: object - expressionSelectors: - description: a slice of label selector expressions - that can be used to select objects. A list of - selectors based on set-based label expressions. - items: - description: A label selector requirement is a - selector that contains values, a key, and an - operator that relates the key and values. - properties: - key: - description: key is the label key that the - selector applies to. - type: string - operator: - description: operator represents a key's relationship - to a set of values. Valid operators are - In, NotIn, Exists and DoesNotExist. - type: string - values: - description: values is an array of string - values. If the operator is In or NotIn, - the values array must be non-empty. If the - operator is Exists or DoesNotExist, the - values array must be empty. This array is - replaced during a strategic merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - fieldSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select objects. A selector based - on fields. - type: object - labelSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select objects. A selector based - on labels. - type: object - namespaces: - description: Namespaces is a set of namespace to - which objects belong. - items: - type: string - type: array - nodeSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select nodes. Selector which must - match a node's labels, and objects must belong - to these selected nodes. - type: object - nodes: - description: Nodes is a set of node name and objects - must belong to these nodes. - items: - type: string - type: array - podPhaseSelectors: - description: 'PodPhaseSelectors is a set of condition - of a pod at the current time. supported value: - Pending / Running / Succeeded / Failed / Unknown' - items: - type: string - type: array - pods: - additionalProperties: - items: - type: string - type: array - description: Pods is a map of string keys and a - set values that used to select pods. The key defines - the namespace which pods belong, and the each - values is a set of pod names. - type: object - type: object - stressngStressors: - description: StressngStressors defines plenty of stressors - just like `Stressors` except that it's an experimental - feature and more powerful. You can define stressors - in `stress-ng` (see also `man stress-ng`) dialect, - however not all of the supported stressors are well - tested. It maybe retired in later releases. You should - always use `Stressors` to define the stressors and - use this only when you want more stressors unsupported - by `Stressors`. When both `StressngStressors` and - `Stressors` are defined, `StressngStressors` wins. - type: string - stressors: - description: Stressors defines plenty of stressors supported - to stress system components out. You can use one or - more of them to make up various kinds of stresses. - At least one of the stressors should be specified. - properties: - cpu: - description: CPUStressor stresses CPU out - properties: - load: - description: Load specifies P percent loading - per CPU worker. 0 is effectively a sleep (no - load) and 100 is full loading. - maximum: 100 - minimum: 0 - type: integer - options: - description: extend stress-ng options - items: - type: string - type: array - workers: - description: Workers specifies N workers to - apply the stressor. Maximum 8192 workers can - run by stress-ng - maximum: 8192 - type: integer - required: - - workers - type: object - memory: - description: MemoryStressor stresses virtual memory - out - properties: - oomScoreAdj: - default: 0 - description: OOMScoreAdj sets the oom_score_adj - of the stress process. See `man 5 proc` to - know more about this option. - maximum: 1000 - minimum: -1000 - type: integer - options: - description: extend stress-ng options - items: - type: string - type: array - size: - description: Size 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 - workers: - description: Workers specifies N workers to - apply the stressor. Maximum 8192 workers can - run by stress-ng - maximum: 8192 - type: integer - required: - - workers - type: object - type: object - value: - description: Value is required when the mode is set - to `FixedMode` / `FixedPercentMode` / `RandomMaxPercentMode`. - If `FixedMode`, provide an integer of pods to do chaos - action. If `FixedPercentMode`, provide a number from - 0-100 to specify the percent of pods the server can - do chaos action. IF `RandomMaxPercentMode`, provide - a number from 0-100 to specify the max percent of - pods to do chaos action - type: string - required: - - mode - - selector - type: object - timeChaos: - description: TimeChaosSpec defines the desired state of - TimeChaos - properties: - clockIds: - description: ClockIds defines all affected clock id - All available options are ["CLOCK_REALTIME","CLOCK_MONOTONIC","CLOCK_PROCESS_CPUTIME_ID","CLOCK_THREAD_CPUTIME_ID", - "CLOCK_MONOTONIC_RAW","CLOCK_REALTIME_COARSE","CLOCK_MONOTONIC_COARSE","CLOCK_BOOTTIME","CLOCK_REALTIME_ALARM", - "CLOCK_BOOTTIME_ALARM"] Default value is ["CLOCK_REALTIME"] - items: - type: string - type: array - containerNames: - description: ContainerNames indicates list of the name - of affected container. If not set, the first container - will be injected - items: - type: string - type: array - duration: - description: Duration represents the duration of the - chaos action - type: string - mode: - description: 'Mode defines the mode to run chaos action. - Supported mode: one / all / fixed / fixed-percent - / random-max-percent' - enum: - - one - - all - - fixed - - fixed-percent - - random-max-percent - type: string - remoteCluster: - description: RemoteCluster represents the remote cluster - where the chaos will be deployed - type: string - selector: - description: Selector is used to select pods that are - used to inject chaos action. - properties: - annotationSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select objects. A selector based - on annotations. - type: object - expressionSelectors: - description: a slice of label selector expressions - that can be used to select objects. A list of - selectors based on set-based label expressions. - items: - description: A label selector requirement is a - selector that contains values, a key, and an - operator that relates the key and values. - properties: - key: - description: key is the label key that the - selector applies to. - type: string - operator: - description: operator represents a key's relationship - to a set of values. Valid operators are - In, NotIn, Exists and DoesNotExist. - type: string - values: - description: values is an array of string - values. If the operator is In or NotIn, - the values array must be non-empty. If the - operator is Exists or DoesNotExist, the - values array must be empty. This array is - replaced during a strategic merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - fieldSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select objects. A selector based - on fields. - type: object - labelSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select objects. A selector based - on labels. - type: object - namespaces: - description: Namespaces is a set of namespace to - which objects belong. - items: - type: string - type: array - nodeSelectors: - additionalProperties: - type: string - description: Map of string keys and values that - can be used to select nodes. Selector which must - match a node's labels, and objects must belong - to these selected nodes. - type: object - nodes: - description: Nodes is a set of node name and objects - must belong to these nodes. - items: - type: string - type: array - podPhaseSelectors: - description: 'PodPhaseSelectors is a set of condition - of a pod at the current time. supported value: - Pending / Running / Succeeded / Failed / Unknown' - items: - type: string - type: array - pods: - additionalProperties: - items: - type: string - type: array - description: Pods is a map of string keys and a - set values that used to select pods. The key defines - the namespace which pods belong, and the each - values is a set of pod names. - type: object - type: object - timeOffset: - description: TimeOffset defines the delta time of injected - program. It's a possibly signed sequence of decimal - numbers, such as "300ms", "-1.5h" or "2h45m". Valid - time units are "ns", "us" (or "µs"), "ms", "s", "m", - "h". - type: string - value: - description: Value is required when the mode is set - to `FixedMode` / `FixedPercentMode` / `RandomMaxPercentMode`. - If `FixedMode`, provide an integer of pods to do chaos - action. If `FixedPercentMode`, provide a number from - 0-100 to specify the percent of pods the server can - do chaos action. IF `RandomMaxPercentMode`, provide - a number from 0-100 to specify the max percent of - pods to do chaos action - type: string - required: - - mode - - selector - - timeOffset - type: object - type: - type: string - required: - - schedule - - type - type: object - statusCheck: - description: StatusCheck describe the behavior of StatusCheck. - Only used when Type is TypeStatusCheck. - properties: - duration: - description: Duration defines the duration of the whole - status check if the number of failed execution does not - exceed the failure threshold. Duration is available to - both `Synchronous` and `Continuous` mode. A duration string - is a possibly signed sequence of decimal numbers, each - with optional fraction and a unit suffix, such as "300ms", - "-1.5h" or "2h45m". Valid time units are "ns", "us" (or - "µs"), "ms", "s", "m", "h". - type: string - failureThreshold: - default: 3 - description: FailureThreshold defines the minimum consecutive - failure for the status check to be considered failed. - minimum: 1 - type: integer - http: - properties: - body: - type: string - criteria: - description: Criteria defines how to determine the result - of the status check. - properties: - statusCode: - description: StatusCode defines the expected http - status code for the request. A statusCode string - could be a single code (e.g. 200), or an inclusive - range (e.g. 200-400, both `200` and `400` are - included). - type: string - required: - - statusCode - type: object - headers: - additionalProperties: - items: - type: string - type: array - description: "A Header represents the key-value pairs - in an HTTP header. \n The keys should be in canonical - form, as returned by CanonicalHeaderKey." - type: object - method: - default: GET - enum: - - GET - - POST - type: string - url: - type: string - required: - - criteria - - url - type: object - intervalSeconds: - default: 10 - description: IntervalSeconds defines how often (in seconds) - to perform an execution of status check. - minimum: 1 - type: integer - mode: - description: 'Mode defines the execution mode of the status - check. Support type: Synchronous / Continuous' - enum: - - Synchronous - - Continuous - type: string - recordsHistoryLimit: - default: 100 - description: RecordsHistoryLimit defines the number of record - to retain. - maximum: 1000 - minimum: 1 - type: integer - successThreshold: - default: 1 - description: SuccessThreshold defines the minimum consecutive - successes for the status check to be considered successful. - SuccessThreshold only works for `Synchronous` mode. - minimum: 1 - type: integer - timeoutSeconds: - default: 1 - description: TimeoutSeconds defines the number of seconds - after which an execution of status check times out. - minimum: 1 - type: integer - type: - default: HTTP - description: 'Type defines the specific status check type. - Support type: HTTP' - enum: - - HTTP - type: string - required: - - type - type: object - stressChaos: - description: StressChaosSpec defines the desired state of StressChaos - properties: - containerNames: - description: ContainerNames indicates list of the name of - affected container. If not set, the first container will - be injected - items: - type: string - type: array - duration: - description: Duration represents the duration of the chaos - action - type: string - mode: - description: 'Mode defines the mode to run chaos action. - Supported mode: one / all / fixed / fixed-percent / random-max-percent' - enum: - - one - - all - - fixed - - fixed-percent - - random-max-percent - type: string - remoteCluster: - description: RemoteCluster represents the remote cluster - where the chaos will be deployed - type: string - selector: - description: Selector is used to select pods that are used - to inject chaos action. - properties: - annotationSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can - be used to select objects. A selector based on annotations. - type: object - expressionSelectors: - description: a slice of label selector expressions that - can be used to select objects. A list of selectors - based on set-based label expressions. - items: - description: A label selector requirement is a selector - that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the label key that the selector - applies to. - type: string - operator: - description: operator represents a key's relationship - to a set of values. Valid operators are In, - NotIn, Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. - If the operator is In or NotIn, the values array - must be non-empty. If the operator is Exists - or DoesNotExist, the values array must be empty. - This array is replaced during a strategic merge - patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - fieldSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can - be used to select objects. A selector based on fields. - type: object - labelSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can - be used to select objects. A selector based on labels. - type: object - namespaces: - description: Namespaces is a set of namespace to which - objects belong. - items: - type: string - type: array - nodeSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can - be used to select nodes. Selector which must match - a node's labels, and objects must belong to these - selected nodes. - type: object - nodes: - description: Nodes is a set of node name and objects - must belong to these nodes. - items: - type: string - type: array - podPhaseSelectors: - description: 'PodPhaseSelectors is a set of condition - of a pod at the current time. supported value: Pending - / Running / Succeeded / Failed / Unknown' - items: - type: string - type: array - pods: - additionalProperties: - items: - type: string - type: array - description: Pods is a map of string keys and a set - values that used to select pods. The key defines the - namespace which pods belong, and the each values is - a set of pod names. - type: object - type: object - stressngStressors: - description: StressngStressors defines plenty of stressors - just like `Stressors` except that it's an experimental - feature and more powerful. You can define stressors in - `stress-ng` (see also `man stress-ng`) dialect, however - not all of the supported stressors are well tested. It - maybe retired in later releases. You should always use - `Stressors` to define the stressors and use this only - when you want more stressors unsupported by `Stressors`. - When both `StressngStressors` and `Stressors` are defined, - `StressngStressors` wins. - type: string - stressors: - description: Stressors defines plenty of stressors supported - to stress system components out. You can use one or more - of them to make up various kinds of stresses. At least - one of the stressors should be specified. - properties: - cpu: - description: CPUStressor stresses CPU out - properties: - load: - description: Load specifies P percent loading per - CPU worker. 0 is effectively a sleep (no load) - and 100 is full loading. - maximum: 100 - minimum: 0 - type: integer - options: - description: extend stress-ng options - items: - type: string - type: array - workers: - description: Workers specifies N workers to apply - the stressor. Maximum 8192 workers can run by - stress-ng - maximum: 8192 - type: integer - required: - - workers - type: object - memory: - description: MemoryStressor stresses virtual memory - out - properties: - oomScoreAdj: - default: 0 - description: OOMScoreAdj sets the oom_score_adj - of the stress process. See `man 5 proc` to know - more about this option. - maximum: 1000 - minimum: -1000 - type: integer - options: - description: extend stress-ng options - items: - type: string - type: array - size: - description: Size 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 - workers: - description: Workers specifies N workers to apply - the stressor. Maximum 8192 workers can run by - stress-ng - maximum: 8192 - type: integer - required: - - workers - type: object - type: object - value: - description: Value is required when the mode is set to `FixedMode` - / `FixedPercentMode` / `RandomMaxPercentMode`. If `FixedMode`, - provide an integer of pods to do chaos action. If `FixedPercentMode`, - provide a number from 0-100 to specify the percent of - pods the server can do chaos action. IF `RandomMaxPercentMode`, provide - a number from 0-100 to specify the max percent of pods - to do chaos action - type: string - required: - - mode - - selector - type: object - task: - description: Task describes the behavior of the custom task. - Only used when Type is TypeTask. - properties: - container: - description: Container is the main container image to run - in the pod - properties: - args: - description: 'Arguments to the entrypoint. The container - image''s CMD is used if this is not provided. Variable - references $(VAR_NAME) are expanded using the container''s - environment. If a variable cannot be resolved, the - reference in the input string will be unchanged. Double - $$ are reduced to a single $, which allows for escaping - the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce - the string literal "$(VAR_NAME)". Escaped references - will never be expanded, regardless of whether the - variable exists or not. Cannot be updated. More info: - https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell' - items: - type: string - type: array - command: - description: 'Entrypoint array. Not executed within - a shell. The container image''s ENTRYPOINT is used - if this is not provided. Variable references $(VAR_NAME) - are expanded using the container''s environment. If - a variable cannot be resolved, the reference in the - input string will be unchanged. Double $$ are reduced - to a single $, which allows for escaping the $(VAR_NAME) - syntax: i.e. "$$(VAR_NAME)" will produce the string - literal "$(VAR_NAME)". Escaped references will never - be expanded, regardless of whether the variable exists - or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell' - items: - type: string - type: array - env: - description: List of environment variables to set in - the container. Cannot be updated. - items: - description: EnvVar represents an environment variable - present in a Container. - properties: - name: - description: Name of the environment variable. - Must be a C_IDENTIFIER. - type: string - value: - description: 'Variable references $(VAR_NAME) - are expanded using the previously defined environment - variables in the container and any service environment - variables. If a variable cannot be resolved, - the reference in the input string will be unchanged. - Double $$ are reduced to a single $, which allows - for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" - will produce the string literal "$(VAR_NAME)". - Escaped references will never be expanded, regardless - of whether the variable exists or not. Defaults - to "".' - type: string - valueFrom: - description: Source for the environment variable's - value. Cannot be used if value is not empty. - properties: - configMapKeyRef: - description: Selects a key of a ConfigMap. - properties: - key: - description: The key to select. - type: string - name: - description: 'Name of the referent. More - info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, - kind, uid?' - type: string - optional: - description: Specify whether the ConfigMap - or its key must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - fieldRef: - description: 'Selects a field of the pod: - supports metadata.name, metadata.namespace, - `metadata.labels['''']`, `metadata.annotations['''']`, - spec.nodeName, spec.serviceAccountName, - status.hostIP, status.podIP, status.podIPs.' - properties: - apiVersion: - description: Version of the schema the - FieldPath is written in terms of, defaults - to "v1". - type: string - fieldPath: - description: Path of the field to select - in the specified API version. - type: string - required: - - fieldPath - type: object - x-kubernetes-map-type: atomic - resourceFieldRef: - description: 'Selects a resource of the container: - only resources limits and requests (limits.cpu, - limits.memory, limits.ephemeral-storage, - requests.cpu, requests.memory and requests.ephemeral-storage) - are currently supported.' - properties: - containerName: - description: 'Container name: required - for volumes, optional for env vars' - type: string - divisor: - anyOf: - - type: integer - - type: string - description: Specifies the output format - of the exposed resources, defaults to - "1" - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - description: 'Required: resource to select' - type: string - required: - - resource - type: object - x-kubernetes-map-type: atomic - secretKeyRef: - description: Selects a key of a secret in - the pod's namespace - properties: - key: - description: The key of the secret to - select from. Must be a valid secret - key. - type: string - name: - description: 'Name of the referent. More - info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, - kind, uid?' - type: string - optional: - description: Specify whether the Secret - or its key must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - type: object - required: - - name - type: object - type: array - envFrom: - description: List of sources to populate environment - variables in the container. The keys defined within - a source must be a C_IDENTIFIER. All invalid keys - will be reported as an event when the container is - starting. When a key exists in multiple sources, the - value associated with the last source will take precedence. - Values defined by an Env with a duplicate key will - take precedence. Cannot be updated. - items: - description: EnvFromSource represents the source of - a set of ConfigMaps - properties: - configMapRef: - description: The ConfigMap to select from - properties: - name: - description: 'Name of the referent. More info: - https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, - kind, uid?' - type: string - optional: - description: Specify whether the ConfigMap - must be defined - type: boolean - type: object - x-kubernetes-map-type: atomic - prefix: - description: An optional identifier to prepend - to each key in the ConfigMap. Must be a C_IDENTIFIER. - type: string - secretRef: - description: The Secret to select from - properties: - name: - description: 'Name of the referent. More info: - https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, - kind, uid?' - type: string - optional: - description: Specify whether the Secret must - be defined - type: boolean - type: object - x-kubernetes-map-type: atomic - type: object - type: array - image: - description: 'Container image name. More info: https://kubernetes.io/docs/concepts/containers/images - This field is optional to allow higher level config - management to default or override container images - in workload controllers like Deployments and StatefulSets.' - type: string - imagePullPolicy: - description: 'Image pull policy. One of Always, Never, - IfNotPresent. Defaults to Always if :latest tag is - specified, or IfNotPresent otherwise. Cannot be updated. - More info: https://kubernetes.io/docs/concepts/containers/images#updating-images' - type: string - lifecycle: - description: Actions that the management system should - take in response to container lifecycle events. Cannot - be updated. - properties: - postStart: - description: 'PostStart is called immediately after - a container is created. If the handler fails, - the container is terminated and restarted according - to its restart policy. Other management of the - container blocks until the hook completes. More - info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks' - properties: - exec: - description: Exec specifies the action to take. - properties: - command: - description: Command is the command line - to execute inside the container, the working - directory for the command is root ('/') - in the container's filesystem. The command - is simply exec'd, it is not run inside - a shell, so traditional shell instructions - ('|', etc) won't work. To use a shell, - you need to explicitly call out to that - shell. Exit status of 0 is treated as - live/healthy and non-zero is unhealthy. - items: - type: string - type: array - type: object - httpGet: - description: HTTPGet specifies the http request - to perform. - properties: - host: - description: Host name to connect to, defaults - to the pod IP. You probably want to set - "Host" in httpHeaders instead. - type: string - httpHeaders: - description: Custom headers to set in the - request. HTTP allows repeated headers. - items: - description: HTTPHeader describes a custom - header to be used in HTTP probes - properties: - name: - description: The header field name. - This will be canonicalized upon - output, so case-variant names will - be understood as the same header. - type: string - value: - description: The header field value - type: string - required: - - name - - value - type: object - type: array - path: - description: Path to access on the HTTP - server. - type: string - port: - anyOf: - - type: integer - - type: string - description: Name or number of the port - to access on the container. Number must - be in the range 1 to 65535. Name must - be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - scheme: - description: Scheme to use for connecting - to the host. Defaults to HTTP. - type: string - required: - - port - type: object - tcpSocket: - description: Deprecated. TCPSocket is NOT supported - as a LifecycleHandler and kept for the backward - compatibility. There are no validation of - this field and lifecycle hooks will fail in - runtime when tcp handler is specified. - properties: - host: - description: 'Optional: Host name to connect - to, defaults to the pod IP.' - type: string - port: - anyOf: - - type: integer - - type: string - description: Number or name of the port - to access on the container. Number must - be in the range 1 to 65535. Name must - be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - required: - - port - type: object - type: object - preStop: - description: 'PreStop is called immediately before - a container is terminated due to an API request - or management event such as liveness/startup probe - failure, preemption, resource contention, etc. - The handler is not called if the container crashes - or exits. The Pod''s termination grace period - countdown begins before the PreStop hook is executed. - Regardless of the outcome of the handler, the - container will eventually terminate within the - Pod''s termination grace period (unless delayed - by finalizers). Other management of the container - blocks until the hook completes or until the termination - grace period is reached. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks' - properties: - exec: - description: Exec specifies the action to take. - properties: - command: - description: Command is the command line - to execute inside the container, the working - directory for the command is root ('/') - in the container's filesystem. The command - is simply exec'd, it is not run inside - a shell, so traditional shell instructions - ('|', etc) won't work. To use a shell, - you need to explicitly call out to that - shell. Exit status of 0 is treated as - live/healthy and non-zero is unhealthy. - items: - type: string - type: array - type: object - httpGet: - description: HTTPGet specifies the http request - to perform. - properties: - host: - description: Host name to connect to, defaults - to the pod IP. You probably want to set - "Host" in httpHeaders instead. - type: string - httpHeaders: - description: Custom headers to set in the - request. HTTP allows repeated headers. - items: - description: HTTPHeader describes a custom - header to be used in HTTP probes - properties: - name: - description: The header field name. - This will be canonicalized upon - output, so case-variant names will - be understood as the same header. - type: string - value: - description: The header field value - type: string - required: - - name - - value - type: object - type: array - path: - description: Path to access on the HTTP - server. - type: string - port: - anyOf: - - type: integer - - type: string - description: Name or number of the port - to access on the container. Number must - be in the range 1 to 65535. Name must - be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - scheme: - description: Scheme to use for connecting - to the host. Defaults to HTTP. - type: string - required: - - port - type: object - tcpSocket: - description: Deprecated. TCPSocket is NOT supported - as a LifecycleHandler and kept for the backward - compatibility. There are no validation of - this field and lifecycle hooks will fail in - runtime when tcp handler is specified. - properties: - host: - description: 'Optional: Host name to connect - to, defaults to the pod IP.' - type: string - port: - anyOf: - - type: integer - - type: string - description: Number or name of the port - to access on the container. Number must - be in the range 1 to 65535. Name must - be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - required: - - port - type: object - type: object - type: object - livenessProbe: - description: 'Periodic probe of container liveness. - Container will be restarted if the probe fails. Cannot - be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' - properties: - exec: - description: Exec specifies the action to take. - properties: - command: - description: Command is the command line to - execute inside the container, the working - directory for the command is root ('/') in - the container's filesystem. The command is - simply exec'd, it is not run inside a shell, - so traditional shell instructions ('|', etc) - won't work. To use a shell, you need to explicitly - call out to that shell. Exit status of 0 is - treated as live/healthy and non-zero is unhealthy. - items: - type: string - type: array - type: object - failureThreshold: - description: Minimum consecutive failures for the - probe to be considered failed after having succeeded. - Defaults to 3. Minimum value is 1. - format: int32 - type: integer - grpc: - description: GRPC specifies an action involving - a GRPC port. - properties: - port: - description: Port number of the gRPC service. - Number must be in the range 1 to 65535. - format: int32 - type: integer - service: - description: "Service is the name of the service - to place in the gRPC HealthCheckRequest (see - https://github.com/grpc/grpc/blob/master/doc/health-checking.md). - \n If this is not specified, the default behavior - is defined by gRPC." - type: string - required: - - port - type: object - httpGet: - description: HTTPGet specifies the http request - to perform. - properties: - host: - description: Host name to connect to, defaults - to the pod IP. You probably want to set "Host" - in httpHeaders instead. - type: string - httpHeaders: - description: Custom headers to set in the request. - HTTP allows repeated headers. - items: - description: HTTPHeader describes a custom - header to be used in HTTP probes - properties: - name: - description: The header field name. This - will be canonicalized upon output, so - case-variant names will be understood - as the same header. - type: string - value: - description: The header field value - type: string - required: - - name - - value - type: object - type: array - path: - description: Path to access on the HTTP server. - type: string - port: - anyOf: - - type: integer - - type: string - description: Name or number of the port to access - on the container. Number must be in the range - 1 to 65535. Name must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - scheme: - description: Scheme to use for connecting to - the host. Defaults to HTTP. - type: string - required: - - port - type: object - initialDelaySeconds: - description: 'Number of seconds after the container - has started before liveness probes are initiated. - More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' - format: int32 - type: integer - periodSeconds: - description: How often (in seconds) to perform the - probe. Default to 10 seconds. Minimum value is - 1. - format: int32 - type: integer - successThreshold: - description: Minimum consecutive successes for the - probe to be considered successful after having - failed. Defaults to 1. Must be 1 for liveness - and startup. Minimum value is 1. - format: int32 - type: integer - tcpSocket: - description: TCPSocket specifies an action involving - a TCP port. - properties: - host: - description: 'Optional: Host name to connect - to, defaults to the pod IP.' - type: string - port: - anyOf: - - type: integer - - type: string - description: Number or name of the port to access - on the container. Number must be in the range - 1 to 65535. Name must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - required: - - port - type: object - terminationGracePeriodSeconds: - description: Optional duration in seconds the pod - needs to terminate gracefully upon probe failure. - The grace period is the duration in seconds after - the processes running in the pod are sent a termination - signal and the time when the processes are forcibly - halted with a kill signal. Set this value longer - than the expected cleanup time for your process. - If this value is nil, the pod's terminationGracePeriodSeconds - will be used. Otherwise, this value overrides - the value provided by the pod spec. Value must - be non-negative integer. The value zero indicates - stop immediately via the kill signal (no opportunity - to shut down). This is a beta field and requires - enabling ProbeTerminationGracePeriod feature gate. - Minimum value is 1. spec.terminationGracePeriodSeconds - is used if unset. - format: int64 - type: integer - timeoutSeconds: - description: 'Number of seconds after which the - probe times out. Defaults to 1 second. Minimum - value is 1. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' - format: int32 - type: integer - type: object - name: - description: Name of the container specified as a DNS_LABEL. - Each container in a pod must have a unique name (DNS_LABEL). - Cannot be updated. - type: string - ports: - description: List of ports to expose from the container. - Not specifying a port here DOES NOT prevent that port - from being exposed. Any port which is listening on - the default "0.0.0.0" address inside a container will - be accessible from the network. Modifying this array - with strategic merge patch may corrupt the data. For - more information See https://github.com/kubernetes/kubernetes/issues/108255. - Cannot be updated. - items: - description: ContainerPort represents a network port - in a single container. - properties: - containerPort: - description: Number of port to expose on the pod's - IP address. This must be a valid port number, - 0 < x < 65536. - format: int32 - type: integer - hostIP: - description: What host IP to bind the external - port to. - type: string - hostPort: - description: Number of port to expose on the host. - If specified, this must be a valid port number, - 0 < x < 65536. If HostNetwork is specified, - this must match ContainerPort. Most containers - do not need this. - format: int32 - type: integer - name: - description: If specified, this must be an IANA_SVC_NAME - and unique within the pod. Each named port in - a pod must have a unique name. Name for the - port that can be referred to by services. - type: string - protocol: - default: TCP - description: Protocol for port. Must be UDP, TCP, - or SCTP. Defaults to "TCP". - type: string - required: - - containerPort - type: object - type: array - x-kubernetes-list-map-keys: - - containerPort - - protocol - x-kubernetes-list-type: map - readinessProbe: - description: 'Periodic probe of container service readiness. - Container will be removed from service endpoints if - the probe fails. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' - properties: - exec: - description: Exec specifies the action to take. - properties: - command: - description: Command is the command line to - execute inside the container, the working - directory for the command is root ('/') in - the container's filesystem. The command is - simply exec'd, it is not run inside a shell, - so traditional shell instructions ('|', etc) - won't work. To use a shell, you need to explicitly - call out to that shell. Exit status of 0 is - treated as live/healthy and non-zero is unhealthy. - items: - type: string - type: array - type: object - failureThreshold: - description: Minimum consecutive failures for the - probe to be considered failed after having succeeded. - Defaults to 3. Minimum value is 1. - format: int32 - type: integer - grpc: - description: GRPC specifies an action involving - a GRPC port. - properties: - port: - description: Port number of the gRPC service. - Number must be in the range 1 to 65535. - format: int32 - type: integer - service: - description: "Service is the name of the service - to place in the gRPC HealthCheckRequest (see - https://github.com/grpc/grpc/blob/master/doc/health-checking.md). - \n If this is not specified, the default behavior - is defined by gRPC." - type: string - required: - - port - type: object - httpGet: - description: HTTPGet specifies the http request - to perform. - properties: - host: - description: Host name to connect to, defaults - to the pod IP. You probably want to set "Host" - in httpHeaders instead. - type: string - httpHeaders: - description: Custom headers to set in the request. - HTTP allows repeated headers. - items: - description: HTTPHeader describes a custom - header to be used in HTTP probes - properties: - name: - description: The header field name. This - will be canonicalized upon output, so - case-variant names will be understood - as the same header. - type: string - value: - description: The header field value - type: string - required: - - name - - value - type: object - type: array - path: - description: Path to access on the HTTP server. - type: string - port: - anyOf: - - type: integer - - type: string - description: Name or number of the port to access - on the container. Number must be in the range - 1 to 65535. Name must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - scheme: - description: Scheme to use for connecting to - the host. Defaults to HTTP. - type: string - required: - - port - type: object - initialDelaySeconds: - description: 'Number of seconds after the container - has started before liveness probes are initiated. - More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' - format: int32 - type: integer - periodSeconds: - description: How often (in seconds) to perform the - probe. Default to 10 seconds. Minimum value is - 1. - format: int32 - type: integer - successThreshold: - description: Minimum consecutive successes for the - probe to be considered successful after having - failed. Defaults to 1. Must be 1 for liveness - and startup. Minimum value is 1. - format: int32 - type: integer - tcpSocket: - description: TCPSocket specifies an action involving - a TCP port. - properties: - host: - description: 'Optional: Host name to connect - to, defaults to the pod IP.' - type: string - port: - anyOf: - - type: integer - - type: string - description: Number or name of the port to access - on the container. Number must be in the range - 1 to 65535. Name must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - required: - - port - type: object - terminationGracePeriodSeconds: - description: Optional duration in seconds the pod - needs to terminate gracefully upon probe failure. - The grace period is the duration in seconds after - the processes running in the pod are sent a termination - signal and the time when the processes are forcibly - halted with a kill signal. Set this value longer - than the expected cleanup time for your process. - If this value is nil, the pod's terminationGracePeriodSeconds - will be used. Otherwise, this value overrides - the value provided by the pod spec. Value must - be non-negative integer. The value zero indicates - stop immediately via the kill signal (no opportunity - to shut down). This is a beta field and requires - enabling ProbeTerminationGracePeriod feature gate. - Minimum value is 1. spec.terminationGracePeriodSeconds - is used if unset. - format: int64 - type: integer - timeoutSeconds: - description: 'Number of seconds after which the - probe times out. Defaults to 1 second. Minimum - value is 1. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' - format: int32 - type: integer - type: object - resizePolicy: - description: Resources resize policy for the container. - items: - description: ContainerResizePolicy represents resource - resize policy for the container. - properties: - resourceName: - description: 'Name of the resource to which this - resource resize policy applies. Supported values: - cpu, memory.' - type: string - restartPolicy: - description: Restart policy to apply when specified - resource is resized. If not specified, it defaults - to NotRequired. - type: string - required: - - resourceName - - restartPolicy - type: object - type: array - x-kubernetes-list-type: atomic - resources: - description: 'Compute Resources required by this container. - Cannot be updated. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' - properties: - claims: - description: "Claims lists the names of resources, - defined in spec.resourceClaims, that are used - by this container. \n This is an alpha field and - requires enabling the DynamicResourceAllocation - feature gate. \n This field is immutable. It can - only be set for containers." - items: - description: ResourceClaim references one entry - in PodSpec.ResourceClaims. - properties: - name: - description: Name must match the name of one - entry in pod.spec.resourceClaims of the - Pod where this field is used. It makes that - resource available inside a container. - type: string - required: - - name - type: object - type: array - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Limits describes the maximum amount - of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Requests describes the minimum amount - of compute resources required. If Requests is - omitted for a container, it defaults to Limits - if that is explicitly specified, otherwise to - an implementation-defined value. Requests cannot - exceed Limits. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' - type: object - type: object - restartPolicy: - description: 'RestartPolicy defines the restart behavior - of individual containers in a pod. This field may - only be set for init containers, and the only allowed - value is "Always". For non-init containers or when - this field is not specified, the restart behavior - is defined by the Pod''s restart policy and the container - type. Setting the RestartPolicy as "Always" for the - init container will have the following effect: this - init container will be continually restarted on exit - until all regular containers have terminated. Once - all regular containers have completed, all init containers - with restartPolicy "Always" will be shut down. This - lifecycle differs from normal init containers and - is often referred to as a "sidecar" container. Although - this init container still starts in the init container - sequence, it does not wait for the container to complete - before proceeding to the next init container. Instead, - the next init container starts immediately after this - init container is started, or after any startupProbe - has successfully completed.' - type: string - 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/' - properties: - allowPrivilegeEscalation: - description: 'AllowPrivilegeEscalation controls - whether a process can gain more privileges than - its parent process. This bool directly controls - if the no_new_privs flag will be set on the container - process. AllowPrivilegeEscalation is true always - when the container is: 1) run as Privileged 2) - has CAP_SYS_ADMIN Note that this field cannot - be set when spec.os.name is windows.' - type: boolean - capabilities: - description: The capabilities to add/drop when running - containers. Defaults to the default set of capabilities - granted by the container runtime. Note that this - field cannot be set when spec.os.name is windows. - properties: - add: - description: Added capabilities - items: - description: Capability represent POSIX capabilities - type - type: string - type: array - drop: - description: Removed capabilities - items: - description: Capability represent POSIX capabilities - type - type: string - type: array - type: object - privileged: - description: Run container in privileged mode. Processes - in privileged containers are essentially equivalent - to root on the host. Defaults to false. Note that - this field cannot be set when spec.os.name is - windows. - type: boolean - procMount: - description: procMount denotes the type of proc - mount to use for the containers. The default is - DefaultProcMount which uses the container runtime - defaults for readonly paths and masked paths. - This requires the ProcMountType feature flag to - be enabled. Note that this field cannot be set - when spec.os.name is windows. - type: string - readOnlyRootFilesystem: - description: Whether this container has a read-only - root filesystem. Default is false. Note that this - field cannot be set when spec.os.name is windows. - type: boolean - runAsGroup: - description: The GID to run the entrypoint of the - container process. Uses runtime default if unset. - May also be set in PodSecurityContext. If set - in both SecurityContext and PodSecurityContext, - the value specified in SecurityContext takes precedence. - Note that this field cannot be set when spec.os.name - is windows. - format: int64 - type: integer - runAsNonRoot: - description: Indicates that the container must run - as a non-root user. If true, the Kubelet will - validate the image at runtime to ensure that it - does not run as UID 0 (root) and fail to start - the container if it does. If unset or false, no - such validation will be performed. May also be - set in PodSecurityContext. If set in both SecurityContext - and PodSecurityContext, the value specified in - SecurityContext takes precedence. - type: boolean - runAsUser: - description: The UID to run the entrypoint of the - container process. Defaults to user specified - in image metadata if unspecified. May also be - set in PodSecurityContext. If set in both SecurityContext - and PodSecurityContext, the value specified in - SecurityContext takes precedence. Note that this - field cannot be set when spec.os.name is windows. - format: int64 - type: integer - seLinuxOptions: - description: The SELinux context to be applied to - the container. If unspecified, the container runtime - will allocate a random SELinux context for each - container. May also be set in PodSecurityContext. If - set in both SecurityContext and PodSecurityContext, - the value specified in SecurityContext takes precedence. - Note that this field cannot be set when spec.os.name - is windows. - properties: - level: - description: Level is SELinux level label that - applies to the container. - type: string - role: - description: Role is a SELinux role label that - applies to the container. - type: string - type: - description: Type is a SELinux type label that - applies to the container. - type: string - user: - description: User is a SELinux user label that - applies to the container. - type: string - type: object - seccompProfile: - description: The seccomp options to use by this - container. If seccomp options are provided at - both the pod & container level, the container - options override the pod options. Note that this - field cannot be set when spec.os.name is windows. - properties: - localhostProfile: - description: localhostProfile indicates a profile - defined in a file on the node should be used. - The profile must be preconfigured on the node - to work. Must be a descending path, relative - to the kubelet's configured seccomp profile - location. Must be set if type is "Localhost". - Must NOT be set for any other type. - type: string - type: - description: "type indicates which kind of seccomp - profile will be applied. Valid options are: - \n Localhost - a profile defined in a file - on the node should be used. RuntimeDefault - - the container runtime default profile should - be used. Unconfined - no profile should be - applied." - type: string - required: - - type - type: object - windowsOptions: - description: The Windows specific settings applied - to all containers. If unspecified, the options - from the PodSecurityContext will be used. If set - in both SecurityContext and PodSecurityContext, - the value specified in SecurityContext takes precedence. - Note that this field cannot be set when spec.os.name - is linux. - properties: - gmsaCredentialSpec: - description: GMSACredentialSpec is where the - GMSA admission webhook (https://github.com/kubernetes-sigs/windows-gmsa) - inlines the contents of the GMSA credential - spec named by the GMSACredentialSpecName field. - type: string - gmsaCredentialSpecName: - description: GMSACredentialSpecName is the name - of the GMSA credential spec to use. - type: string - hostProcess: - description: HostProcess determines if a container - should be run as a 'Host Process' container. - All of a Pod's containers must have the same - effective HostProcess value (it is not allowed - to have a mix of HostProcess containers and - non-HostProcess containers). In addition, - if HostProcess is true then HostNetwork must - also be set to true. - type: boolean - runAsUserName: - description: The UserName in Windows to run - the entrypoint of the container process. Defaults - to the user specified in image metadata if - unspecified. May also be set in PodSecurityContext. - If set in both SecurityContext and PodSecurityContext, - the value specified in SecurityContext takes - precedence. - type: string - type: object - type: object - startupProbe: - description: 'StartupProbe indicates that the Pod has - successfully initialized. If specified, no other probes - are executed until this completes successfully. If - this probe fails, the Pod will be restarted, just - as if the livenessProbe failed. This can be used to - provide different probe parameters at the beginning - of a Pod''s lifecycle, when it might take a long time - to load data or warm a cache, than during steady-state - operation. This cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' - properties: - exec: - description: Exec specifies the action to take. - properties: - command: - description: Command is the command line to - execute inside the container, the working - directory for the command is root ('/') in - the container's filesystem. The command is - simply exec'd, it is not run inside a shell, - so traditional shell instructions ('|', etc) - won't work. To use a shell, you need to explicitly - call out to that shell. Exit status of 0 is - treated as live/healthy and non-zero is unhealthy. - items: - type: string - type: array - type: object - failureThreshold: - description: Minimum consecutive failures for the - probe to be considered failed after having succeeded. - Defaults to 3. Minimum value is 1. - format: int32 - type: integer - grpc: - description: GRPC specifies an action involving - a GRPC port. - properties: - port: - description: Port number of the gRPC service. - Number must be in the range 1 to 65535. - format: int32 - type: integer - service: - description: "Service is the name of the service - to place in the gRPC HealthCheckRequest (see - https://github.com/grpc/grpc/blob/master/doc/health-checking.md). - \n If this is not specified, the default behavior - is defined by gRPC." - type: string - required: - - port - type: object - httpGet: - description: HTTPGet specifies the http request - to perform. - properties: - host: - description: Host name to connect to, defaults - to the pod IP. You probably want to set "Host" - in httpHeaders instead. - type: string - httpHeaders: - description: Custom headers to set in the request. - HTTP allows repeated headers. - items: - description: HTTPHeader describes a custom - header to be used in HTTP probes - properties: - name: - description: The header field name. This - will be canonicalized upon output, so - case-variant names will be understood - as the same header. - type: string - value: - description: The header field value - type: string - required: - - name - - value - type: object - type: array - path: - description: Path to access on the HTTP server. - type: string - port: - anyOf: - - type: integer - - type: string - description: Name or number of the port to access - on the container. Number must be in the range - 1 to 65535. Name must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - scheme: - description: Scheme to use for connecting to - the host. Defaults to HTTP. - type: string - required: - - port - type: object - initialDelaySeconds: - description: 'Number of seconds after the container - has started before liveness probes are initiated. - More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' - format: int32 - type: integer - periodSeconds: - description: How often (in seconds) to perform the - probe. Default to 10 seconds. Minimum value is - 1. - format: int32 - type: integer - successThreshold: - description: Minimum consecutive successes for the - probe to be considered successful after having - failed. Defaults to 1. Must be 1 for liveness - and startup. Minimum value is 1. - format: int32 - type: integer - tcpSocket: - description: TCPSocket specifies an action involving - a TCP port. - properties: - host: - description: 'Optional: Host name to connect - to, defaults to the pod IP.' - type: string - port: - anyOf: - - type: integer - - type: string - description: Number or name of the port to access - on the container. Number must be in the range - 1 to 65535. Name must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - required: - - port - type: object - terminationGracePeriodSeconds: - description: Optional duration in seconds the pod - needs to terminate gracefully upon probe failure. - The grace period is the duration in seconds after - the processes running in the pod are sent a termination - signal and the time when the processes are forcibly - halted with a kill signal. Set this value longer - than the expected cleanup time for your process. - If this value is nil, the pod's terminationGracePeriodSeconds - will be used. Otherwise, this value overrides - the value provided by the pod spec. Value must - be non-negative integer. The value zero indicates - stop immediately via the kill signal (no opportunity - to shut down). This is a beta field and requires - enabling ProbeTerminationGracePeriod feature gate. - Minimum value is 1. spec.terminationGracePeriodSeconds - is used if unset. - format: int64 - type: integer - timeoutSeconds: - description: 'Number of seconds after which the - probe times out. Defaults to 1 second. Minimum - value is 1. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' - format: int32 - type: integer - type: object - stdin: - description: Whether this container should allocate - a buffer for stdin in the container runtime. If this - is not set, reads from stdin in the container will - always result in EOF. Default is false. - type: boolean - stdinOnce: - description: Whether the container runtime should close - the stdin channel after it has been opened by a single - attach. When stdin is true the stdin stream will remain - open across multiple attach sessions. If stdinOnce - is set to true, stdin is opened on container start, - is empty until the first client attaches to stdin, - and then remains open and accepts data until the client - disconnects, at which time stdin is closed and remains - closed until the container is restarted. If this flag - is false, a container processes that reads from stdin - will never receive an EOF. Default is false - type: boolean - terminationMessagePath: - description: 'Optional: Path at which the file to which - the container''s termination message will be written - is mounted into the container''s filesystem. Message - written is intended to be brief final status, such - as an assertion failure message. Will be truncated - by the node if greater than 4096 bytes. The total - message length across all containers will be limited - to 12kb. Defaults to /dev/termination-log. Cannot - be updated.' - type: string - terminationMessagePolicy: - description: Indicate how the termination message should - be populated. File will use the contents of terminationMessagePath - to populate the container status message on both success - and failure. FallbackToLogsOnError will use the last - chunk of container log output if the termination message - file is empty and the container exited with an error. - The log output is limited to 2048 bytes or 80 lines, - whichever is smaller. Defaults to File. Cannot be - updated. - type: string - tty: - description: Whether this container should allocate - a TTY for itself, also requires 'stdin' to be true. - Default is false. - type: boolean - volumeDevices: - description: volumeDevices is the list of block devices - to be used by the container. - items: - description: volumeDevice describes a mapping of a - raw block device within a container. - properties: - devicePath: - description: devicePath is the path inside of - the container that the device will be mapped - to. - type: string - name: - description: name must match the name of a persistentVolumeClaim - in the pod - type: string - required: - - devicePath - - name - type: object - type: array - volumeMounts: - description: Pod volumes to mount into the container's - filesystem. Cannot be updated. - items: - description: VolumeMount describes a mounting of a - Volume within a container. - properties: - mountPath: - description: Path within the container at which - the volume should be mounted. Must not contain - ':'. - type: string - mountPropagation: - description: mountPropagation determines how mounts - are propagated from the host to container and - the other way around. When not set, MountPropagationNone - is used. This field is beta in 1.10. - type: string - name: - description: This must match the Name of a Volume. - type: string - readOnly: - description: Mounted read-only if true, read-write - otherwise (false or unspecified). Defaults to - false. - type: boolean - subPath: - description: Path within the volume from which - the container's volume should be mounted. Defaults - to "" (volume's root). - type: string - subPathExpr: - description: Expanded path within the volume from - which the container's volume should be mounted. - Behaves similarly to SubPath but environment - variable references $(VAR_NAME) are expanded - using the container's environment. Defaults - to "" (volume's root). SubPathExpr and SubPath - are mutually exclusive. - type: string - required: - - mountPath - - name - type: object - type: array - workingDir: - description: Container's working directory. If not specified, - the container runtime's default will be used, which - might be configured in the container image. Cannot - be updated. - type: string - required: - - name - type: object - volumes: - description: Volumes is a list of volumes that can be mounted - by containers in a template. - items: - description: Volume represents a named volume in a pod - that may be accessed by any container in the pod. - properties: - awsElasticBlockStore: - description: 'awsElasticBlockStore represents an AWS - Disk resource that is attached to a kubelet''s host - machine and then exposed to the pod. More info: - https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore' - properties: - fsType: - description: 'fsType is the filesystem type of - the volume that you want to mount. Tip: Ensure - that the filesystem type is supported by the - host operating system. Examples: "ext4", "xfs", - "ntfs". Implicitly inferred to be "ext4" if - unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore - TODO: how do we prevent errors in the filesystem - from compromising the machine' - type: string - partition: - description: 'partition is the partition in the - volume that you want to mount. If omitted, the - default is to mount by volume name. Examples: - For volume /dev/sda1, you specify the partition - as "1". Similarly, the volume partition for - /dev/sda is "0" (or you can leave the property - empty).' - format: int32 - type: integer - readOnly: - description: 'readOnly value true will force the - readOnly setting in VolumeMounts. More info: - https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore' - type: boolean - volumeID: - description: 'volumeID is unique ID of the persistent - disk resource in AWS (Amazon EBS volume). More - info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore' - type: string - required: - - volumeID - type: object - azureDisk: - description: azureDisk represents an Azure Data Disk - mount on the host and bind mount to the pod. - properties: - cachingMode: - description: 'cachingMode is the Host Caching - mode: None, Read Only, Read Write.' - type: string - diskName: - description: diskName is the Name of the data - disk in the blob storage - type: string - diskURI: - description: diskURI is the URI of data disk in - the blob storage - type: string - fsType: - description: fsType is Filesystem type to mount. - Must be a filesystem type supported by the host - operating system. Ex. "ext4", "xfs", "ntfs". - Implicitly inferred to be "ext4" if unspecified. - type: string - kind: - description: 'kind expected values are Shared: - multiple blob disks per storage account Dedicated: - single blob disk per storage account Managed: - azure managed data disk (only in managed availability - set). defaults to shared' - type: string - readOnly: - description: readOnly Defaults to false (read/write). - ReadOnly here will force the ReadOnly setting - in VolumeMounts. - type: boolean - required: - - diskName - - diskURI - type: object - azureFile: - description: azureFile represents an Azure File Service - mount on the host and bind mount to the pod. - properties: - readOnly: - description: readOnly defaults to false (read/write). - ReadOnly here will force the ReadOnly setting - in VolumeMounts. - type: boolean - secretName: - description: secretName is the name of secret - that contains Azure Storage Account Name and - Key - type: string - shareName: - description: shareName is the azure share Name - type: string - required: - - secretName - - shareName - type: object - cephfs: - description: cephFS represents a Ceph FS mount on - the host that shares a pod's lifetime - properties: - monitors: - description: 'monitors is Required: Monitors is - a collection of Ceph monitors More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' - items: - type: string - type: array - path: - description: 'path is Optional: Used as the mounted - root, rather than the full Ceph tree, default - is /' - type: string - readOnly: - description: 'readOnly is Optional: Defaults to - false (read/write). ReadOnly here will force - the ReadOnly setting in VolumeMounts. More info: - https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' - type: boolean - secretFile: - description: 'secretFile is Optional: SecretFile - is the path to key ring for User, default is - /etc/ceph/user.secret More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' - type: string - secretRef: - description: 'secretRef is Optional: SecretRef - is reference to the authentication secret for - User, default is empty. More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' - properties: - name: - description: 'Name of the referent. More info: - https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, - kind, uid?' - type: string - type: object - x-kubernetes-map-type: atomic - user: - description: 'user is optional: User is the rados - user name, default is admin More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' - type: string - required: - - monitors - type: object - cinder: - description: 'cinder represents a cinder volume attached - and mounted on kubelets host machine. More info: - https://examples.k8s.io/mysql-cinder-pd/README.md' - properties: - fsType: - description: 'fsType is the filesystem type to - mount. Must be a filesystem type supported by - the host operating system. Examples: "ext4", - "xfs", "ntfs". Implicitly inferred to be "ext4" - if unspecified. More info: https://examples.k8s.io/mysql-cinder-pd/README.md' - type: string - readOnly: - description: 'readOnly defaults to false (read/write). - ReadOnly here will force the ReadOnly setting - in VolumeMounts. More info: https://examples.k8s.io/mysql-cinder-pd/README.md' - type: boolean - secretRef: - description: 'secretRef is optional: points to - a secret object containing parameters used to - connect to OpenStack.' - properties: - name: - description: 'Name of the referent. More info: - https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, - kind, uid?' - type: string - type: object - x-kubernetes-map-type: atomic - volumeID: - description: 'volumeID used to identify the volume - in cinder. More info: https://examples.k8s.io/mysql-cinder-pd/README.md' - type: string - required: - - volumeID - type: object - configMap: - description: configMap represents a configMap that - should populate this volume - properties: - defaultMode: - description: 'defaultMode is optional: mode bits - used to set permissions on created files by - default. Must be an octal value between 0000 - and 0777 or a decimal value between 0 and 511. - YAML accepts both octal and decimal values, - JSON requires decimal values for mode bits. - Defaults to 0644. Directories within the path - are not affected by this setting. This might - be in conflict with other options that affect - the file mode, like fsGroup, and the result - can be other mode bits set.' - format: int32 - type: integer - items: - description: items if unspecified, each key-value - pair in the Data field of the referenced ConfigMap - will be projected into the volume as a file - whose name is the key and content is the value. - If specified, the listed keys will be projected - into the specified paths, and unlisted keys - will not be present. If a key is specified which - is not present in the ConfigMap, the volume - setup will error unless it is marked optional. - Paths must be relative and may not contain the - '..' path or start with '..'. - items: - description: Maps a string key to a path within - a volume. - properties: - key: - description: key is the key to project. - type: string - mode: - description: 'mode is Optional: mode bits - used to set permissions on this file. - Must be an octal value between 0000 and - 0777 or a decimal value between 0 and - 511. YAML accepts both octal and decimal - values, JSON requires decimal values for - mode bits. If not specified, the volume - defaultMode will be used. This might be - in conflict with other options that affect - the file mode, like fsGroup, and the result - can be other mode bits set.' - format: int32 - type: integer - path: - description: path is the relative path of - the file to map the key to. May not be - an absolute path. May not contain the - path element '..'. May not start with - the string '..'. - type: string - required: - - key - - path - type: object - 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?' - type: string - optional: - description: optional specify whether the ConfigMap - or its keys must be defined - type: boolean - type: object - x-kubernetes-map-type: atomic - csi: - description: csi (Container Storage Interface) represents - ephemeral storage that is handled by certain external - CSI drivers (Beta feature). - 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: fsType to mount. Ex. "ext4", "xfs", - "ntfs". If not provided, the empty value is - passed to the associated CSI driver which will - determine the default filesystem to apply. - type: string - nodePublishSecretRef: - description: nodePublishSecretRef is a reference - to the secret object containing sensitive information - to pass to the CSI driver to complete the CSI - NodePublishVolume and NodeUnpublishVolume calls. - This field is optional, and may be empty if - no secret is required. If the secret object - contains more than one secret, all secret references - are passed. - properties: - name: - description: 'Name of the referent. More info: - https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, - kind, uid?' - type: string - type: object - x-kubernetes-map-type: atomic - readOnly: - description: readOnly specifies a read-only configuration - for the volume. Defaults to false (read/write). - 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. - type: object - required: - - driver - type: object - downwardAPI: - description: downwardAPI represents downward API about - the pod that should populate this volume - 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.' - format: int32 - type: integer - items: - description: Items is a list of downward API volume - file - items: - description: DownwardAPIVolumeFile represents - information to create the file containing - the pod field - properties: - fieldRef: - description: 'Required: Selects a field - of the pod: only annotations, labels, - name and namespace are supported.' - properties: - apiVersion: - description: Version of the schema the - FieldPath is written in terms of, - defaults to "v1". - type: string - fieldPath: - description: Path of the field to select - in the specified API version. - type: string - required: - - fieldPath - type: object - x-kubernetes-map-type: atomic - 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.' - format: int32 - 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 - (limits.cpu, limits.memory, requests.cpu - and requests.memory) are currently supported.' - properties: - containerName: - description: 'Container name: required - for volumes, optional for env vars' - type: string - divisor: - anyOf: - - type: integer - - type: string - description: Specifies the output format - of the exposed resources, defaults - to "1" - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - description: 'Required: resource to - select' - type: string - required: - - resource - type: object - x-kubernetes-map-type: atomic - required: - - path - type: object - type: array - type: object - emptyDir: - description: 'emptyDir represents a temporary directory - that shares a pod''s lifetime. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir' - properties: - medium: - description: 'medium represents what type of storage - medium should back this directory. The default - is "" which means to use the node''s default - medium. Must be an empty string (default) or - Memory. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir' - type: string - sizeLimit: - anyOf: - - type: integer - - type: string - description: 'sizeLimit is the total amount of - local storage required for this EmptyDir volume. - The size limit is also applicable for memory - medium. The maximum usage on memory medium EmptyDir - would be the minimum value between the SizeLimit - specified here and the sum of memory limits - of all containers in a pod. The default is nil - which means that the limit is undefined. More - info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir' - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - ephemeral: - description: "ephemeral represents a volume that is - handled by a cluster storage driver. The volume's - lifecycle is tied to the pod that defines it - it - will be created before the pod starts, and deleted - when the pod is removed. \n 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). \n Use PersistentVolumeClaim - or one of the vendor-specific APIs for volumes that - persist for longer than the lifecycle of an individual - pod. \n 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. \n A pod can use both types of ephemeral - volumes and persistent volumes at the same time." - properties: - volumeClaimTemplate: - description: "Will be used to create a stand-alone - PVC to provision the volume. The pod in which - this EphemeralVolumeSource is embedded will - be the owner of the PVC, i.e. the PVC will be - deleted together with the pod. The name of - the PVC will be `-` where - `` is the name from the `PodSpec.Volumes` - array entry. Pod validation will reject the - pod if the concatenated name is not valid for - a PVC (for example, too long). \n 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. \n This field - is read-only and no changes will be made by - Kubernetes to the PVC after it has been created. - \n Required, must not be nil." - properties: - metadata: - description: May contain labels and annotations - that will be copied into the PVC when creating - it. No other fields are allowed and will - be rejected during validation. - type: object - spec: - description: The specification for the PersistentVolumeClaim. - The entire content is copied unchanged into - the PVC that gets created from this template. - The same fields as in a PersistentVolumeClaim - are also valid here. - 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' - items: - type: string - type: array - dataSource: - description: 'dataSource field can be - used to specify either: * An existing - VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot) - * An existing PVC (PersistentVolumeClaim) - If the provisioner or an external controller - can support the specified data source, - it will create a new volume based on - the contents of the specified data source. - When the AnyVolumeDataSource feature - gate is enabled, dataSource contents - will be copied to dataSourceRef, and - dataSourceRef contents will be copied - to dataSource when dataSourceRef.namespace - is not specified. If the namespace is - specified, then dataSourceRef will not - be copied to dataSource.' - properties: - apiGroup: - description: APIGroup is the group - for the resource being referenced. - If APIGroup is not specified, the - specified Kind must be in the core - API group. For any other third-party - types, APIGroup is required. - type: string - kind: - description: Kind is the type of resource - being referenced - type: string - name: - description: Name is the name of resource - being referenced - type: string - required: - - kind - - name - type: object - x-kubernetes-map-type: atomic - dataSourceRef: - description: 'dataSourceRef specifies - the object from which to populate the - volume with data, if a non-empty volume - is desired. This may be any object from - a non-empty API group (non core object) - or a PersistentVolumeClaim object. When - this field is specified, volume binding - will only succeed if the type of the - specified object matches some installed - volume populator or dynamic provisioner. - This field will replace the functionality - of the dataSource field and as such - if both fields are non-empty, they must - have the same value. For backwards compatibility, - when namespace isn''t specified in dataSourceRef, - both fields (dataSource and dataSourceRef) - will be set to the same value automatically - if one of them is empty and the other - is non-empty. When namespace is specified - in dataSourceRef, dataSource isn''t - set to the same value and must be empty. - There are three important differences - between dataSource and dataSourceRef: - * While dataSource only allows two specific - types of objects, dataSourceRef 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. - * While dataSource only allows local - objects, dataSourceRef allows objects - in any namespaces. (Beta) Using this - field requires the AnyVolumeDataSource - feature gate to be enabled. (Alpha) - Using the namespace field of dataSourceRef - requires the CrossNamespaceVolumeDataSource - feature gate to be enabled.' - properties: - apiGroup: - description: APIGroup is the group - for the resource being referenced. - If APIGroup is not specified, the - specified Kind must be in the core - API group. For any other third-party - types, APIGroup is required. - type: string - kind: - description: Kind is the type of resource - being referenced - type: string - name: - description: Name is the name of resource - being referenced - type: string - namespace: - description: Namespace is the namespace - of resource being referenced Note - that when a namespace is specified, - a gateway.networking.k8s.io/ReferenceGrant - object is required in the referent - namespace to allow that namespace's - owner to accept the reference. See - the ReferenceGrant documentation - for details. (Alpha) This field - requires the CrossNamespaceVolumeDataSource - feature gate to be enabled. - type: string - required: - - kind - - name - type: object - resources: - 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' - properties: - claims: - description: "Claims lists the names - of resources, defined in spec.resourceClaims, - that are used by this container. - \n This is an alpha field and requires - enabling the DynamicResourceAllocation - feature gate. \n This field is immutable. - It can only be set for containers." - items: - description: ResourceClaim references - one entry in PodSpec.ResourceClaims. - properties: - name: - description: Name must match - the name of one entry in pod.spec.resourceClaims - of the Pod where this field - is used. It makes that resource - available inside a container. - type: string - required: - - name - type: object - type: array - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Limits describes the - maximum amount of compute resources - allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Requests describes the - minimum amount of compute resources - required. If Requests is omitted - for a container, it defaults to - Limits if that is explicitly specified, - otherwise to an implementation-defined - value. Requests cannot exceed Limits. - More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' - type: object - type: object - selector: - description: selector is a label query - over volumes to consider for binding. - properties: - matchExpressions: - description: matchExpressions is a - list of label selector requirements. - The requirements are ANDed. - items: - description: A label selector requirement - is a selector that contains values, - a key, and an operator that relates - the key and values. - properties: - key: - description: key is the label - key that the selector applies - to. - type: string - operator: - description: operator represents - a key's relationship to a - set of values. Valid operators - are In, NotIn, Exists and - DoesNotExist. - type: string - values: - description: values is an array - of string values. If the operator - is In or NotIn, the values - array must be non-empty. If - the operator is Exists or - DoesNotExist, the values array - must be empty. This array - is replaced during a strategic - merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map - of {key,value} pairs. A single {key,value} - in the matchLabels map is equivalent - to an element of matchExpressions, - whose key field is "key", the operator - is "In", and the values array contains - only "value". The requirements are - ANDed. - type: object - type: object - x-kubernetes-map-type: atomic - storageClassName: - description: 'storageClassName is the - name of the StorageClass required by - the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1' - type: string - volumeMode: - description: volumeMode defines what type - of volume is required by the claim. - Value of Filesystem is implied when - not included in claim spec. - type: string - volumeName: - description: volumeName is the binding - reference to the PersistentVolume backing - this claim. - type: string - type: object - required: - - spec - type: object - type: object - fc: - description: fc represents a Fibre Channel resource - that is attached to a kubelet's host machine and - then exposed to the pod. - properties: - fsType: - description: 'fsType is the filesystem type to - mount. Must be a filesystem type supported by - the host operating system. Ex. "ext4", "xfs", - "ntfs". Implicitly inferred to be "ext4" if - unspecified. TODO: how do we prevent errors - in the filesystem from compromising the machine' - type: string - lun: - description: 'lun is Optional: FC target lun number' - format: int32 - type: integer - readOnly: - description: 'readOnly is Optional: Defaults to - false (read/write). ReadOnly here will force - the ReadOnly setting in VolumeMounts.' - type: boolean - targetWWNs: - description: 'targetWWNs is Optional: FC target - worldwide names (WWNs)' - items: - type: string - type: array - wwids: - description: 'wwids Optional: FC volume world - wide identifiers (wwids) Either wwids or combination - of targetWWNs and lun must be set, but not both - simultaneously.' - items: - type: string - type: array - type: object - flexVolume: - description: flexVolume represents a generic volume - resource that is provisioned/attached using an exec - based plugin. - properties: - driver: - description: driver is the name of the driver - to use for this volume. - type: string - fsType: - description: fsType is the filesystem type to - mount. Must be a filesystem type supported by - the host operating system. Ex. "ext4", "xfs", - "ntfs". The default filesystem depends on FlexVolume - script. - type: string - options: - additionalProperties: - type: string - description: 'options is Optional: this field - holds extra command options if any.' - type: object - readOnly: - description: 'readOnly is Optional: defaults to - false (read/write). ReadOnly here will force - the ReadOnly setting in VolumeMounts.' - type: boolean - secretRef: - description: 'secretRef is Optional: secretRef - is reference to the secret object containing - sensitive information to pass to the plugin - scripts. This may be empty if no secret object - is specified. If the secret object contains - more than one secret, all secrets are passed - to the plugin scripts.' - properties: - name: - description: 'Name of the referent. More info: - https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, - kind, uid?' - type: string - type: object - x-kubernetes-map-type: atomic - required: - - driver - type: object - flocker: - description: flocker represents a Flocker volume attached - to a kubelet's host machine. This depends on the - Flocker control service being running - properties: - datasetName: - description: datasetName is Name of the dataset - stored as metadata -> name on the dataset for - Flocker should be considered as deprecated - type: string - datasetUUID: - description: datasetUUID is the UUID of the dataset. - This is unique identifier of a Flocker dataset - type: string - type: object - gcePersistentDisk: - description: 'gcePersistentDisk represents a GCE Disk - resource that is attached to a kubelet''s host machine - and then exposed to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' - properties: - fsType: - description: 'fsType is filesystem type of the - volume that you want to mount. Tip: Ensure that - the filesystem type is supported by the host - operating system. Examples: "ext4", "xfs", "ntfs". - Implicitly inferred to be "ext4" if unspecified. - More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk - TODO: how do we prevent errors in the filesystem - from compromising the machine' - type: string - partition: - description: 'partition is the partition in the - volume that you want to mount. If omitted, the - default is to mount by volume name. Examples: - For volume /dev/sda1, you specify the partition - as "1". Similarly, the volume partition for - /dev/sda is "0" (or you can leave the property - empty). More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' - format: int32 - type: integer - pdName: - description: 'pdName is unique name of the PD - resource in GCE. Used to identify the disk in - GCE. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' - type: string - readOnly: - description: 'readOnly here will force the ReadOnly - setting in VolumeMounts. Defaults to false. - More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' - type: boolean - required: - - pdName - type: object - gitRepo: - description: 'gitRepo represents a git repository - at a particular revision. DEPRECATED: GitRepo is - deprecated. To provision a container with a git - repo, mount an EmptyDir into an InitContainer that - clones the repo using git, then mount the EmptyDir - into the Pod''s container.' - properties: - directory: - description: directory is the target directory - name. Must not contain or start with '..'. If - '.' is supplied, the volume directory will be - the git repository. Otherwise, if specified, - the volume will contain the git repository in - the subdirectory with the given name. - type: string - repository: - description: repository is the URL - type: string - revision: - description: revision is the commit hash for the - specified revision. - type: string - required: - - repository - type: object - glusterfs: - description: 'glusterfs represents a Glusterfs mount - on the host that shares a pod''s lifetime. More - info: https://examples.k8s.io/volumes/glusterfs/README.md' - properties: - endpoints: - description: 'endpoints is the endpoint name that - details Glusterfs topology. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod' - type: string - path: - description: 'path is the Glusterfs volume path. - More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod' - type: string - readOnly: - description: 'readOnly here will force the Glusterfs - volume to be mounted with read-only permissions. - Defaults to false. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod' - type: boolean - required: - - endpoints - - path - type: object - hostPath: - description: 'hostPath represents a pre-existing file - or directory on the host machine that is directly - exposed to the container. This is generally used - for system agents or other privileged things that - are allowed to see the host machine. Most containers - will NOT need this. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath - --- TODO(jonesdl) We need to restrict who can use - host directory mounts and who can/can not mount - host directories as read/write.' - properties: - path: - description: 'path of the directory on the host. - If the path is a symlink, it will follow the - link to the real path. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath' - type: string - type: - description: 'type for HostPath Volume Defaults - to "" More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath' - type: string - required: - - path - type: object - iscsi: - description: 'iscsi represents an ISCSI Disk resource - that is attached to a kubelet''s host machine and - then exposed to the pod. More info: https://examples.k8s.io/volumes/iscsi/README.md' - properties: - chapAuthDiscovery: - description: chapAuthDiscovery defines whether - support iSCSI Discovery CHAP authentication - type: boolean - chapAuthSession: - description: chapAuthSession defines whether support - iSCSI Session CHAP authentication - type: boolean - fsType: - description: 'fsType is the filesystem type of - the volume that you want to mount. Tip: Ensure - that the filesystem type is supported by the - host operating system. Examples: "ext4", "xfs", - "ntfs". Implicitly inferred to be "ext4" if - unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#iscsi - TODO: how do we prevent errors in the filesystem - from compromising the machine' - type: string - initiatorName: - description: initiatorName is the custom iSCSI - Initiator Name. If initiatorName is specified - with iscsiInterface simultaneously, new iSCSI - interface : will - be created for the connection. - type: string - iqn: - description: iqn is the target iSCSI Qualified - Name. - type: string - iscsiInterface: - description: iscsiInterface is the interface Name - that uses an iSCSI transport. Defaults to 'default' - (tcp). - type: string - lun: - description: lun represents iSCSI Target Lun number. - format: int32 - type: integer - portals: - description: portals is the iSCSI Target Portal - List. The portal is either an IP or ip_addr:port - if the port is other than default (typically - TCP ports 860 and 3260). - items: - type: string - type: array - readOnly: - description: readOnly here will force the ReadOnly - setting in VolumeMounts. Defaults to false. - type: boolean - secretRef: - description: secretRef is the CHAP Secret for - iSCSI target and initiator authentication - properties: - name: - description: 'Name of the referent. More info: - https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, - kind, uid?' - type: string - type: object - x-kubernetes-map-type: atomic - targetPortal: - description: targetPortal is iSCSI Target Portal. - The Portal is either an IP or ip_addr:port if - the port is other than default (typically TCP - ports 860 and 3260). - type: string - required: - - iqn - - lun - - targetPortal - type: object - name: - description: 'name of the volume. Must be a DNS_LABEL - and unique within the pod. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' - type: string - nfs: - description: 'nfs represents an NFS mount on the host - that shares a pod''s lifetime More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' - properties: - path: - description: 'path that is exported by the NFS - server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' - type: string - readOnly: - description: 'readOnly here will force the NFS - export to be mounted with read-only permissions. - Defaults to false. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' - type: boolean - server: - description: 'server is the hostname or IP address - of the NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' - type: string - required: - - path - - server - type: object - persistentVolumeClaim: - description: 'persistentVolumeClaimVolumeSource represents - a reference to a PersistentVolumeClaim in the same - namespace. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims' - 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: readOnly Will force the ReadOnly - setting in VolumeMounts. Default false. - type: boolean - required: - - claimName - type: object - photonPersistentDisk: - description: photonPersistentDisk represents a PhotonController - persistent disk attached and mounted on kubelets - host machine - properties: - fsType: - description: fsType is the filesystem type to - mount. Must be a filesystem type supported by - the host operating system. Ex. "ext4", "xfs", - "ntfs". Implicitly inferred to be "ext4" if - unspecified. - type: string - pdID: - description: pdID is the ID that identifies Photon - Controller persistent disk - type: string - required: - - pdID - type: object - portworxVolume: - description: portworxVolume represents a portworx - volume attached and mounted on kubelets host machine - 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: readOnly defaults to false (read/write). - ReadOnly here will force the ReadOnly setting - in VolumeMounts. - type: boolean - volumeID: - description: volumeID uniquely identifies a Portworx - volume - type: string - required: - - volumeID - type: object - projected: - description: projected items for all in one resources - secrets, configmaps, and downward API - properties: - defaultMode: - description: defaultMode are the mode bits used - to set permissions on created files by default. - Must be an octal value between 0000 and 0777 - or a decimal value between 0 and 511. YAML accepts - both octal and decimal values, JSON requires - decimal values for mode bits. Directories within - the path are not affected by this setting. This - might be in conflict with other options that - affect the file mode, like fsGroup, and the - result can be other mode bits set. - format: int32 - type: integer - sources: - description: sources is the list of volume projections - items: - description: Projection that may be projected - along with other supported volume types - properties: - configMap: - description: configMap information about - the configMap data to project - properties: - items: - description: items if unspecified, each - key-value pair in the Data field of - the referenced ConfigMap will be projected - into the volume as a file whose name - is the key and content is the value. - If specified, the listed keys will - be projected into the specified paths, - and unlisted keys will not be present. - If a key is specified which is not - present in the ConfigMap, the volume - setup will error unless it is marked - optional. Paths must be relative and - may not contain the '..' path or start - with '..'. - items: - description: Maps a string key to - a path within a volume. - properties: - key: - description: key is the key to - project. - type: string - mode: - description: 'mode is Optional: - mode bits used to set permissions - on this file. Must be an octal - value between 0000 and 0777 - or a decimal value between 0 - and 511. YAML accepts both octal - and decimal values, JSON requires - decimal values for mode bits. - If not specified, the volume - defaultMode will be used. This - might be in conflict with other - options that affect the file - mode, like fsGroup, and the - result can be other mode bits - set.' - format: int32 - type: integer - path: - description: path is the relative - path of the file to map the - key to. May not be an absolute - path. May not contain the path - element '..'. May not start - with the string '..'. - type: string - required: - - key - - path - type: object - 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?' - type: string - optional: - description: optional specify whether - the ConfigMap or its keys must be - defined - type: boolean - type: object - x-kubernetes-map-type: atomic - downwardAPI: - description: downwardAPI information about - the downwardAPI data to project - properties: - items: - description: Items is a list of DownwardAPIVolume - file - items: - description: DownwardAPIVolumeFile - represents information to create - the file containing the pod field - properties: - fieldRef: - description: 'Required: Selects - a field of the pod: only annotations, - labels, name and namespace are - supported.' - properties: - apiVersion: - description: Version of the - schema the FieldPath is - written in terms of, defaults - to "v1". - type: string - fieldPath: - description: Path of the field - to select in the specified - API version. - type: string - required: - - fieldPath - type: object - x-kubernetes-map-type: atomic - 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.' - format: int32 - 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 (limits.cpu, - limits.memory, requests.cpu - and requests.memory) are currently - supported.' - properties: - containerName: - description: 'Container name: - required for volumes, optional - for env vars' - type: string - divisor: - anyOf: - - type: integer - - type: string - description: Specifies the - output format of the exposed - resources, defaults to "1" - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - description: 'Required: resource - to select' - type: string - required: - - resource - type: object - x-kubernetes-map-type: atomic - required: - - path - type: object - type: array - type: object - secret: - description: secret information about the - secret data to project - properties: - items: - description: items if unspecified, each - key-value pair in the Data field of - the referenced Secret will be projected - into the volume as a file whose name - is the key and content is the value. - If specified, the listed keys will - be projected into the specified paths, - and unlisted keys will not be present. - If a key is specified which is not - present in the Secret, the volume - setup will error unless it is marked - optional. Paths must be relative and - may not contain the '..' path or start - with '..'. - items: - description: Maps a string key to - a path within a volume. - properties: - key: - description: key is the key to - project. - type: string - mode: - description: 'mode is Optional: - mode bits used to set permissions - on this file. Must be an octal - value between 0000 and 0777 - or a decimal value between 0 - and 511. YAML accepts both octal - and decimal values, JSON requires - decimal values for mode bits. - If not specified, the volume - defaultMode will be used. This - might be in conflict with other - options that affect the file - mode, like fsGroup, and the - result can be other mode bits - set.' - format: int32 - type: integer - path: - description: path is the relative - path of the file to map the - key to. May not be an absolute - path. May not contain the path - element '..'. May not start - with the string '..'. - type: string - required: - - key - - path - type: object - 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?' - type: string - optional: - description: optional field specify - whether the Secret or its key must - be defined - type: boolean - type: object - x-kubernetes-map-type: atomic - serviceAccountToken: - description: serviceAccountToken is information - about the serviceAccountToken data to - project - properties: - audience: - description: audience is the intended - audience of the token. A recipient - of a token must identify itself with - an identifier specified in the audience - of the token, and otherwise should - reject the token. The audience defaults - to the identifier of the apiserver. - type: string - expirationSeconds: - description: expirationSeconds is the - requested duration of validity of - the service account token. As the - token approaches expiration, the kubelet - volume plugin will proactively rotate - the service account token. The kubelet - will start trying to rotate the token - if the token is older than 80 percent - of its time to live or if the token - is older than 24 hours.Defaults to - 1 hour and must be at least 10 minutes. - format: int64 - type: integer - path: - description: path is the path relative - to the mount point of the file to - project the token into. - type: string - required: - - path - type: object - type: object - type: array - type: object - quobyte: - description: quobyte represents a Quobyte mount on - the host that shares a pod's lifetime - properties: - group: - description: group to map volume access to Default - is no group - type: string - readOnly: - description: readOnly here will force the Quobyte - volume to be mounted with read-only permissions. - Defaults to false. - type: boolean - registry: - description: registry represents a single or multiple - Quobyte Registry services specified as a string - as host:port pair (multiple entries are separated - with commas) which acts as the central registry - for volumes - type: string - tenant: - description: tenant owning the given Quobyte volume - in the Backend Used with dynamically provisioned - Quobyte volumes, value is set by the plugin - type: string - user: - description: user to map volume access to Defaults - to serivceaccount user - type: string - volume: - description: volume is a string that references - an already created Quobyte volume by name. - type: string - required: - - registry - - volume - type: object - rbd: - description: 'rbd represents a Rados Block Device - mount on the host that shares a pod''s lifetime. - More info: https://examples.k8s.io/volumes/rbd/README.md' - properties: - fsType: - description: 'fsType is the filesystem type of - the volume that you want to mount. Tip: Ensure - that the filesystem type is supported by the - host operating system. Examples: "ext4", "xfs", - "ntfs". Implicitly inferred to be "ext4" if - unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#rbd - TODO: how do we prevent errors in the filesystem - from compromising the machine' - type: string - image: - description: 'image is the rados image name. More - info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' - type: string - keyring: - description: 'keyring is the path to key ring - for RBDUser. Default is /etc/ceph/keyring. More - info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' - type: string - monitors: - description: 'monitors is 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: 'pool is the rados pool name. Default - is rbd. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' - type: string - readOnly: - description: 'readOnly here will force the ReadOnly - setting in VolumeMounts. Defaults to false. - More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' - type: boolean - secretRef: - description: 'secretRef is name of the authentication - secret for RBDUser. If provided overrides keyring. - Default is nil. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' - properties: - name: - description: 'Name of the referent. More info: - https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, - kind, uid?' - type: string - type: object - x-kubernetes-map-type: atomic - user: - description: 'user is the rados user name. Default - is admin. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' - type: string - required: - - image - - monitors - type: object - scaleIO: - description: scaleIO represents a ScaleIO persistent - volume attached and mounted on Kubernetes nodes. - properties: - fsType: - description: fsType is the filesystem type to - mount. Must be a filesystem type supported by - the host operating system. Ex. "ext4", "xfs", - "ntfs". Default is "xfs". - type: string - gateway: - description: gateway is the host address of the - ScaleIO API Gateway. - type: string - protectionDomain: - description: protectionDomain is the name of the - ScaleIO Protection Domain for the configured - storage. - type: string - readOnly: - description: readOnly Defaults to false (read/write). - ReadOnly here will force the ReadOnly setting - in VolumeMounts. - type: boolean - secretRef: - description: secretRef references to the secret - for ScaleIO user and other sensitive information. - If this is not provided, Login operation will - fail. - properties: - name: - description: 'Name of the referent. More info: - https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, - kind, uid?' - type: string - type: object - x-kubernetes-map-type: atomic - sslEnabled: - description: sslEnabled Flag enable/disable SSL - communication with Gateway, default false - type: boolean - storageMode: - description: storageMode indicates whether the - storage for a volume should be ThickProvisioned - or ThinProvisioned. Default is ThinProvisioned. - type: string - storagePool: - description: storagePool is the ScaleIO Storage - Pool associated with the protection domain. - type: string - system: - description: system is the name of the storage - system as configured in ScaleIO. - type: string - volumeName: - description: volumeName is the name of a volume - already created in the ScaleIO system that is - associated with this volume source. - type: string - required: - - gateway - - secretRef - - system - type: object - secret: - description: 'secret represents a secret that should - populate this volume. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret' - properties: - defaultMode: - description: 'defaultMode is Optional: mode bits - used to set permissions on created files by - default. Must be an octal value between 0000 - and 0777 or a decimal value between 0 and 511. - YAML accepts both octal and decimal values, - JSON requires decimal values for mode bits. - Defaults to 0644. Directories within the path - are not affected by this setting. This might - be in conflict with other options that affect - the file mode, like fsGroup, and the result - can be other mode bits set.' - format: int32 - type: integer - items: - description: items If unspecified, each key-value - pair in the Data field of the referenced Secret - will be projected into the volume as a file - whose name is the key and content is the value. - If specified, the listed keys will be projected - into the specified paths, and unlisted keys - will not be present. If a key is specified which - is not present in the Secret, the volume setup - will error unless it is marked optional. Paths - must be relative and may not contain the '..' - path or start with '..'. - items: - description: Maps a string key to a path within - a volume. - properties: - key: - description: key is the key to project. - type: string - mode: - description: 'mode is Optional: mode bits - used to set permissions on this file. - Must be an octal value between 0000 and - 0777 or a decimal value between 0 and - 511. YAML accepts both octal and decimal - values, JSON requires decimal values for - mode bits. If not specified, the volume - defaultMode will be used. This might be - in conflict with other options that affect - the file mode, like fsGroup, and the result - can be other mode bits set.' - format: int32 - type: integer - path: - description: path is the relative path of - the file to map the key to. May not be - an absolute path. May not contain the - path element '..'. May not start with - the string '..'. - type: string - required: - - key - - path - type: object - type: array - optional: - description: optional field specify whether the - Secret or its keys must be defined - type: boolean - secretName: - description: 'secretName is the name of the secret - in the pod''s namespace to use. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret' - type: string - type: object - storageos: - description: storageOS represents a StorageOS volume - attached and mounted on Kubernetes nodes. - properties: - fsType: - description: fsType is the filesystem type to - mount. Must be a filesystem type supported by - the host operating system. Ex. "ext4", "xfs", - "ntfs". Implicitly inferred to be "ext4" if - unspecified. - type: string - readOnly: - description: readOnly defaults to false (read/write). - ReadOnly here will force the ReadOnly setting - in VolumeMounts. - type: boolean - secretRef: - description: secretRef specifies the secret to - use for obtaining the StorageOS API credentials. If - not specified, default values will be attempted. - properties: - name: - description: 'Name of the referent. More info: - https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, - kind, uid?' - type: string - type: object - x-kubernetes-map-type: atomic - volumeName: - description: volumeName is the human-readable - name of the StorageOS volume. Volume names - are only unique within a namespace. - type: string - volumeNamespace: - description: volumeNamespace specifies the scope - of the volume within StorageOS. If no namespace - is specified then the Pod's namespace will be - used. This allows the Kubernetes name scoping - to be mirrored within StorageOS for tighter - integration. Set VolumeName to any name to override - the default behaviour. Set to "default" if you - are not using namespaces within StorageOS. Namespaces - that do not pre-exist within StorageOS will - be created. - type: string - type: object - vsphereVolume: - description: vsphereVolume represents a vSphere volume - attached and mounted on kubelets host machine - properties: - fsType: - description: fsType is filesystem type to mount. - Must be a filesystem type supported by the host - operating system. Ex. "ext4", "xfs", "ntfs". - Implicitly inferred to be "ext4" if unspecified. - type: string - storagePolicyID: - description: storagePolicyID is the storage Policy - Based Management (SPBM) profile ID associated - with the StoragePolicyName. - type: string - storagePolicyName: - description: storagePolicyName is the storage - Policy Based Management (SPBM) profile name. - type: string - volumePath: - description: volumePath is the path that identifies - vSphere volume vmdk - type: string - required: - - volumePath - type: object - required: - - name - type: object - type: array - type: object - templateType: - type: string - timeChaos: - description: TimeChaosSpec defines the desired state of TimeChaos - properties: - clockIds: - description: ClockIds defines all affected clock id All - available options are ["CLOCK_REALTIME","CLOCK_MONOTONIC","CLOCK_PROCESS_CPUTIME_ID","CLOCK_THREAD_CPUTIME_ID", - "CLOCK_MONOTONIC_RAW","CLOCK_REALTIME_COARSE","CLOCK_MONOTONIC_COARSE","CLOCK_BOOTTIME","CLOCK_REALTIME_ALARM", - "CLOCK_BOOTTIME_ALARM"] Default value is ["CLOCK_REALTIME"] - items: - type: string - type: array - containerNames: - description: ContainerNames indicates list of the name of - affected container. If not set, the first container will - be injected - items: - type: string - type: array - duration: - description: Duration represents the duration of the chaos - action - type: string - mode: - description: 'Mode defines the mode to run chaos action. - Supported mode: one / all / fixed / fixed-percent / random-max-percent' - enum: - - one - - all - - fixed - - fixed-percent - - random-max-percent - type: string - remoteCluster: - description: RemoteCluster represents the remote cluster - where the chaos will be deployed - type: string - selector: - description: Selector is used to select pods that are used - to inject chaos action. - properties: - annotationSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can - be used to select objects. A selector based on annotations. - type: object - expressionSelectors: - description: a slice of label selector expressions that - can be used to select objects. A list of selectors - based on set-based label expressions. - items: - description: A label selector requirement is a selector - that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the label key that the selector - applies to. - type: string - operator: - description: operator represents a key's relationship - to a set of values. Valid operators are In, - NotIn, Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. - If the operator is In or NotIn, the values array - must be non-empty. If the operator is Exists - or DoesNotExist, the values array must be empty. - This array is replaced during a strategic merge - patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - fieldSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can - be used to select objects. A selector based on fields. - type: object - labelSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can - be used to select objects. A selector based on labels. - type: object - namespaces: - description: Namespaces is a set of namespace to which - objects belong. - items: - type: string - type: array - nodeSelectors: - additionalProperties: - type: string - description: Map of string keys and values that can - be used to select nodes. Selector which must match - a node's labels, and objects must belong to these - selected nodes. - type: object - nodes: - description: Nodes is a set of node name and objects - must belong to these nodes. - items: - type: string - type: array - podPhaseSelectors: - description: 'PodPhaseSelectors is a set of condition - of a pod at the current time. supported value: Pending - / Running / Succeeded / Failed / Unknown' - items: - type: string - type: array - pods: - additionalProperties: - items: - type: string - type: array - description: Pods is a map of string keys and a set - values that used to select pods. The key defines the - namespace which pods belong, and the each values is - a set of pod names. - type: object - type: object - timeOffset: - description: TimeOffset defines the delta time of injected - program. It's a possibly signed sequence of decimal numbers, - such as "300ms", "-1.5h" or "2h45m". Valid time units - are "ns", "us" (or "µs"), "ms", "s", "m", "h". - type: string - value: - description: Value is required when the mode is set to `FixedMode` - / `FixedPercentMode` / `RandomMaxPercentMode`. If `FixedMode`, - provide an integer of pods to do chaos action. If `FixedPercentMode`, - provide a number from 0-100 to specify the percent of - pods the server can do chaos action. IF `RandomMaxPercentMode`, provide - a number from 0-100 to specify the max percent of pods - to do chaos action - type: string - required: - - mode - - selector - - timeOffset - type: object - required: - - name - - templateType - type: object - type: array - required: - - entry - - templates - type: object - status: - description: Most recently observed status of the workflow - properties: - conditions: - description: Represents the latest available observations of a workflow's - current state. - items: - properties: - reason: - type: string - startTime: - format: date-time - type: string - status: - type: string - type: - type: string - required: - - reason - - status - - type - type: object - type: array - endTime: - format: date-time - type: string - entryNode: - type: string - startTime: - format: date-time - type: string - type: object - required: - - spec - type: object - served: true - storage: true - subresources: - status: {} - diff --git a/infra/chaosmesh-playground/devbox.json b/infra/chaosmesh-playground/devbox.json deleted file mode 100644 index 2cee28bab..000000000 --- a/infra/chaosmesh-playground/devbox.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/jetify-com/devbox/0.13.5/.schema/devbox.schema.json", - "packages": [ - "kind@0.26.0", - "kubernetes-helm@3.17.0", - "kubectl@1.32.1", - "k9s@0.32.7" - ], - "shell": { - "init_hook": [ - "echo 'Welcome to devbox!' > /dev/null" - ], - "scripts": { - "up": [ - "kind create cluster --name cm-playground --config kind.yaml", - "helm repo add chaos-mesh https://charts.chaos-mesh.org", - "kubectl create ns chaos-mesh", - "helm install chaos-mesh chaos-mesh/chaos-mesh -n=chaos-mesh --set chaosDaemon.runtime=containerd --set chaosDaemon.socketPath=/run/containerd/containerd.sock --version 2.7.0", - "kubectl apply -f dummy-cluster.yaml" - ], - "down": [ - "kind delete cluster --name cm-playground" - ], - "rm-chaos": [ - "kubectl delete networkchaos --all -A", - "kubectl delete podchaos --all -A", - "kubectl delete iochaos --all -A", - "kubectl delete timechaos --all -A", - "kubectl delete stresschaos --all -A", - "kubectl delete dnschaos --all -A", - "kubectl delete kernelchaos --all -A" - ], - "context": [ - "kubectl config set-context" - ] - } - } -} diff --git a/infra/chaosmesh-playground/devbox.lock b/infra/chaosmesh-playground/devbox.lock deleted file mode 100644 index 37aa08d9f..000000000 --- a/infra/chaosmesh-playground/devbox.lock +++ /dev/null @@ -1,236 +0,0 @@ -{ - "lockfile_version": "1", - "packages": { - "github:NixOS/nixpkgs/nixpkgs-unstable": { - "resolved": "github:NixOS/nixpkgs/573c650e8a14b2faa0041645ab18aed7e60f0c9a?lastModified=1741865919&narHash=sha256-4thdbnP6dlbdq%2BqZWTsm4ffAwoS8Tiq1YResB%2BRP6WE%3D" - }, - "k9s@0.32.7": { - "last_modified": "2025-01-19T08:16:51Z", - "resolved": "github:NixOS/nixpkgs/50165c4f7eb48ce82bd063e1fb8047a0f515f8ce#k9s", - "source": "devbox-search", - "version": "0.32.7", - "systems": { - "aarch64-darwin": { - "outputs": [ - { - "name": "out", - "path": "/nix/store/davyazrjq67v3asr3c166xwh2q4q2wmj-k9s-0.32.7", - "default": true - } - ], - "store_path": "/nix/store/davyazrjq67v3asr3c166xwh2q4q2wmj-k9s-0.32.7" - }, - "aarch64-linux": { - "outputs": [ - { - "name": "out", - "path": "/nix/store/jkibg8q4phcw1yj8lx5f5avshzbjjr8f-k9s-0.32.7", - "default": true - } - ], - "store_path": "/nix/store/jkibg8q4phcw1yj8lx5f5avshzbjjr8f-k9s-0.32.7" - }, - "x86_64-darwin": { - "outputs": [ - { - "name": "out", - "path": "/nix/store/3j6m04knddvzgcq3xp0vr1551s6ii93s-k9s-0.32.7", - "default": true - } - ], - "store_path": "/nix/store/3j6m04knddvzgcq3xp0vr1551s6ii93s-k9s-0.32.7" - }, - "x86_64-linux": { - "outputs": [ - { - "name": "out", - "path": "/nix/store/m8d3pcdzrcfvy3rzkjpgfr0v94a1pf4i-k9s-0.32.7", - "default": true - } - ], - "store_path": "/nix/store/m8d3pcdzrcfvy3rzkjpgfr0v94a1pf4i-k9s-0.32.7" - } - } - }, - "kind@0.26.0": { - "last_modified": "2025-01-19T08:16:51Z", - "resolved": "github:NixOS/nixpkgs/50165c4f7eb48ce82bd063e1fb8047a0f515f8ce#kind", - "source": "devbox-search", - "version": "0.26.0", - "systems": { - "aarch64-darwin": { - "outputs": [ - { - "name": "out", - "path": "/nix/store/4j12j5zijvbcyafx85a2qh8jkv4m6lnz-kind-0.26.0", - "default": true - } - ], - "store_path": "/nix/store/4j12j5zijvbcyafx85a2qh8jkv4m6lnz-kind-0.26.0" - }, - "aarch64-linux": { - "outputs": [ - { - "name": "out", - "path": "/nix/store/gkpan5sh4kmbxknrf79p9ssd1j024ydb-kind-0.26.0", - "default": true - } - ], - "store_path": "/nix/store/gkpan5sh4kmbxknrf79p9ssd1j024ydb-kind-0.26.0" - }, - "x86_64-darwin": { - "outputs": [ - { - "name": "out", - "path": "/nix/store/2vsw8jyi2n4sm74sk1kbff6hq5v8nz6i-kind-0.26.0", - "default": true - } - ], - "store_path": "/nix/store/2vsw8jyi2n4sm74sk1kbff6hq5v8nz6i-kind-0.26.0" - }, - "x86_64-linux": { - "outputs": [ - { - "name": "out", - "path": "/nix/store/hp80rb9dpsk2wj5db2zngh5b8hrgwy4k-kind-0.26.0", - "default": true - } - ], - "store_path": "/nix/store/hp80rb9dpsk2wj5db2zngh5b8hrgwy4k-kind-0.26.0" - } - } - }, - "kubectl@1.32.1": { - "last_modified": "2025-01-22T06:06:04Z", - "resolved": "github:NixOS/nixpkgs/5757bbb8bd7c0630a0cc4bb19c47e588db30b97c#kubectl", - "source": "devbox-search", - "version": "1.32.1", - "systems": { - "aarch64-darwin": { - "outputs": [ - { - "name": "out", - "path": "/nix/store/18441nqn0dahiwn1rvwilqvrqwqvvknz-kubectl-1.32.1", - "default": true - }, - { - "name": "man", - "path": "/nix/store/7aqhrqy27487ph8gcqwl92lpn48zczlm-kubectl-1.32.1-man", - "default": true - }, - { - "name": "convert", - "path": "/nix/store/4ahm5rn4f326izlh8nh6zfcf066r0jp9-kubectl-1.32.1-convert" - } - ], - "store_path": "/nix/store/18441nqn0dahiwn1rvwilqvrqwqvvknz-kubectl-1.32.1" - }, - "aarch64-linux": { - "outputs": [ - { - "name": "out", - "path": "/nix/store/jylypnz6nddbqf85glbyhpmjsbgmlayj-kubectl-1.32.1", - "default": true - }, - { - "name": "man", - "path": "/nix/store/0f95qz0ynbilx8h0z350in0d8kc9aj1m-kubectl-1.32.1-man", - "default": true - }, - { - "name": "convert", - "path": "/nix/store/y9kx67c1h6sjr3l4vp7j200v640h32kr-kubectl-1.32.1-convert" - } - ], - "store_path": "/nix/store/jylypnz6nddbqf85glbyhpmjsbgmlayj-kubectl-1.32.1" - }, - "x86_64-darwin": { - "outputs": [ - { - "name": "out", - "path": "/nix/store/c4ha370mr37kzmr5d3k3x2f7ln51r9fz-kubectl-1.32.1", - "default": true - }, - { - "name": "man", - "path": "/nix/store/5p29mlkb5ywfn2znwb3pxbyr187585yy-kubectl-1.32.1-man", - "default": true - }, - { - "name": "convert", - "path": "/nix/store/83qij5g1wkrrwzjn1cwnkd342ifzw97x-kubectl-1.32.1-convert" - } - ], - "store_path": "/nix/store/c4ha370mr37kzmr5d3k3x2f7ln51r9fz-kubectl-1.32.1" - }, - "x86_64-linux": { - "outputs": [ - { - "name": "out", - "path": "/nix/store/v312kkwzk8mibc9z67n53hab6mcc7cn5-kubectl-1.32.1", - "default": true - }, - { - "name": "man", - "path": "/nix/store/jb9zc5f93z67xaldz5zmmnv8d5pzc94r-kubectl-1.32.1-man", - "default": true - }, - { - "name": "convert", - "path": "/nix/store/1lkaw0m4238bichjjl5jkkpqpvxahp43-kubectl-1.32.1-convert" - } - ], - "store_path": "/nix/store/v312kkwzk8mibc9z67n53hab6mcc7cn5-kubectl-1.32.1" - } - } - }, - "kubernetes-helm@3.17.0": { - "last_modified": "2025-01-22T06:06:04Z", - "resolved": "github:NixOS/nixpkgs/5757bbb8bd7c0630a0cc4bb19c47e588db30b97c#kubernetes-helm", - "source": "devbox-search", - "version": "3.17.0", - "systems": { - "aarch64-darwin": { - "outputs": [ - { - "name": "out", - "path": "/nix/store/kqb20496bhsi6wlggidm645ncch8lzxw-kubernetes-helm-3.17.0", - "default": true - } - ], - "store_path": "/nix/store/kqb20496bhsi6wlggidm645ncch8lzxw-kubernetes-helm-3.17.0" - }, - "aarch64-linux": { - "outputs": [ - { - "name": "out", - "path": "/nix/store/d60427zv4gsskq2rsq6yfbzzwgr4xdz7-kubernetes-helm-3.17.0", - "default": true - } - ], - "store_path": "/nix/store/d60427zv4gsskq2rsq6yfbzzwgr4xdz7-kubernetes-helm-3.17.0" - }, - "x86_64-darwin": { - "outputs": [ - { - "name": "out", - "path": "/nix/store/zak1xp04pcfm0b9gaap9jxp4bq0lawxq-kubernetes-helm-3.17.0", - "default": true - } - ], - "store_path": "/nix/store/zak1xp04pcfm0b9gaap9jxp4bq0lawxq-kubernetes-helm-3.17.0" - }, - "x86_64-linux": { - "outputs": [ - { - "name": "out", - "path": "/nix/store/zidsngzm5lwyabaq9fy6m9h6sifk6pg8-kubernetes-helm-3.17.0", - "default": true - } - ], - "store_path": "/nix/store/zidsngzm5lwyabaq9fy6m9h6sifk6pg8-kubernetes-helm-3.17.0" - } - } - } - } -} diff --git a/infra/chaosmesh-playground/dummy-cluster.yaml b/infra/chaosmesh-playground/dummy-cluster.yaml deleted file mode 100644 index eb5cae3a1..000000000 --- a/infra/chaosmesh-playground/dummy-cluster.yaml +++ /dev/null @@ -1,619 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: geth-1337 - labels: - app.kubernetes.io/instance: geth-1337 -spec: - selector: - matchLabels: - app: http-ping-app - app.kubernetes.io/instance: geth-1337 - template: - metadata: - labels: - app: http-ping-app - app.kubernetes.io/instance: geth-1337 - spec: - containers: - - name: http-ping-container - image: python:3.9 - command: - - sh - - -c - - | - apt-get update && apt-get install -y dnsutils iputils-ping - python -m http.server 8080 & - while true; do - POD_IPS=$(nslookup http-ping-service | awk '/Address/ {print $2}' | tail -n +2) - for IP in $POD_IPS; do - if [ "$IP" != "$(hostname -i)" ]; then - LATENCY=$(ping -c 1 $IP | grep 'time=' | awk -F'time=' '{print $2}' | awk '{print $1}') - echo "$IP ->> $LATENCY ms" - fi - done - sleep 1 - done - ports: - - containerPort: 8080 ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - name: geth-2337 - labels: - app.kubernetes.io/instance: geth-2337 -spec: - selector: - matchLabels: - app: http-ping-app - app.kubernetes.io/instance: geth-2337 - template: - metadata: - labels: - app: http-ping-app - app.kubernetes.io/instance: geth-2337 - spec: - containers: - - name: http-ping-container - image: python:3.9 - command: - - sh - - -c - - | - apt-get update && apt-get install -y dnsutils iputils-ping - python -m http.server 8080 & - while true; do - POD_IPS=$(nslookup http-ping-service | awk '/Address/ {print $2}' | tail -n +2) - for IP in $POD_IPS; do - if [ "$IP" != "$(hostname -i)" ]; then - LATENCY=$(ping -c 1 $IP | grep 'time=' | awk -F'time=' '{print $2}' | awk '{print $1}') - echo "$IP ->> $LATENCY ms" - fi - done - sleep 1 - done - ports: - - containerPort: 8080 ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - name: node-0 - labels: - app.kubernetes.io/instance: ccip-0 -spec: - selector: - matchLabels: - app: http-ping-app - app.kubernetes.io/instance: ccip-0 - template: - metadata: - labels: - app: http-ping-app - app.kubernetes.io/instance: ccip-0 - spec: - containers: - - name: http-ping-container - image: python:3.9 - command: - - sh - - -c - - | - apt-get update && apt-get install -y dnsutils iputils-ping - python -m http.server 8080 & - while true; do - POD_IPS=$(nslookup http-ping-service | awk '/Address/ {print $2}' | tail -n +2) - for IP in $POD_IPS; do - if [ "$IP" != "$(hostname -i)" ]; then - LATENCY=$(ping -c 1 $IP | grep 'time=' | awk -F'time=' '{print $2}' | awk '{print $1}') - echo "$IP ->> $LATENCY ms" - fi - done - sleep 1 - done - ports: - - containerPort: 8080 ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - name: node-1 - labels: - app.kubernetes.io/instance: ccip-1 -spec: - selector: - matchLabels: - app: http-ping-app - app.kubernetes.io/instance: ccip-1 - template: - metadata: - labels: - app: http-ping-app - app.kubernetes.io/instance: ccip-1 - spec: - containers: - - name: http-ping-container - image: python:3.9 - command: - - sh - - -c - - | - apt-get update && apt-get install -y dnsutils iputils-ping - python -m http.server 8080 & - while true; do - POD_IPS=$(nslookup http-ping-service | awk '/Address/ {print $2}' | tail -n +2) - for IP in $POD_IPS; do - if [ "$IP" != "$(hostname -i)" ]; then - LATENCY=$(ping -c 1 $IP | grep 'time=' | awk -F'time=' '{print $2}' | awk '{print $1}') - echo "$IP ->> $LATENCY ms" - fi - done - sleep 1 - done - ports: - - containerPort: 8080 ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - name: node-2 - labels: - app.kubernetes.io/instance: ccip-2 -spec: - selector: - matchLabels: - app: http-ping-app - app.kubernetes.io/instance: ccip-2 - template: - metadata: - labels: - app: http-ping-app - app.kubernetes.io/instance: ccip-2 - spec: - containers: - - name: http-ping-container - image: python:3.9 - command: - - sh - - -c - - | - apt-get update && apt-get install -y dnsutils iputils-ping - python -m http.server 8080 & - while true; do - POD_IPS=$(nslookup http-ping-service | awk '/Address/ {print $2}' | tail -n +2) - for IP in $POD_IPS; do - if [ "$IP" != "$(hostname -i)" ]; then - LATENCY=$(ping -c 1 $IP | grep 'time=' | awk -F'time=' '{print $2}' | awk '{print $1}') - echo "$IP ->> $LATENCY ms" - fi - done - sleep 1 - done - ports: - - containerPort: 8080 ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - name: node-3 - labels: - app.kubernetes.io/instance: ccip-3 -spec: - selector: - matchLabels: - app: http-ping-app - app.kubernetes.io/instance: ccip-3 - template: - metadata: - labels: - app: http-ping-app - app.kubernetes.io/instance: ccip-3 - spec: - containers: - - name: http-ping-container - image: python:3.9 - command: - - sh - - -c - - | - apt-get update && apt-get install -y dnsutils iputils-ping - python -m http.server 8080 & - while true; do - POD_IPS=$(nslookup http-ping-service | awk '/Address/ {print $2}' | tail -n +2) - for IP in $POD_IPS; do - if [ "$IP" != "$(hostname -i)" ]; then - LATENCY=$(ping -c 1 $IP | grep 'time=' | awk -F'time=' '{print $2}' | awk '{print $1}') - echo "$IP ->> $LATENCY ms" - fi - done - sleep 1 - done - ports: - - containerPort: 8080 ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - name: db-0 - labels: - app.kubernetes.io/instance: chainlink-don-db-0 -spec: - selector: - matchLabels: - app: http-ping-app - app.kubernetes.io/instance: chainlink-don-db-0 - template: - metadata: - labels: - app: http-ping-app - app.kubernetes.io/instance: chainlink-don-db-0 - spec: - containers: - - name: http-ping-container - image: python:3.9 - command: - - sh - - -c - - | - apt-get update && apt-get install -y dnsutils iputils-ping - python -m http.server 8080 & - while true; do - POD_IPS=$(nslookup http-ping-service | awk '/Address/ {print $2}' | tail -n +2) - for IP in $POD_IPS; do - if [ "$IP" != "$(hostname -i)" ]; then - LATENCY=$(ping -c 1 $IP | grep 'time=' | awk -F'time=' '{print $2}' | awk '{print $1}') - echo "$IP ->> $LATENCY ms" - fi - done - sleep 1 - done - ports: - - containerPort: 8080 ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - name: db-1 - labels: - app.kubernetes.io/instance: chainlink-don-db-1 -spec: - selector: - matchLabels: - app: http-ping-app - app.kubernetes.io/instance: chainlink-don-db-1 - template: - metadata: - labels: - app: http-ping-app - app.kubernetes.io/instance: chainlink-don-db-1 - spec: - containers: - - name: http-ping-container - image: python:3.9 - command: - - sh - - -c - - | - apt-get update && apt-get install -y dnsutils iputils-ping - python -m http.server 8080 & - while true; do - POD_IPS=$(nslookup http-ping-service | awk '/Address/ {print $2}' | tail -n +2) - for IP in $POD_IPS; do - if [ "$IP" != "$(hostname -i)" ]; then - LATENCY=$(ping -c 1 $IP | grep 'time=' | awk -F'time=' '{print $2}' | awk '{print $1}') - echo "$IP ->> $LATENCY ms" - fi - done - sleep 1 - done - ports: - - containerPort: 8080 ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - name: db-2 - labels: - app.kubernetes.io/instance: chainlink-don-db-2 -spec: - selector: - matchLabels: - app: http-ping-app - app.kubernetes.io/instance: chainlink-don-db-2 - template: - metadata: - labels: - app: http-ping-app - app.kubernetes.io/instance: chainlink-don-db-2 - spec: - containers: - - name: http-ping-container - image: python:3.9 - command: - - sh - - -c - - | - apt-get update && apt-get install -y dnsutils iputils-ping - python -m http.server 8080 & - while true; do - POD_IPS=$(nslookup http-ping-service | awk '/Address/ {print $2}' | tail -n +2) - for IP in $POD_IPS; do - if [ "$IP" != "$(hostname -i)" ]; then - LATENCY=$(ping -c 1 $IP | grep 'time=' | awk -F'time=' '{print $2}' | awk '{print $1}') - echo "$IP ->> $LATENCY ms" - fi - done - sleep 1 - done - ports: - - containerPort: 8080 ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - name: db-3 - labels: - app.kubernetes.io/instance: chainlink-don-db-3 -spec: - selector: - matchLabels: - app: http-ping-app - app.kubernetes.io/instance: chainlink-don-db-3 - template: - metadata: - labels: - app: http-ping-app - app.kubernetes.io/instance: chainlink-don-db-3 - spec: - containers: - - name: http-ping-container - image: python:3.9 - command: - - sh - - -c - - | - apt-get update && apt-get install -y dnsutils iputils-ping - python -m http.server 8080 & - while true; do - POD_IPS=$(nslookup http-ping-service | awk '/Address/ {print $2}' | tail -n +2) - for IP in $POD_IPS; do - if [ "$IP" != "$(hostname -i)" ]; then - LATENCY=$(ping -c 1 $IP | grep 'time=' | awk -F'time=' '{print $2}' | awk '{print $1}') - echo "$IP ->> $LATENCY ms" - fi - done - sleep 1 - done - ports: - - containerPort: 8080 ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - name: db-4 - labels: - app.kubernetes.io/instance: chainlink-don-db-4 -spec: - selector: - matchLabels: - app: http-ping-app - app.kubernetes.io/instance: chainlink-don-db-4 - template: - metadata: - labels: - app: http-ping-app - app.kubernetes.io/instance: chainlink-don-db-4 - spec: - containers: - - name: http-ping-container - image: python:3.9 - command: - - sh - - -c - - | - apt-get update && apt-get install -y dnsutils iputils-ping - python -m http.server 8080 & - while true; do - POD_IPS=$(nslookup http-ping-service | awk '/Address/ {print $2}' | tail -n +2) - for IP in $POD_IPS; do - if [ "$IP" != "$(hostname -i)" ]; then - LATENCY=$(ping -c 1 $IP | grep 'time=' | awk -F'time=' '{print $2}' | awk '{print $1}') - echo "$IP ->> $LATENCY ms" - fi - done - sleep 1 - done - ports: - - containerPort: 8080 ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - name: rmn-0 - labels: - app.kubernetes.io/instance: rmn-0 -spec: - selector: - matchLabels: - app: http-ping-app - app.kubernetes.io/instance: rmn-0 - template: - metadata: - labels: - app: http-ping-app - app.kubernetes.io/instance: rmn-0 - spec: - containers: - - name: http-ping-container - image: python:3.9 - command: - - sh - - -c - - | - apt-get update && apt-get install -y dnsutils iputils-ping - python -m http.server 8080 & - while true; do - POD_IPS=$(nslookup http-ping-service | awk '/Address/ {print $2}' | tail -n +2) - for IP in $POD_IPS; do - if [ "$IP" != "$(hostname -i)" ]; then - LATENCY=$(ping -c 1 $IP | grep 'time=' | awk -F'time=' '{print $2}' | awk '{print $1}') - echo "$IP ->> $LATENCY ms" - fi - done - sleep 1 - done - ports: - - containerPort: 8080 ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - name: rmn-1 - labels: - instance: rmn-1 -spec: - selector: - matchLabels: - app: http-ping-app - app.kubernetes.io/instance: rmn-1 - template: - metadata: - labels: - app: http-ping-app - app.kubernetes.io/instance: rmn-1 - spec: - containers: - - name: http-ping-container - image: python:3.9 - command: - - sh - - -c - - | - apt-get update && apt-get install -y dnsutils iputils-ping - python -m http.server 8080 & - while true; do - POD_IPS=$(nslookup http-ping-service | awk '/Address/ {print $2}' | tail -n +2) - for IP in $POD_IPS; do - if [ "$IP" != "$(hostname -i)" ]; then - LATENCY=$(ping -c 1 $IP | grep 'time=' | awk -F'time=' '{print $2}' | awk '{print $1}') - echo "$IP ->> $LATENCY ms" - fi - done - sleep 1 - done - ports: - - containerPort: 8080 ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - name: rmn-2 - labels: - app.kubernetes.io/instance: rmn-2 -spec: - selector: - matchLabels: - app: http-ping-app - app.kubernetes.io/instance: rmn-2 - template: - metadata: - labels: - app: http-ping-app - app.kubernetes.io/instance: rmn-2 - spec: - containers: - - name: http-ping-container - image: python:3.9 - command: - - sh - - -c - - | - apt-get update && apt-get install -y dnsutils iputils-ping - python -m http.server 8080 & - while true; do - POD_IPS=$(nslookup http-ping-service | awk '/Address/ {print $2}' | tail -n +2) - for IP in $POD_IPS; do - if [ "$IP" != "$(hostname -i)" ]; then - LATENCY=$(ping -c 1 $IP | grep 'time=' | awk -F'time=' '{print $2}' | awk '{print $1}') - echo "$IP ->> $LATENCY ms" - fi - done - sleep 1 - done - ports: - - containerPort: 8080 ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - name: rmn-3 - labels: - app.kubernetes.io/instance: rmn-3 -spec: - selector: - matchLabels: - app: http-ping-app - app.kubernetes.io/instance: rmn-3 - template: - metadata: - labels: - app: http-ping-app - app.kubernetes.io/instance: rmn-3 - spec: - containers: - - name: http-ping-container - image: python:3.9 - command: - - sh - - -c - - | - apt-get update && apt-get install -y dnsutils iputils-ping - python -m http.server 8080 & - while true; do - POD_IPS=$(nslookup http-ping-service | awk '/Address/ {print $2}' | tail -n +2) - for IP in $POD_IPS; do - if [ "$IP" != "$(hostname -i)" ]; then - LATENCY=$(ping -c 1 $IP | grep 'time=' | awk -F'time=' '{print $2}' | awk '{print $1}') - echo "$IP ->> $LATENCY ms" - fi - done - sleep 1 - done - ports: - - containerPort: 8080 ---- -apiVersion: v1 -kind: Service -metadata: - name: http-ping-service -spec: - selector: - app: http-ping-app - ports: - - protocol: TCP - port: 8080 - targetPort: 8080 - clusterIP: None ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - name: production-app-that-must-be-safe - labels: - app.kubernetes.io/instance: production-app -spec: - selector: - matchLabels: - app: production-app - app.kubernetes.io/instance: production-app - template: - metadata: - labels: - app: production-app - app.kubernetes.io/instance: production-app - spec: - containers: - - name: ping-container - image: ubuntu:latest - command: ["sh", "-c", "apt-get update && apt-get install -y iputils-ping && while true; do ping -c 1 google.com; sleep 1; done"] diff --git a/infra/chaosmesh-playground/kind.yaml b/infra/chaosmesh-playground/kind.yaml deleted file mode 100644 index 8c16cfb07..000000000 --- a/infra/chaosmesh-playground/kind.yaml +++ /dev/null @@ -1,9 +0,0 @@ -kind: Cluster -apiVersion: kind.x-k8s.io/v1alpha4 -nodes: - - role: control-plane - image: kindest/node:v1.32.1 - - role: worker - image: kindest/node:v1.32.1 - - role: worker - image: kindest/node:v1.32.1 \ No newline at end of file diff --git a/infra/chaosmesh-playground/manifests/latency.yaml b/infra/chaosmesh-playground/manifests/latency.yaml deleted file mode 100644 index a5cab5826..000000000 --- a/infra/chaosmesh-playground/manifests/latency.yaml +++ /dev/null @@ -1,16 +0,0 @@ -apiVersion: chaos-mesh.org/v1alpha1 -kind: NetworkChaos -metadata: - name: delay-1 -spec: - action: delay - mode: one - selector: - namespaces: - - default - labelSelectors: - app.kubernetes.io/instance: ccip-2 - delay: - latency: '100ms' - correlation: '10' - jitter: '300ms' \ No newline at end of file diff --git a/infra/chaosmesh-playground/manifests/partition.yaml b/infra/chaosmesh-playground/manifests/partition.yaml deleted file mode 100644 index 859c67fe9..000000000 --- a/infra/chaosmesh-playground/manifests/partition.yaml +++ /dev/null @@ -1,21 +0,0 @@ -apiVersion: chaos-mesh.org/v1alpha1 -kind: NetworkChaos -metadata: - name: p-1 -spec: - action: partition - mode: all - duration: "30s" - direction: "to" - selector: - namespaces: - - default - labelSelectors: - app.kubernetes.io/instance: ccip-1 - target: - mode: all - selector: - namespaces: - - default - labelSelectors: - app.kubernetes.io/instance: ccip-2 diff --git a/infra/chaosmesh-playground/manifests/stress.yaml b/infra/chaosmesh-playground/manifests/stress.yaml deleted file mode 100644 index 2cb4b41bb..000000000 --- a/infra/chaosmesh-playground/manifests/stress.yaml +++ /dev/null @@ -1,17 +0,0 @@ -apiVersion: chaos-mesh.org/v1alpha1 -kind: StressChaos -metadata: - name: m-1 - namespace: default -spec: - mode: one - duration: "1m" - selector: - labelSelectors: - app.kubernetes.io/instance: ccip-1 - stressors: - cpu: - workers: 1 - memory: - workers: 1 - size: '1024MB' \ No newline at end of file diff --git a/justfile b/justfile index a1d2bd5ce..9473ddae4 100644 --- a/justfile +++ b/justfile @@ -23,7 +23,6 @@ lint-all: @just lint wasp @just lint seth @just lint havoc - @just lint k8s-test-runner @just lint lib @just lint tools/workflowresultparser @just lint tools/asciitable @@ -34,7 +33,6 @@ lint-all: # Run all the tests test-all: - @just test k8s-test-runner ./... & @just test parrot ./... & @just test tools/workflowresultparser ./... & @just test tools/asciitable ./... & @@ -49,7 +47,6 @@ test-all: @just test wasp TestBenchSpy goimports-all: - @just _default_goimports k8s-test-runner @just _default_goimports lib @just _default_goimports parrot @just _default_goimports tools/workflowresultparser diff --git a/k8s-test-runner/.changeset/.gitkeep b/k8s-test-runner/.changeset/.gitkeep deleted file mode 100644 index e69de29bb..000000000 diff --git a/k8s-test-runner/.changeset/v0.6.0.md b/k8s-test-runner/.changeset/v0.6.0.md deleted file mode 100644 index 550bcb14f..000000000 --- a/k8s-test-runner/.changeset/v0.6.0.md +++ /dev/null @@ -1 +0,0 @@ -- Bumps a lot of go dependencies to latest versions diff --git a/k8s-test-runner/.changeset/v0.7.0.md b/k8s-test-runner/.changeset/v0.7.0.md deleted file mode 100644 index 0cc5d1ef7..000000000 --- a/k8s-test-runner/.changeset/v0.7.0.md +++ /dev/null @@ -1 +0,0 @@ -- Use Go `1.24` \ No newline at end of file diff --git a/k8s-test-runner/.gitignore b/k8s-test-runner/.gitignore deleted file mode 100644 index 0cd4fb3b9..000000000 --- a/k8s-test-runner/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -testbin -*.tar.gz -*-darwin-* -*-linux-* diff --git a/k8s-test-runner/Dockerfile.testbin b/k8s-test-runner/Dockerfile.testbin deleted file mode 100644 index 150f260de..000000000 --- a/k8s-test-runner/Dockerfile.testbin +++ /dev/null @@ -1,28 +0,0 @@ -# Use a base image -FROM alpine:latest - -# Set the working directory in the container -WORKDIR /app - -# Declare the build argument -ARG TEST_BINARY - -# Fail if TEST_BINARY is not set or is an empty string -RUN if [ -z "$TEST_BINARY" ]; then echo "TEST_BINARY argument is required" >&2; exit 1; fi - -# Copy the binary into the container -COPY $TEST_BINARY /app/testbin - -# Make the binary executable -RUN chmod +x /app/testbin - -# Adjust permissions to ensure the non-root user can access the necessary files -RUN chown -R nobody:nobody /app && chmod -R 755 /app - -# Set the user to 'nobody' -USER nobody - -# Use the entrypoint script as the entry point -ENTRYPOINT ["/app/testbin"] - -CMD [] diff --git a/k8s-test-runner/README.md b/k8s-test-runner/README.md deleted file mode 100644 index f12380ca1..000000000 --- a/k8s-test-runner/README.md +++ /dev/null @@ -1,5 +0,0 @@ -# K8s Test Runner - -A tool to build and run arbitrary Go code in `k8s` the easy way. - -[![Documentation](https://img.shields.io/badge/Documentation-MDBook-blue?style=for-the-badge)](https://smartcontractkit.github.io/chainlink-testing-framework/k8s-test-runner/k8s-test-runner.html) \ No newline at end of file diff --git a/k8s-test-runner/chart/.helmignore b/k8s-test-runner/chart/.helmignore deleted file mode 100644 index 0e8a0eb36..000000000 --- a/k8s-test-runner/chart/.helmignore +++ /dev/null @@ -1,23 +0,0 @@ -# Patterns to ignore when building packages. -# This supports shell glob matching, relative path matching, and -# negation (prefixed with !). Only one pattern per line. -.DS_Store -# Common VCS dirs -.git/ -.gitignore -.bzr/ -.bzrignore -.hg/ -.hgignore -.svn/ -# Common backup files -*.swp -*.bak -*.tmp -*.orig -*~ -# Various IDEs -.project -.idea/ -*.tmproj -.vscode/ diff --git a/k8s-test-runner/chart/Chart.yaml b/k8s-test-runner/chart/Chart.yaml deleted file mode 100644 index eb2a8fe31..000000000 --- a/k8s-test-runner/chart/Chart.yaml +++ /dev/null @@ -1,6 +0,0 @@ -apiVersion: v2 -name: k8s-test-runner -description: K8s test runner -type: application -version: 0.0.1 -appVersion: '0.0.1' diff --git a/k8s-test-runner/chart/manual/role.yaml b/k8s-test-runner/chart/manual/role.yaml deleted file mode 100644 index 14f79e7c2..000000000 --- a/k8s-test-runner/chart/manual/role.yaml +++ /dev/null @@ -1,78 +0,0 @@ -# apiVersion: v1 -# kind: ServiceAccount -# metadata: -# name: {{ .Values.rbac.serviceAccountName }} -# namespace: {{ .Values.namespace }} -# annotations: -# meta.helm.sh/release-name: {{ .Release.Name }} -# labels: -# app.kubernetes.io/managed-by: Helm ---- -# kind: Role -# apiVersion: rbac.authorization.k8s.io/v1 -# metadata: -# name: {{ .Values.rbac.roleName }} -# namespace: {{ .Values.namespace }} -# annotations: -# # meta.helm.sh/release-name: {{ .Release.Name }} -# meta.helm.sh/release-namespace: {{ .Values.namespace }} -# labels: -# app.kubernetes.io/managed-by: Helm -# rules: -# - apiGroups: -# - "" -# - "apps" -# - "batch" -# - "chaos-mesh.org" -# resources: -# - "*" -# verbs: -# - "*" -# --- -# kind: RoleBinding -# apiVersion: rbac.authorization.k8s.io/v1 -# metadata: -# name: {{ .Values.rbac.roleName }} -# namespace: {{ .Values.namespace }} -# annotations: -# # meta.helm.sh/release-name: {{ .Release.Name }} -# meta.helm.sh/release-namespace: {{ .Values.namespace }} -# labels: -# app.kubernetes.io/managed-by: Helm -# subjects: -# - kind: ServiceAccount -# name: default -# namespace: {{ .Values.namespace }} -# roleRef: -# kind: Role -# name: {{ .Values.rbac.roleName }} -# apiGroup: rbac.authorization.k8s.io - - -# apiVersion: rbac.authorization.k8s.io/v1 -# kind: ClusterRole -# metadata: -# name: lf-chaos-role -# rules: -# - apiGroups: -# - "" -# - "apps" -# - "batch" -# - "chaos-mesh.org" -# resources: -# - "*" -# verbs: -# - "*" - -# apiVersion: rbac.authorization.k8s.io/v1 -# kind: ClusterRoleBinding -# metadata: -# name: chaos-mesh-lukaszfryc-binding -# subjects: -# - kind: ServiceAccount -# name: custom -# namespace: e2e-tests-lukaszfryc -# roleRef: -# kind: ClusterRole -# name: lf-chaos-role -# apiGroup: rbac.authorization.k8s.io diff --git a/k8s-test-runner/chart/templates/job.yaml b/k8s-test-runner/chart/templates/job.yaml deleted file mode 100644 index 780cf1e2c..000000000 --- a/k8s-test-runner/chart/templates/job.yaml +++ /dev/null @@ -1,56 +0,0 @@ -{{- range $i, $e := until (int .Values.jobs) }} -apiVersion: batch/v1 -kind: Job -metadata: - name: k8s-test-runner-{{ $.Release.Name }}-{{ $i }} - namespace: {{ $.Release.Namespace }} - labels: - sync: "{{ $.Values.sync }}" - {{- range $key, $val := $.Values.metadata.labels }} - {{- $e.key }}: "{{ $e.value }}" - {{- end }} -spec: - backoffLimit: 0 - ttlSecondsAfterFinished: {{ $.Values.ttlSecondsAfterFinished }} - template: - metadata: - name: k8s-test-runner-{{ $.Release.Name }}-{{ $i }} - {{- with $.Values.labels }} - labels: - {{- toYaml . | nindent 8 }} - {{- end }} - sync: {{ $.Values.sync }} - annotations: - {{- with $.Values.annotations }} - {{- toYaml . | nindent 8 }} - {{- end }} - karpenter.sh/do-not-evict: "true" - karpenter.sh/do-not-disrupt: "true" - cluster-autoscaler.kubernetes.io/safe-to-evict: "false" - spec: - serviceAccountName: {{ $.Values.rbac.serviceAccountName }} - restartPolicy: Never - containers: - - name: k8s-test-runner - image: {{ $.Values.image }} - securityContext: - runAsNonRoot: true - runAsUser: 65534 # UID for 'nobody' in Alpine - args: - - -test.v - - -test.run - - "{{ $.Values.test.name }}" - - -test.timeout - - {{ $.Values.test.timeout }} - imagePullPolicy: {{ $.Values.imagePullPolicy }} - {{- with $.Values.resources }} - resources: - {{- toYaml . | nindent 12 }} - {{- end }} - env: - {{- range $key, $val := $.Values.env }} - - name: {{ $key }} - value: {{ quote $val }} - {{- end }} ---- -{{- end }} diff --git a/k8s-test-runner/chart/values.yaml b/k8s-test-runner/chart/values.yaml deleted file mode 100644 index 15f47cac9..000000000 --- a/k8s-test-runner/chart/values.yaml +++ /dev/null @@ -1,35 +0,0 @@ -namespace: '' -# amount of jobs to spin up -jobs: 1 -# a label jobs will use to sync before starting, a random 5-digit number by default -sync: -# Go test name and timeout -test: - name: '' - timeout: '24h' - -image: '' -imagePullPolicy: Always -labels: - app: k8s-test-runner -annotations: {} -env: - # TEST_LOG_LEVEL: '' -metadata: - labels: - # label: value -resources: - requests: - cpu: 1000m - memory: 512Mi - limits: - cpu: 1000m - memory: 512Mi -nodeSelector: {} -tolerations: [] -affinity: {} - -# Role and RoleBinding for RBAC -rbac: - roleName: '' - serviceAccountName: default diff --git a/k8s-test-runner/cmd/internal/create.go b/k8s-test-runner/cmd/internal/create.go deleted file mode 100644 index e7fa2d562..000000000 --- a/k8s-test-runner/cmd/internal/create.go +++ /dev/null @@ -1,180 +0,0 @@ -package internal - -import ( - "bytes" - "context" - "fmt" - "log" - "os" - "os/exec" - "path/filepath" - "time" - - "github.com/spf13/cobra" -) - -var Create = &cobra.Command{ - Use: "create-test-image [path-to-test-folder]", - RunE: createRunnerImageRunE, - Short: "Create test image for K8s test runner", -} - -func init() { - Create.Flags().String("image-registry-url", "", "Image registry url (e.g. ECR url)") - if err := Create.MarkFlagRequired("image-registry-url"); err != nil { - log.Fatalf("Failed to mark 'image-registry-url' flag as required: %v", err) - } - Create.Flags().String("image-name", "", "Image name (e.g. k8s-test-runner-binary)") - if err := Create.MarkFlagRequired("image-name"); err != nil { - log.Fatalf("Failed to mark 'image-name' flag as required: %v", err) - } - Create.Flags().String("image-tag", "", "Image tag (e.g. mercury-load-tests)") - if err := Create.MarkFlagRequired("image-tag"); err != nil { - log.Fatalf("Failed to mark 'image-tag' flag as required: %v", err) - } - Create.Flags().String("test-runner-root-dir", "./", "Test runner root directory with default chart and Dockerfile.testbin") - Create.Flags().String("timeout", "10m", "Timeout for the test binary build and image push") -} - -func createRunnerImageRunE(cmd *cobra.Command, args []string) error { - testPackage, err := filepath.Abs(args[0]) - if err != nil { - return fmt.Errorf("error getting absolute path: %v", err) - } - if _, err := os.Stat(testPackage); os.IsNotExist(err) { - return fmt.Errorf("folder with the tests does not exist: %s", testPackage) - } - - timeoutStr := cmd.Flag("timeout").Value.String() - timeout, err := time.ParseDuration(timeoutStr) - if err != nil { - return fmt.Errorf("error parsing timeout: %v", err) - } - ctx, cancel := context.WithTimeout(context.Background(), timeout) - defer cancel() - - rootDir, err := cmd.Flags().GetString("test-runner-root-dir") - if err != nil { - return fmt.Errorf("error getting test runner root directory: %v", err) - } - - // Get the root directory of the k8s runner - rootDirAbs, err := filepath.Abs(rootDir) - if err != nil { - return fmt.Errorf("error getting absolute path: %v", err) - } - - fmt.Printf("Test runner root directory: %s\n", rootDirAbs) - - // Build the test binary - testBinPath := filepath.Join(rootDirAbs, "testbin") - err = buildTestBinary(ctx, testPackage, testBinPath) - if err != nil { - return err - } - - fmt.Print("Creating docker image for the test binary..\n") - - imageName, err := cmd.Flags().GetString("image-name") - if err != nil { - return fmt.Errorf("error getting image name: %v", err) - } - imageTag, err := cmd.Flags().GetString("image-tag") - if err != nil { - return fmt.Errorf("error getting image tag: %v", err) - } - - // #nosec G204 - buildTestBinDockerImageCmd := exec.CommandContext(ctx, "docker", "build", "--platform", "linux/amd64", "-f", "Dockerfile.testbin", "--build-arg", "TEST_BINARY=testbin", "-t", fmt.Sprintf("%s:%s", imageName, imageTag), ".") - buildTestBinDockerImageCmd.Dir = rootDirAbs - - fmt.Printf("Running command from %s: %s\n", rootDirAbs, buildTestBinDockerImageCmd.String()) - - buildTestBinDockerImageOutput, err := buildTestBinDockerImageCmd.CombinedOutput() - if err != nil { - return fmt.Errorf("error building test binary image: %v, output: %s", err, buildTestBinDockerImageOutput) - } - - fmt.Printf("Done. Created docker image %s:%s\n", imageName, imageTag) - - registryURL, err := cmd.Flags().GetString("image-registry-url") - if err != nil { - return fmt.Errorf("error getting ECR registry name: %v", err) - } - - err = pushDockerImageToECR(ctx, "us-west-2", registryURL, imageName, imageTag) - if err != nil { - return fmt.Errorf("error pushing docker image to ECR: %v", err) - } - - return nil -} - -func buildTestBinary(ctx context.Context, testPackage, testBinPath string) error { - fmt.Printf("Creating test binary for %s\n", testPackage) - - // Create the command to build the test binary - buildTestBinCmd := exec.CommandContext(ctx, "go", "test", "-c", "-o", testBinPath) - buildTestBinCmd.Dir = testPackage - - // Set environment variables for the build process - env := os.Environ() - env = append(env, "GOOS=linux", "CGO_ENABLED=0", "GOARCH=amd64") - buildTestBinCmd.Env = env - - // Print the command being executed - fmt.Printf("Running command from %s: %s\n", testPackage, buildTestBinCmd.String()) - - // Execute the build command and capture any output or errors - output, err := buildTestBinCmd.CombinedOutput() - if err != nil { - return fmt.Errorf("error building test binary: %v, output: %s", err, string(output)) - } - - fmt.Printf("Done. Created binary %s\n", testBinPath) - - // If successful, return nil - return nil -} - -// pushDockerImageToECR authenticates with AWS ECR, tags, and pushes a Docker image. -func pushDockerImageToECR(ctx context.Context, region, ecrURL, imageName, imageTag string) error { - // Authenticate Docker with ECR - cmdGetLoginPassword := exec.CommandContext(ctx, "aws", "ecr", "get-login-password", "--region", region) - var loginPassword bytes.Buffer - cmdGetLoginPassword.Stdout = &loginPassword - if err := cmdGetLoginPassword.Run(); err != nil { - return fmt.Errorf("failed to get ECR login password: %w", err) - } - - cmdDockerLogin := exec.CommandContext(ctx, "docker", "login", "--username", "AWS", "--password-stdin", ecrURL) - cmdDockerLogin.Stdin = &loginPassword - if output, err := cmdDockerLogin.CombinedOutput(); err != nil { - return fmt.Errorf("failed to login to Docker with ECR: %s, %w", string(output), err) - } - - fmt.Printf("Authenticated Docker with ECR: %s\n", ecrURL) - - // Tag the Docker image with ECR registry name - // #nosec G204 - cmdDockerTag := exec.CommandContext(ctx, "docker", "tag", fmt.Sprintf("%s:%s", imageName, imageTag), fmt.Sprintf("%s/%s:%s", ecrURL, imageName, imageTag)) - if output, err := cmdDockerTag.CombinedOutput(); err != nil { - return fmt.Errorf("failed to tag Docker image: %s, %w", string(output), err) - } - - fmt.Printf("Tagged Docker image: %s/%s:%s\n", ecrURL, imageName, imageTag) - - // Push Docker image to ECR - - fmt.Printf("Running command: docker push %s/%s:%s\n", ecrURL, imageName, imageTag) - - // #nosec G204 - cmdDockerPush := exec.CommandContext(ctx, "docker", "push", fmt.Sprintf("%s/%s:%s", ecrURL, imageName, imageTag)) - if output, err := cmdDockerPush.CombinedOutput(); err != nil { - return fmt.Errorf("failed to push Docker image to ECR: %s, %w", string(output), err) - } - - fmt.Printf("Pushed Docker image to ECR: %s/%s:%s\n", ecrURL, imageName, imageTag) - - return nil -} diff --git a/k8s-test-runner/cmd/internal/ecr.go b/k8s-test-runner/cmd/internal/ecr.go deleted file mode 100644 index 4efd1a9ab..000000000 --- a/k8s-test-runner/cmd/internal/ecr.go +++ /dev/null @@ -1,116 +0,0 @@ -package internal - -import ( - "context" - "fmt" - "log" - "os" - - "github.com/aws/aws-sdk-go-v2/aws" - "github.com/aws/aws-sdk-go-v2/config" - "github.com/aws/aws-sdk-go-v2/service/ecr" - "github.com/aws/aws-sdk-go-v2/service/ecr/types" - "github.com/spf13/cobra" -) - -var ECR = &cobra.Command{ - Use: "ecr", - Short: "ECR commands", -} - -var dalUntaggedImages = &cobra.Command{ - Use: "delete-untagged-images", - RunE: deleteUntaggedImagesRunE, - Short: "", -} - -func init() { - ECR.AddCommand(dalUntaggedImages) - - dalUntaggedImages.Flags().String("registry-id", "", "Image registry ID") - if err := dalUntaggedImages.MarkFlagRequired("registry-id"); err != nil { - log.Fatalf("Failed to mark 'registry-id' flag as required: %v", err) - } - dalUntaggedImages.Flags().String("repository-name", "", "Image repository name") - if err := dalUntaggedImages.MarkFlagRequired("repository-name"); err != nil { - log.Fatalf("Failed to mark 'repository-name' flag as required: %v", err) - } -} - -func deleteUntaggedImagesRunE(cmd *cobra.Command, args []string) error { - registryId, err := cmd.Flags().GetString("registry-id") - if err != nil { - return fmt.Errorf("error getting registry ID: %v", err) - } - repositoryName, err := cmd.Flags().GetString("repository-name") - if err != nil { - return fmt.Errorf("error getting repository name: %v", err) - } - - err = checkAWSCredentials() - if err != nil { - return err - } - - // Load the AWS configuration - cfg, err := config.LoadDefaultConfig(context.TODO(), - config.WithRegion("us-west-2"), - ) - if err != nil { - log.Fatalf("Unable to load SDK config, %v", err) - } - - // Create an ECR client - client := ecr.NewFromConfig(cfg) - - // Call the DescribeImages API - images, err := client.DescribeImages(context.TODO(), &ecr.DescribeImagesInput{ - RepositoryName: aws.String(repositoryName), - RegistryId: ®istryId, - Filter: &types.DescribeImagesFilter{ - TagStatus: types.TagStatusUntagged, - }, - }) - if err != nil { - log.Fatalf("Unable to describe images, %v", err) - } - - // Prepare the list of image IDs for deletion. - var imageIDs []types.ImageIdentifier - for _, image := range images.ImageDetails { - imageIDs = append(imageIDs, types.ImageIdentifier{ - ImageDigest: image.ImageDigest, - }) - } - - // Delete untagged images. - if len(imageIDs) > 0 { - _, err = client.BatchDeleteImage(context.TODO(), &ecr.BatchDeleteImageInput{ - RepositoryName: aws.String(repositoryName), - ImageIds: imageIDs, - }) - if err != nil { - log.Fatalf("Unable to delete images, %v", err) - } - fmt.Println("Untagged images deleted successfully.") - } else { - fmt.Println("No untagged images found to delete.") - } - - return nil -} - -func checkAWSCredentials() error { - // List of required AWS environment variables. - envVars := []string{"AWS_ACCESS_KEY_ID", "AWS_SECRET_ACCESS_KEY", "AWS_SESSION_TOKEN"} - - for _, envVar := range envVars { - if _, exists := os.LookupEnv(envVar); !exists { - // Return an updated error message pointing to AWS Command line or programmatic access for credentials. - return fmt.Errorf("environment variable %s is not set. Ensure your AWS credentials are configured correctly. You can find your credentials via AWS -> Command line or programmatic access", envVar) - } - } - - // All environment variables are set. - return nil -} diff --git a/k8s-test-runner/cmd/internal/run.go b/k8s-test-runner/cmd/internal/run.go deleted file mode 100644 index 845a77a88..000000000 --- a/k8s-test-runner/cmd/internal/run.go +++ /dev/null @@ -1,136 +0,0 @@ -package internal - -import ( - "encoding/base64" - "fmt" - "os" - - "github.com/google/uuid" - "github.com/pkg/errors" - "github.com/spf13/cobra" - - "github.com/smartcontractkit/chainlink-testing-framework/k8s-test-runner/config" - "github.com/smartcontractkit/chainlink-testing-framework/k8s-test-runner/runner" -) - -var Run = &cobra.Command{ - Use: "run", - RunE: runRunE, - Short: "Run", -} - -func init() { - Run.PersistentFlags().StringP( - "config", - "c", - "", - "Path to TOML config", - ) - Run.Flags().BoolP("detached", "d", false, "Run in detached mode") -} - -func runRunE(cmd *cobra.Command, args []string) error { - configPath, err := cmd.Flags().GetString("config") - if err != nil { - return err - } - detachedMode, err := cmd.Flags().GetBool("detached") - if err != nil { - return err - } - - var runnerCfg = &config.Runner{} - err = config.Read(configPath, "", runnerCfg) - if err != nil { - return err - } - - var testCfgBase64 string - if runnerCfg.TestConfigFilePath != "" { - testCfgBase64, err = fileAsBase64(runnerCfg.TestConfigFilePath) - if err != nil { - return err - } - runnerCfg.TestConfigBase64 = testCfgBase64 - } - - if runnerCfg.SyncValue == "" { - runnerCfg.SyncValue = fmt.Sprintf("a%s", uuid.NewString()[0:5]) - } - - if runnerCfg.TTLSecondsAfterFinished == 0 { - runnerCfg.TTLSecondsAfterFinished = 600 - } - - runnerCfg.DetachedMode = detachedMode - - p, err := runner.NewK8sTestRun(runnerCfg, getChartOverrides(*runnerCfg)) - if err != nil { - return errors.Wrapf(err, "error creating test in k8s") - } - - err = p.Run() - if err != nil { - return errors.Wrapf(err, "error running test in k8s") - } - - return nil -} - -func getChartOverrides(c config.Runner) map[string]interface{} { - image := fmt.Sprintf("%s/%s:%s", c.ImageRegistryURL, c.ImageName, c.ImageTag) - envMap := c.Envs - if envMap == nil { - envMap = map[string]string{} - } - envMap[c.TestConfigBase64EnvName] = c.TestConfigBase64 - - labelsMap := c.Metadata.Labels - if labelsMap == nil { - labelsMap = make(map[string]string) - } - - return map[string]interface{}{ - "namespace": c.Namespace, - "rbac": map[string]interface{}{ - "roleName": c.RBACRoleName, - "serviceAccountName": c.RBACServiceAccountName, - }, - "jobs": c.JobCount, - "sync": c.SyncValue, - "ttlSecondsAfterFinished": c.TTLSecondsAfterFinished, - "test": map[string]interface{}{ - "name": c.TestName, // Set this to your specific test name - "timeout": c.TestTimeout, - }, - "image": image, - "imagePullPolicy": "Always", - "labels": map[string]interface{}{}, - "annotations": map[string]interface{}{}, // Add specific annotations if needed - "metadata": map[string]interface{}{ - "labels": labelsMap, - }, - "env": envMap, - "resources": map[string]interface{}{ - "requests": map[string]interface{}{ - "cpu": c.ResourcesRequestsCPU, - "memory": c.ResourcesRequestsMemory, - }, - "limits": map[string]interface{}{ - "cpu": c.ResourcesLimitsCPU, - "memory": c.ResourcesLimitsMemory, - }, - }, - "nodeSelector": map[string]interface{}{}, // Specify node selector if needed - "tolerations": []interface{}{}, // Specify tolerations if needed - "affinity": map[string]interface{}{}, // Specify affinity rules if needed - } -} - -func fileAsBase64(filePath string) (string, error) { - content, err := os.ReadFile(filePath) - if err != nil { - return "", errors.Wrapf(err, "error reading file %s", filePath) - } - return base64.StdEncoding.EncodeToString(content), nil -} diff --git a/k8s-test-runner/cmd/main.go b/k8s-test-runner/cmd/main.go deleted file mode 100644 index 8599bdb92..000000000 --- a/k8s-test-runner/cmd/main.go +++ /dev/null @@ -1,35 +0,0 @@ -package main - -import ( - "log" - "os" - "time" - - "github.com/spf13/cobra" - "golang.org/x/net/context" - - "github.com/smartcontractkit/chainlink-testing-framework/k8s-test-runner/cmd/internal" -) - -var rootCmd = &cobra.Command{ - Use: "k8s-test-runner", - Short: "K8s Test Runner", -} - -func init() { - ctx, cancel := context.WithTimeout(context.Background(), time.Minute*1) - defer cancel() - - internal.Create.SetContext(ctx) - - rootCmd.AddCommand(internal.Create) - rootCmd.AddCommand(internal.Run) - rootCmd.AddCommand(internal.ECR) -} - -func main() { - if err := rootCmd.Execute(); err != nil { - log.Println(err) - os.Exit(1) - } -} diff --git a/k8s-test-runner/config/config.go b/k8s-test-runner/config/config.go deleted file mode 100644 index 03bca8b3e..000000000 --- a/k8s-test-runner/config/config.go +++ /dev/null @@ -1,115 +0,0 @@ -package config - -import ( - "encoding/base64" - "os" - "time" - - "github.com/BurntSushi/toml" - "github.com/go-playground/validator/v10" - "github.com/kelseyhightower/envconfig" - "github.com/pkg/errors" -) - -type Runner struct { - Namespace string `toml:"namespace" validate:"required"` - RBACRoleName string `toml:"rbac_role_name" validate:"required"` - RBACServiceAccountName string `toml:"rbac_service_account_name" validate:"required"` - SyncValue string `toml:"sync_value"` // Random if not set - TTLSecondsAfterFinished int `toml:"ttl_seconds_after_finished"` // How long to keep the job after it's finished. Default is 600 seconds - ImageRegistryURL string `toml:"image_registry_url" envconfig:"IMAGE_REGISTRY_URL" validate:"required"` - ImageName string `toml:"image_name" validate:"required"` - ImageTag string `toml:"image_tag" validate:"required"` - TestName string `toml:"test_name" validate:"required"` - TestConfigBase64EnvName string `toml:"test_config_base64_env_name"` - TestConfigFilePath string `toml:"test_config_file_path" envconfig:"TEST_CONFIG_FILE_PATH"` - TestConfigBase64 string `toml:"test_config_base64" envconfig:"TEST_CONFIG_BASE64"` - TestTimeout time.Duration `toml:"test_timeout" validate:"required"` - ResourcesRequestsCPU string `toml:"resources_requests_cpu" validate:"required"` // Eg. "1000m" - ResourcesRequestsMemory string `toml:"resources_requests_memory" validate:"required"` // Eg. "512Mi" - ResourcesLimitsCPU string `toml:"resources_limits_cpu" validate:"required"` // Eg. "1000m" - ResourcesLimitsMemory string `toml:"resources_limits_memory" validate:"required"` // Eg. "512Mi" - JobCount int `toml:"job_count" validate:"required"` - ChartPath string `toml:"chart_path"` // Default chart if not set - DetachedMode bool `toml:"detached_mode"` - Debug bool `toml:"debug"` - Envs map[string]string `toml:"envs"` - Metadata Metadata `toml:"metadata"` -} - -type Metadata struct { - Labels map[string]string `toml:"labels"` -} - -// Read initializes the configuration by sequentially loading from a TOML file, -// a base64 encoded string, and finally from environment variables. Each step -// potentially overwrites previously set values, allowing for flexible configuration -// precedence. This function is particularly useful for handling configuration in -// different environments like local development, CI, or production. -// -// Parameters: -// - tomlFilePath: File path to a TOML configuration file. -// - base64Config: Base64 encoded configuration string. -// - targetConfig: Pointer to the struct where the configuration will be stored. -// -// The function first tries to read from the TOML file if 'tomlFilePath' is not empty. -// Then, it attempts to overwrite the configuration with the base64 encoded string -// provided in 'base64Config'. Finally, it overwrites any existing configuration with -// values from environment variables. -// -// Returns an error if any step of reading and unmarshalling configurations fails. -func Read(tomlFilePath, base64Config string, targetConfig interface{}) error { - // Load configuration from the TOML file if a path is provided. - if tomlFilePath != "" { - tomlData, err := os.ReadFile(tomlFilePath) - if err != nil { - return errors.Wrapf(err, "error reading TOML test config file at %s", tomlFilePath) - } - if err := toml.Unmarshal(tomlData, targetConfig); err != nil { - return errors.Wrap(err, "error unmarshalling TOML data for test config") - } - } - - // Override configuration with base64 encoded string if provided. - if base64Config != "" { - decodedBase64Config, err := base64.StdEncoding.DecodeString(base64Config) - if err != nil { - return errors.Wrap(err, "error decoding base64 config string") - } - if err := toml.Unmarshal(decodedBase64Config, targetConfig); err != nil { - return errors.Wrap(err, "error unmarshalling base64 decoded data for test config") - } - } - - // Further override configuration with environment variables. - if err := envconfig.Process("", targetConfig); err != nil { - return errors.Wrap(err, "error processing environment variables for test config") - } - - // Validate the configuration - validate := validator.New() - err := validate.Struct(targetConfig) - - if err != nil { - var validationError *validator.InvalidValidationError - if errors.As(err, &validationError) { - // Handle the *validator.InvalidValidationError specifically - return errors.Wrap(err, "error validating test config") - } - - var validationErrors validator.ValidationErrors - if errors.As(err, &validationErrors) { - // Iterate through validation errors if err is of type ValidationErrors - for _, ve := range validationErrors { - // Customize the error message based on the validation tag - switch ve.Tag() { - case "oneof": - return errors.Wrapf(ve, "error validating test config. The field '%s' must be one of [%s]", ve.Field(), ve.Param()) - default: - return errors.Wrap(ve, "error validating test config") - } - } - } - } - return nil -} diff --git a/k8s-test-runner/exec/exec.go b/k8s-test-runner/exec/exec.go deleted file mode 100644 index 678db2248..000000000 --- a/k8s-test-runner/exec/exec.go +++ /dev/null @@ -1,50 +0,0 @@ -package exec - -import ( - "bufio" - "io" - "os/exec" - "strings" - - "github.com/rs/zerolog/log" -) - -// Cmd executes os command, logging both streams -func Cmd(command string) error { - return CmdWithStreamFunc(command, func(m string) { - log.Info().Str("Text", m).Msg("Command output") - }) -} - -// readStdPipe continuously read a pipe from the command -func readStdPipe(pipe io.ReadCloser, streamFunc func(string)) { - scanner := bufio.NewScanner(pipe) - scanner.Split(bufio.ScanLines) - for scanner.Scan() { - m := scanner.Text() - if streamFunc != nil { - streamFunc(m) - } - } -} - -// CmdWithStreamFunc executes command with stream function -func CmdWithStreamFunc(command string, outputFunction func(string)) error { - c := strings.Split(command, " ") - // #nosec G204 - cmd := exec.Command(c[0], c[1:]...) - stderr, err := cmd.StderrPipe() - if err != nil { - return err - } - stdout, err := cmd.StdoutPipe() - if err != nil { - return err - } - if err := cmd.Start(); err != nil { - return err - } - go readStdPipe(stderr, outputFunction) - go readStdPipe(stdout, outputFunction) - return cmd.Wait() -} diff --git a/k8s-test-runner/go.mod b/k8s-test-runner/go.mod deleted file mode 100644 index 8bb74e8c3..000000000 --- a/k8s-test-runner/go.mod +++ /dev/null @@ -1,81 +0,0 @@ -module github.com/smartcontractkit/chainlink-testing-framework/k8s-test-runner - -go 1.24.0 - -require ( - github.com/BurntSushi/toml v1.4.0 - github.com/aws/aws-sdk-go-v2 v1.32.2 - github.com/aws/aws-sdk-go-v2/config v1.28.0 - github.com/aws/aws-sdk-go-v2/service/ecr v1.36.2 - github.com/go-playground/validator/v10 v10.22.1 - github.com/google/uuid v1.6.0 - github.com/kelseyhightower/envconfig v1.4.0 - github.com/pkg/errors v0.9.1 - github.com/rs/zerolog v1.33.0 - github.com/spf13/cobra v1.8.1 - golang.org/x/net v0.30.0 - k8s.io/api v0.31.2 - k8s.io/apimachinery v0.31.2 - k8s.io/client-go v0.31.2 -) - -require ( - github.com/aws/aws-sdk-go-v2/credentials v1.17.41 // indirect - github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.17 // indirect - github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.21 // indirect - github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.21 // indirect - github.com/aws/aws-sdk-go-v2/internal/ini v1.8.1 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.0 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.2 // indirect - github.com/aws/aws-sdk-go-v2/service/sso v1.24.2 // indirect - github.com/aws/aws-sdk-go-v2/service/ssooidc v1.28.2 // indirect - github.com/aws/aws-sdk-go-v2/service/sts v1.32.2 // indirect - github.com/aws/smithy-go v1.22.0 - github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect - github.com/emicklei/go-restful/v3 v3.11.0 // indirect - github.com/fxamacker/cbor/v2 v2.7.0 // indirect - github.com/gabriel-vasile/mimetype v1.4.3 // indirect - github.com/go-logr/logr v1.4.2 // indirect - github.com/go-openapi/jsonpointer v0.20.0 // indirect - github.com/go-openapi/jsonreference v0.20.2 // indirect - github.com/go-openapi/swag v0.22.4 // indirect - github.com/go-playground/locales v0.14.1 // indirect - github.com/go-playground/universal-translator v0.18.1 // indirect - github.com/gogo/protobuf v1.3.2 // indirect - github.com/golang/protobuf v1.5.4 // indirect - github.com/google/gnostic-models v0.6.8 // indirect - github.com/google/go-cmp v0.6.0 // indirect - github.com/google/gofuzz v1.2.0 // indirect - github.com/imdario/mergo v0.3.16 // indirect - github.com/inconshreveable/mousetrap v1.1.0 // indirect - github.com/jmespath/go-jmespath v0.4.0 // indirect - github.com/josharian/intern v1.0.0 // indirect - github.com/json-iterator/go v1.1.12 // indirect - github.com/leodido/go-urn v1.4.0 // indirect - github.com/mailru/easyjson v0.7.7 // indirect - github.com/mattn/go-colorable v0.1.13 // indirect - github.com/mattn/go-isatty v0.0.19 // indirect - github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect - github.com/modern-go/reflect2 v1.0.2 // indirect - github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect - github.com/spf13/pflag v1.0.5 // indirect - github.com/x448/float16 v0.8.4 // indirect - golang.org/x/crypto v0.32.0 // indirect - golang.org/x/oauth2 v0.21.0 // indirect - golang.org/x/sys v0.29.0 // indirect - golang.org/x/term v0.28.0 // indirect - golang.org/x/text v0.21.0 // indirect - golang.org/x/time v0.3.0 // indirect - google.golang.org/protobuf v1.34.2 // indirect - gopkg.in/inf.v0 v0.9.1 // indirect - gopkg.in/yaml.v2 v2.4.0 - gopkg.in/yaml.v3 v3.0.1 // indirect - k8s.io/klog/v2 v2.130.1 // indirect - k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340 // indirect - k8s.io/utils v0.0.0-20240711033017-18e509b52bc8 // indirect - sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect - sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect - sigs.k8s.io/yaml v1.4.0 // indirect -) - -retract [v1.999.0-test-release, v1.999.999-test-release] diff --git a/k8s-test-runner/go.sum b/k8s-test-runner/go.sum deleted file mode 100644 index ee88091fa..000000000 --- a/k8s-test-runner/go.sum +++ /dev/null @@ -1,226 +0,0 @@ -github.com/BurntSushi/toml v1.4.0 h1:kuoIxZQy2WRRk1pttg9asf+WVv6tWQuBNVmK8+nqPr0= -github.com/BurntSushi/toml v1.4.0/go.mod h1:ukJfTF/6rtPPRCnwkur4qwRxa8vTRFBF0uk2lLoLwho= -github.com/aws/aws-sdk-go-v2 v1.32.2 h1:AkNLZEyYMLnx/Q/mSKkcMqwNFXMAvFto9bNsHqcTduI= -github.com/aws/aws-sdk-go-v2 v1.32.2/go.mod h1:2SK5n0a2karNTv5tbP1SjsX0uhttou00v/HpXKM1ZUo= -github.com/aws/aws-sdk-go-v2/config v1.28.0 h1:FosVYWcqEtWNxHn8gB/Vs6jOlNwSoyOCA/g/sxyySOQ= -github.com/aws/aws-sdk-go-v2/config v1.28.0/go.mod h1:pYhbtvg1siOOg8h5an77rXle9tVG8T+BWLWAo7cOukc= -github.com/aws/aws-sdk-go-v2/credentials v1.17.41 h1:7gXo+Axmp+R4Z+AK8YFQO0ZV3L0gizGINCOWxSLY9W8= -github.com/aws/aws-sdk-go-v2/credentials v1.17.41/go.mod h1:u4Eb8d3394YLubphT4jLEwN1rLNq2wFOlT6OuxFwPzU= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.17 h1:TMH3f/SCAWdNtXXVPPu5D6wrr4G5hI1rAxbcocKfC7Q= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.17/go.mod h1:1ZRXLdTpzdJb9fwTMXiLipENRxkGMTn1sfKexGllQCw= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.21 h1:UAsR3xA31QGf79WzpG/ixT9FZvQlh5HY1NRqSHBNOCk= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.21/go.mod h1:JNr43NFf5L9YaG3eKTm7HQzls9J+A9YYcGI5Quh1r2Y= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.21 h1:6jZVETqmYCadGFvrYEQfC5fAQmlo80CeL5psbno6r0s= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.21/go.mod h1:1SR0GbLlnN3QUmYaflZNiH1ql+1qrSiB2vwcJ+4UM60= -github.com/aws/aws-sdk-go-v2/internal/ini v1.8.1 h1:VaRN3TlFdd6KxX1x3ILT5ynH6HvKgqdiXoTxAF4HQcQ= -github.com/aws/aws-sdk-go-v2/internal/ini v1.8.1/go.mod h1:FbtygfRFze9usAadmnGJNc8KsP346kEe+y2/oyhGAGc= -github.com/aws/aws-sdk-go-v2/service/ecr v1.36.2 h1:VDQaVwGOokbd3VUbHF+wupiffdrbAZPdQnr5XZMJqrs= -github.com/aws/aws-sdk-go-v2/service/ecr v1.36.2/go.mod h1:lvUlMghKYmSxSfv0vU7pdU/8jSY+s0zpG8xXhaGKCw0= -github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.0 h1:TToQNkvGguu209puTojY/ozlqy2d/SFNcoLIqTFi42g= -github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.0/go.mod h1:0jp+ltwkf+SwG2fm/PKo8t4y8pJSgOCO4D8Lz3k0aHQ= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.2 h1:s7NA1SOw8q/5c0wr8477yOPp0z+uBaXBnLE0XYb0POA= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.2/go.mod h1:fnjjWyAW/Pj5HYOxl9LJqWtEwS7W2qgcRLWP+uWbss0= -github.com/aws/aws-sdk-go-v2/service/sso v1.24.2 h1:bSYXVyUzoTHoKalBmwaZxs97HU9DWWI3ehHSAMa7xOk= -github.com/aws/aws-sdk-go-v2/service/sso v1.24.2/go.mod h1:skMqY7JElusiOUjMJMOv1jJsP7YUg7DrhgqZZWuzu1U= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.28.2 h1:AhmO1fHINP9vFYUE0LHzCWg/LfUWUF+zFPEcY9QXb7o= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.28.2/go.mod h1:o8aQygT2+MVP0NaV6kbdE1YnnIM8RRVQzoeUH45GOdI= -github.com/aws/aws-sdk-go-v2/service/sts v1.32.2 h1:CiS7i0+FUe+/YY1GvIBLLrR/XNGZ4CtM1Ll0XavNuVo= -github.com/aws/aws-sdk-go-v2/service/sts v1.32.2/go.mod h1:HtaiBI8CjYoNVde8arShXb94UbQQi9L4EMr6D+xGBwo= -github.com/aws/smithy-go v1.22.0 h1:uunKnWlcoL3zO7q+gG2Pk53joueEOsnNB28QdMsmiMM= -github.com/aws/smithy-go v1.22.0/go.mod h1:irrKGvNn1InZwb2d7fkIRNucdfwR8R+Ts3wxYa/cJHg= -github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= -github.com/cpuguy83/go-md2man/v2 v2.0.4/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= -github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= -github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= -github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/emicklei/go-restful/v3 v3.11.0 h1:rAQeMHw1c7zTmncogyy8VvRZwtkmkZ4FxERmMY4rD+g= -github.com/emicklei/go-restful/v3 v3.11.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= -github.com/fxamacker/cbor/v2 v2.7.0 h1:iM5WgngdRBanHcxugY4JySA0nk1wZorNOpTgCMedv5E= -github.com/fxamacker/cbor/v2 v2.7.0/go.mod h1:pxXPTn3joSm21Gbwsv0w9OSA2y1HFR9qXEeXQVeNoDQ= -github.com/gabriel-vasile/mimetype v1.4.3 h1:in2uUcidCuFcDKtdcBxlR0rJ1+fsokWf+uqxgUFjbI0= -github.com/gabriel-vasile/mimetype v1.4.3/go.mod h1:d8uq/6HKRL6CGdk+aubisF/M5GcPfT7nKyLpA0lbSSk= -github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY= -github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= -github.com/go-openapi/jsonpointer v0.19.6/go.mod h1:osyAmYz/mB/C3I+WsTTSgw1ONzaLJoLCyoi6/zppojs= -github.com/go-openapi/jsonpointer v0.20.0 h1:ESKJdU9ASRfaPNOPRx12IUyA1vn3R9GiE3KYD14BXdQ= -github.com/go-openapi/jsonpointer v0.20.0/go.mod h1:6PGzBjjIIumbLYysB73Klnms1mwnU4G3YHOECG3CedA= -github.com/go-openapi/jsonreference v0.20.2 h1:3sVjiK66+uXK/6oQ8xgcRKcFgQ5KXa2KvnJRumpMGbE= -github.com/go-openapi/jsonreference v0.20.2/go.mod h1:Bl1zwGIM8/wsvqjsOQLJ/SH+En5Ap4rVB5KVcIDZG2k= -github.com/go-openapi/swag v0.22.3/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14= -github.com/go-openapi/swag v0.22.4 h1:QLMzNJnMGPRNDCbySlcj1x01tzU8/9LTTL9hZZZogBU= -github.com/go-openapi/swag v0.22.4/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14= -github.com/go-playground/assert/v2 v2.2.0 h1:JvknZsQTYeFEAhQwI4qEt9cyV5ONwRHC+lYKSsYSR8s= -github.com/go-playground/assert/v2 v2.2.0/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= -github.com/go-playground/locales v0.14.1 h1:EWaQ/wswjilfKLTECiXz7Rh+3BjFhfDFKv/oXslEjJA= -github.com/go-playground/locales v0.14.1/go.mod h1:hxrqLVvrK65+Rwrd5Fc6F2O76J/NuW9t0sjnWqG1slY= -github.com/go-playground/universal-translator v0.18.1 h1:Bcnm0ZwsGyWbCzImXv+pAJnYK9S473LQFuzCbDbfSFY= -github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91TpwSH2VMlDf28Uj24BCp08ZFTUY= -github.com/go-playground/validator/v10 v10.22.1 h1:40JcKH+bBNGFczGuoBYgX4I6m/i27HYW8P9FDk5PbgA= -github.com/go-playground/validator/v10 v10.22.1/go.mod h1:dbuPbCMFw/DrkbEynArYaCwl3amGuJotoKCe95atGMM= -github.com/go-task/slim-sprig/v3 v3.0.0 h1:sUs3vkvUymDpBKi3qH1YSqBQk9+9D/8M2mN1vB6EwHI= -github.com/go-task/slim-sprig/v3 v3.0.0/go.mod h1:W848ghGpv3Qj3dhTPRyJypKRiqCdHZiAzKg9hl15HA8= -github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= -github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= -github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= -github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= -github.com/google/gnostic-models v0.6.8 h1:yo/ABAfM5IMRsS1VnXjTBvUb61tFIHozhlYvRgGre9I= -github.com/google/gnostic-models v0.6.8/go.mod h1:5n7qKqH0f5wFt+aWF8CW6pZLLNOfYuF5OpfBSENuI8U= -github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= -github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= -github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/pprof v0.0.0-20240525223248-4bfdf5a9a2af h1:kmjWCqn2qkEml422C2Rrd27c3VGxi6a/6HNq8QmHRKM= -github.com/google/pprof v0.0.0-20240525223248-4bfdf5a9a2af/go.mod h1:K1liHPHnj73Fdn/EKuT8nrFqBihUSKXoLYU0BuatOYo= -github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= -github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/imdario/mergo v0.3.16 h1:wwQJbIsHYGMUyLSPrEq1CT16AhnhNJQ51+4fdHUnCl4= -github.com/imdario/mergo v0.3.16/go.mod h1:WBLT9ZmE3lPoWsEzCh9LPo3TiwVN+ZKEjmz+hD27ysY= -github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= -github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= -github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg= -github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= -github.com/jmespath/go-jmespath/internal/testify v1.5.1 h1:shLQSRRSCCPj3f2gpwzGwWFoC7ycTf1rcQZHOlsJ6N8= -github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= -github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= -github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= -github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= -github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= -github.com/kelseyhightower/envconfig v1.4.0 h1:Im6hONhd3pLkfDFsbRgu68RDNkGF1r3dvMUtDTo2cv8= -github.com/kelseyhightower/envconfig v1.4.0/go.mod h1:cccZRl6mQpaq41TPp5QxidR+Sa3axMbJDNb//FQX6Gg= -github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= -github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= -github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= -github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= -github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= -github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -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/leodido/go-urn v1.4.0 h1:WT9HwE9SGECu3lg4d/dIA+jxlljEa1/ffXKmRjqdmIQ= -github.com/leodido/go-urn v1.4.0/go.mod h1:bvxc+MVxLKB4z00jd1z+Dvzr47oO32F/QSNjSBOlFxI= -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.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= -github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= -github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= -github.com/mattn/go-isatty v0.0.19 h1:JITubQf0MOLdlGRuRq+jtsDlekdYPia9ZFsB8h/APPA= -github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= -github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= -github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= -github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= -github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= -github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= -github.com/onsi/ginkgo/v2 v2.19.0 h1:9Cnnf7UHo57Hy3k6/m5k3dRfGTMXGvxhHFvkDTCTpvA= -github.com/onsi/ginkgo/v2 v2.19.0/go.mod h1:rlwLi9PilAFJ8jCg9UE1QP6VBpd6/xj3SRC0d6TU0To= -github.com/onsi/gomega v1.19.0 h1:4ieX6qQjPP/BfC3mpsAtIGGlxTWPeA3Inl/7DtXw1tw= -github.com/onsi/gomega v1.19.0/go.mod h1:LY+I3pBVzYsTBU1AnDwOSxaYi9WoWiqgwooUqq9yPro= -github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= -github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= -github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8= -github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= -github.com/rs/xid v1.5.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= -github.com/rs/zerolog v1.33.0 h1:1cU2KZkvPxNyfgEmhHAz/1A9Bz+llsdYzklWFzgp0r8= -github.com/rs/zerolog v1.33.0/go.mod h1:/7mN4D5sKwJLZQ2b/znpjC3/GQWY/xaDXUM0kKWRHss= -github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= -github.com/spf13/cobra v1.8.1 h1:e5/vxKd/rZsfSJMUX1agtjeTDf+qv1/JdBF8gg5k9ZM= -github.com/spf13/cobra v1.8.1/go.mod h1:wHxEcudfqmLYa8iTfL+OuZPbBZkmvliBWKIezN3kD9Y= -github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= -github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= -github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= -github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= -github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= -github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= -github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= -github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= -github.com/x448/float16 v0.8.4 h1:qLwI1I70+NjRFUR3zs1JPUCgaCXSh3SW62uAKT1mSBM= -github.com/x448/float16 v0.8.4/go.mod h1:14CWIYCyZA/cWjXOioeEpHeN/83MdbZDRQHoFcYsOfg= -github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.32.0 h1:euUpcYgM8WcP71gNpTqQCn6rC2t6ULUPiOzfWaXVVfc= -golang.org/x/crypto v0.32.0/go.mod h1:ZnnJkOaASj8g0AjIduWNlq2NRxL0PlBrbKVyZ6V/Ugc= -golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.30.0 h1:AcW1SDZMkb8IpzCdQUaIq2sP4sZ4zw+55h6ynffypl4= -golang.org/x/net v0.30.0/go.mod h1:2wGyMJ5iFasEhkwi13ChkO/t1ECNC4X4eBKkVFyYFlU= -golang.org/x/oauth2 v0.21.0 h1:tsimM75w1tF/uws5rbeHzIWxEqElMehnc+iW793zsZs= -golang.org/x/oauth2 v0.21.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= -golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.29.0 h1:TPYlXGxvx1MGTn2GiZDhnjPA9wZzZeGKHHmKhHYvgaU= -golang.org/x/sys v0.29.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/term v0.28.0 h1:/Ts8HFuMR2E6IP/jlo7QVLZHggjKQbhu/7H0LJFr3Gg= -golang.org/x/term v0.28.0/go.mod h1:Sw/lC2IAUZ92udQNf3WodGtn4k/XoLyZoh8v/8uiwek= -golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.21.0 h1:zyQAAkrwaneQ066sspRyJaG9VNi/YJ1NfzcGB3hZ/qo= -golang.org/x/text v0.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ= -golang.org/x/time v0.3.0 h1:rg5rLMjNzMS1RkNLzCG38eapWhnYLFYXDXj2gOlr8j4= -golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d h1:vU5i/LfpvrRCpgM/VPfJLg5KjxD3E+hfT1SH+d9zLwg= -golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d/go.mod h1:aiJjzUbINMkxbQROHiO6hDPo2LHcIPhhQsa9DLh0yGk= -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= -golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= -google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= -gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/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/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= -gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= -gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -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.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= -gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -k8s.io/api v0.31.2 h1:3wLBbL5Uom/8Zy98GRPXpJ254nEFpl+hwndmk9RwmL0= -k8s.io/api v0.31.2/go.mod h1:bWmGvrGPssSK1ljmLzd3pwCQ9MgoTsRCuK35u6SygUk= -k8s.io/apimachinery v0.31.2 h1:i4vUt2hPK56W6mlT7Ry+AO8eEsyxMD1U44NR22CLTYw= -k8s.io/apimachinery v0.31.2/go.mod h1:rsPdaZJfTfLsNJSQzNHQvYoTmxhoOEofxtOsF3rtsMo= -k8s.io/client-go v0.31.2 h1:Y2F4dxU5d3AQj+ybwSMqQnpZH9F30//1ObxOKlTI9yc= -k8s.io/client-go v0.31.2/go.mod h1:NPa74jSVR/+eez2dFsEIHNa+3o09vtNaWwWwb1qSxSs= -k8s.io/klog/v2 v2.130.1 h1:n9Xl7H1Xvksem4KFG4PYbdQCQxqc/tTUyrgXaOhHSzk= -k8s.io/klog/v2 v2.130.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE= -k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340 h1:BZqlfIlq5YbRMFko6/PM7FjZpUb45WallggurYhKGag= -k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340/go.mod h1:yD4MZYeKMBwQKVht279WycxKyM84kkAx2DPrTXaeb98= -k8s.io/utils v0.0.0-20240711033017-18e509b52bc8 h1:pUdcCO1Lk/tbT5ztQWOBi5HBgbBP1J8+AsQnQCKsi8A= -k8s.io/utils v0.0.0-20240711033017-18e509b52bc8/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= -sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo= -sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= -sigs.k8s.io/structured-merge-diff/v4 v4.4.1 h1:150L+0vs/8DA78h1u02ooW1/fFq/Lwr+sGiqlzvrtq4= -sigs.k8s.io/structured-merge-diff/v4 v4.4.1/go.mod h1:N8hJocpFajUSSeSJ9bOZ77VzejKZaXsTtZo4/u7Io08= -sigs.k8s.io/yaml v1.4.0 h1:Mk1wCc2gy/F0THH0TAp1QYyJNzRm2KCLy3o5ASXVI5E= -sigs.k8s.io/yaml v1.4.0/go.mod h1:Ejl7/uTz7PSA4eKMyQCUTnhZYNmLIl+5c2lQPGR2BPY= diff --git a/k8s-test-runner/k8s_client/client.go b/k8s-test-runner/k8s_client/client.go deleted file mode 100644 index c8c6e2ed8..000000000 --- a/k8s-test-runner/k8s_client/client.go +++ /dev/null @@ -1,272 +0,0 @@ -package k8s_client - -import ( - "context" - "fmt" - "io" - "time" - - "github.com/aws/smithy-go/ptr" - "github.com/pkg/errors" - "github.com/rs/zerolog/log" - batchV1 "k8s.io/api/batch/v1" - v1 "k8s.io/api/core/v1" - metaV1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/util/wait" - "k8s.io/client-go/kubernetes" - "k8s.io/client-go/rest" - "k8s.io/client-go/tools/clientcmd" - - exec "github.com/smartcontractkit/chainlink-testing-framework/k8s-test-runner/exec" -) - -const ( - K8sStatePollInterval = 3 * time.Second -) - -// High level k8s client -type Client struct { - ClientSet *kubernetes.Clientset - RESTConfig *rest.Config - callRetryPolicy wait.Backoff -} - -// GetLocalK8sDeps get local k8s context config -func GetLocalK8sDeps() (*kubernetes.Clientset, *rest.Config, error) { - loadingRules := clientcmd.NewDefaultClientConfigLoadingRules() - kubeConfig := clientcmd.NewNonInteractiveDeferredLoadingClientConfig(loadingRules, &clientcmd.ConfigOverrides{}) - k8sConfig, err := kubeConfig.ClientConfig() - if err != nil { - return nil, nil, err - } - k8sClient, err := kubernetes.NewForConfig(k8sConfig) - if err != nil { - return nil, nil, err - } - return k8sClient, k8sConfig, nil -} - -// NewK8sClient creates a new k8s client with a REST config -func NewClient() *Client { - cs, cfg, err := GetLocalK8sDeps() - if err != nil { - log.Fatal().Err(err).Send() - } - return &Client{ - ClientSet: cs, - RESTConfig: cfg, - callRetryPolicy: wait.Backoff{ - Steps: 5, // Max number of retries. - Duration: 10 * time.Second, // Initial delay before the first retry. - Factor: 2.0, // Multiplier factor for subsequent delays. - Jitter: 0.1, // Random jitter for the delay. - }, - } -} - -// k8sOperation defines the function type for Kubernetes operations that need retries. -type k8sOperation func() error - -// retryK8sCall attempts the provided Kubernetes operation with retries. -func retryK8sCall(operation k8sOperation, retryPolicy wait.Backoff) error { - var lastError error - err := wait.ExponentialBackoff(retryPolicy, func() (bool, error) { - lastError = operation() - if lastError != nil { - log.Warn().Err(lastError).Msg("Error encountered during K8s call, will retry") - return false, nil - } - return true, nil - }) - - if err != nil { - return fmt.Errorf("after %d attempts, last error: %s", retryPolicy.Steps, lastError) - } - return nil -} - -func (m *Client) ListPods(ctx context.Context, namespace, syncLabel string) (*v1.PodList, error) { - var pods *v1.PodList - timeout := int64(30) - labelSelector := syncSelector(syncLabel) - call := func() error { - var err error - pods, err = m.ClientSet.CoreV1().Pods(namespace).List(ctx, metaV1.ListOptions{ - LabelSelector: labelSelector, - TimeoutSeconds: &timeout, - }) - return err - } - - err := retryK8sCall(call, m.callRetryPolicy) - if err != nil { - // Wrap and return any error encountered during the retry operation - return nil, fmt.Errorf(`failed to call CoreV1().Pods().List(), namespace: %s, labelSelector: %s, timeout: %d: %w`, namespace, labelSelector, timeout, err) - } - - // At this point, `pods` should be populated successfully - return pods, nil -} - -func (m *Client) ListJobs(ctx context.Context, namespace, syncLabel string) (*batchV1.JobList, error) { - var jobs *batchV1.JobList - - timeout := int64(30) - labelSelector := syncSelector(syncLabel) - call := func() error { - var err error - jobs, err = m.ClientSet.BatchV1().Jobs(namespace).List(ctx, metaV1.ListOptions{ - LabelSelector: labelSelector, - TimeoutSeconds: &timeout, - }) - return err - } - - err := retryK8sCall(call, m.callRetryPolicy) - if err != nil { - // Wrap and return any error encountered during the retry operation - return nil, fmt.Errorf(`failed to call BatchV1().Jobs().List(), namespace: %s, labelSelector: %s, timeout: %d: %w`, namespace, labelSelector, timeout, err) - } - - // At this point, `jobs` should be populated successfully - return jobs, nil -} - -func (m *Client) GetPodLogs(ctx context.Context, namespace string, pods []v1.Pod) (map[string]string, error) { - podLogs := make(map[string]string) - - call := func() error { - for _, pod := range pods { - req := m.ClientSet.CoreV1().Pods(namespace).GetLogs(pod.Name, &v1.PodLogOptions{}) - podLog, err := req.Stream(ctx) - if err != nil { - return fmt.Errorf("failed to open log stream for pod %s: %w", pod.Name, err) - } - - logs, err := io.ReadAll(podLog) - if closeErr := podLog.Close(); closeErr != nil { - log.Debug().Err(closeErr).Msg("Failed to close log stream") - } - if err != nil { - return fmt.Errorf("failed to read log for pod %s: %w", pod.Name, err) - } - - podLogs[pod.Name] = string(logs) - } - - return nil // Success - } - - err := retryK8sCall(call, m.callRetryPolicy) - if err != nil { - // Wrap and return any error encountered during the retry operation - return nil, fmt.Errorf("failed to retrieve pod logs: %w", err) - } - - return podLogs, nil -} - -func syncSelector(s string) string { - return fmt.Sprintf("sync=%s", s) -} - -func (m *Client) RemoveJobs(ctx context.Context, nsName string, syncLabelValue string) error { - jobs, err := m.ListJobs(ctx, nsName, syncLabelValue) - if err != nil { - return err - } - - log.Info().Interface("jobs", jobs).Msg("Removing jobs") - - for _, j := range jobs.Items { - dp := metaV1.DeletePropagationForeground - if err := m.ClientSet.BatchV1().Jobs(nsName).Delete(ctx, j.Name, metaV1.DeleteOptions{ - PropagationPolicy: &dp, - }); err != nil { - return err - } - } - return nil -} - -// Use polling to wait for jobs to complete. -// `watch` does not work in CI (GAP), so we have to poll. -func (m *Client) WaitUntilJobsComplete(ctx context.Context, namespace, syncLabelValue string, expectedJobsCount int) error { - labelSelector := syncSelector(syncLabelValue) - completedJobs := make(map[string]bool) - pollingInterval := time.Second * 5 - - for { - select { - case <-ctx.Done(): - log.Info().Msg("Context canceled") - return ctx.Err() - default: - jobs, err := m.ClientSet.BatchV1().Jobs(namespace).List(ctx, metaV1.ListOptions{ - LabelSelector: labelSelector, - TimeoutSeconds: ptr.Int64(30), // query timeout - }) - - if err != nil { - log.Error().Err(err).Str("labelSelector", labelSelector).Msg("Failed to list jobs, will retry...") - - cmd := fmt.Sprintf("kubectl get jobs -l sync=%s -n wasp --v=7", syncLabelValue) - log.Info().Str("cmd", cmd).Msg("Running CLI command with verbose output to debug...") - _ = exec.Cmd(cmd) - - time.Sleep(pollingInterval) - continue - } - - for _, job := range jobs.Items { - if job.Status.Succeeded > 0 { - completedJobs[job.Name] = true - log.Info().Str("job", job.Name).Msg("Job succeeded") - } else if job.Status.Failed > 0 { - completedJobs[job.Name] = true - log.Info().Str("job", job.Name).Msg("Job failed") - return errors.Errorf("job %s failed", job.Name) - } - } - - if len(completedJobs) >= expectedJobsCount { - log.Info().Msgf("All %d jobs completed", expectedJobsCount) - return nil - } else { - log.Info().Msgf("Waiting for %d job(s) to complete...", expectedJobsCount-len(completedJobs)) - } - - time.Sleep(pollingInterval) - } - } -} - -func (m *Client) PrintPodLogs(ctx context.Context, namespace string, syncLabelValue string) { - pods, err := m.ListPods(ctx, namespace, syncLabelValue) - if err != nil { - log.Error().Err(err).Msg("Failed to list pods") - return - } - - logs, err := m.GetPodLogs(ctx, namespace, pods.Items) - if err != nil { - log.Error().Err(err).Msg("Failed to get pod logs") - } else { - for k, v := range logs { - log.Info().Str("Pod", k).Msg("Pod logs") - fmt.Println(v) - } - } -} - -func (m *Client) LogNamespaceEvents(ctx context.Context, namespace string) { - events, err := m.ClientSet.CoreV1().Events(namespace).List(ctx, metaV1.ListOptions{}) - if err != nil { - log.Error().Err(err).Msg("Failed to get namespace events") - } else { - log.Info().Msg("Namespace events:") - for _, e := range events.Items { - log.Info().Interface("Event", e).Msg("Event") - } - } -} diff --git a/k8s-test-runner/package.json b/k8s-test-runner/package.json deleted file mode 100644 index 433643916..000000000 --- a/k8s-test-runner/package.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "name": "k8s-test-runner", - "description": "A simple test runner for k8s tests", - "version": "1.0.0" -} diff --git a/k8s-test-runner/package.sh b/k8s-test-runner/package.sh deleted file mode 100755 index 369d4966e..000000000 --- a/k8s-test-runner/package.sh +++ /dev/null @@ -1,39 +0,0 @@ -#!/bin/bash - -# Check if sufficient arguments are provided -if [ "$#" -ne 2 ]; then - echo "Usage: $0 " - exit 1 -fi - -# Capture the version and OS from the script arguments -VERSION=$1 -OS=$2 - -# Validate the OS argument -if [ "$OS" != "darwin" ] && [ "$OS" != "linux" ]; then - echo "Invalid OS. Please select either 'darwin' or 'linux'." - exit 1 -fi - -# Navigate to the cmd directory -cd cmd/ || exit 1 - -# Initialize binary name -BINARY_NAME="" - -# Build the binary based on the selected OS -if [ "$OS" == "darwin" ]; then - GOOS=darwin GOARCH=arm64 go build -o "k8s-test-runner-$OS-arm64" - BINARY_NAME="k8s-test-runner-$OS-arm64" -elif [ "$OS" == "linux" ]; then - GOOS=linux GOARCH=amd64 go build -o "k8s-test-runner-$OS-amd64" - BINARY_NAME="k8s-test-runner-$OS-amd64" -fi - -# Navigate back to the root directory -cd ../ - -# Package the Dockerfile, Helm chart, and the selected binary into a tarball, appending the version and OS to the tarball's name -tar -czvf "k8s-test-runner-$OS-v$VERSION.tar.gz" Dockerfile.testbin chart -C cmd "$BINARY_NAME" -echo "Created k8s-test-runner-$OS-v$VERSION.tar.gz" diff --git a/k8s-test-runner/runner/runner.go b/k8s-test-runner/runner/runner.go deleted file mode 100644 index 86d7246e5..000000000 --- a/k8s-test-runner/runner/runner.go +++ /dev/null @@ -1,112 +0,0 @@ -package runner - -import ( - "context" - // "embed" - _ "embed" - "fmt" - "os" - - "path" - "runtime" - "time" - - "github.com/google/uuid" - "github.com/rs/zerolog/log" - "gopkg.in/yaml.v2" - - "github.com/smartcontractkit/chainlink-testing-framework/k8s-test-runner/config" - "github.com/smartcontractkit/chainlink-testing-framework/k8s-test-runner/exec" - "github.com/smartcontractkit/chainlink-testing-framework/k8s-test-runner/k8s_client" -) - -type K8sTestRun struct { - cfg *config.Runner - c *k8s_client.Client - Ctx context.Context - Cancel context.CancelFunc - ChartOverrides map[string]interface{} -} - -func NewK8sTestRun(cfg *config.Runner, chartOverrides map[string]interface{}) (*K8sTestRun, error) { - log.Info().Interface("Config", cfg).Msg("Cluster configuration") - runTimeout := cfg.TestTimeout + time.Minute*10 - ctx, cancelFunc := context.WithTimeout(context.Background(), runTimeout) - - return &K8sTestRun{ - cfg: cfg, - c: k8s_client.NewClient(), - Ctx: ctx, - Cancel: cancelFunc, - ChartOverrides: chartOverrides, - }, nil -} - -func (m *K8sTestRun) getChartPath() string { - if m.cfg.ChartPath == "" { - // Use default chart - _, f, _, _ := runtime.Caller(0) - dir := path.Join(path.Dir(f)) - chartPath := path.Join(dir, "../chart") - return chartPath - } - return m.cfg.ChartPath -} - -func (m *K8sTestRun) deployHelm(testName string) error { - overridesYAML, err := yaml.Marshal(m.ChartOverrides) - if err != nil { - return fmt.Errorf("failed to convert overrides to YAML: %w", err) - } - - // Create a temporary file to save the overrides - tmpFile, err := os.CreateTemp("", "helm-overrides-*.yaml") - if err != nil { - return fmt.Errorf("failed to create temp file: %w", err) - } - defer tmpFile.Close() - - // Write the YAML data to the temp file - if _, err = tmpFile.Write(overridesYAML); err != nil { - return fmt.Errorf("failed to write overrides to temp file: %w", err) - } - - // Ensure to flush writes to storage - if err = tmpFile.Sync(); err != nil { - return fmt.Errorf("failed to flush writes to temp file: %w", err) - } - - // Run helm install command - cmd := fmt.Sprintf("helm install %s %s --namespace %s --values %s --timeout 30s", testName, m.getChartPath(), m.cfg.Namespace, tmpFile.Name()) - if m.cfg.Debug { - cmd += " --debug" - } - log.Info().Str("cmd", cmd).Msg("Running helm install...") - return exec.CmdWithStreamFunc(cmd, func(m string) { - fmt.Printf("%s\n", m) - }) -} - -func (m *K8sTestRun) Run() error { - testName := uuid.NewString()[0:8] - tn := []rune(testName) - // replace first letter, since helm does not allow it to start with numbers - tn[0] = 'a' - if err := m.deployHelm(string(tn)); err != nil { - return err - } - jobs, err := m.c.ListJobs(m.Ctx, m.cfg.Namespace, m.cfg.SyncValue) - if err == nil { - for _, j := range jobs.Items { - log.Info().Str("job", j.Name).Str("namespace", m.cfg.Namespace).Msg("Job created") - } - } - // Exit early in detached mode - if m.cfg.DetachedMode { - log.Info().Msg("Running in detached mode, exiting early") - return nil - } - err = m.c.WaitUntilJobsComplete(m.Ctx, m.cfg.Namespace, m.cfg.SyncValue, m.cfg.JobCount) - m.c.PrintPodLogs(m.Ctx, m.cfg.Namespace, m.cfg.SyncValue) - return err -} From 8af2cc78c6e1024940db16e8eedcf0a65bdee074 Mon Sep 17 00:00:00 2001 From: skudasov Date: Fri, 3 Jul 2026 10:37:05 +0200 Subject: [PATCH 2/3] rm secrets manager --- lib/client/secretsmanager.go | 131 ------------------------------ lib/client/secretsmanager_test.go | 67 --------------- lib/go.mod | 16 +--- lib/go.sum | 28 ------- wasp/go.mod | 14 ---- wasp/go.sum | 28 ------- 6 files changed, 1 insertion(+), 283 deletions(-) delete mode 100644 lib/client/secretsmanager.go delete mode 100644 lib/client/secretsmanager_test.go diff --git a/lib/client/secretsmanager.go b/lib/client/secretsmanager.go deleted file mode 100644 index b4706c4b0..000000000 --- a/lib/client/secretsmanager.go +++ /dev/null @@ -1,131 +0,0 @@ -package client - -/* -This client helps us to store and load secrets in AWS Secrets Manager -It also prevents secrets from being printed by mistake -*/ - -import ( - "context" - "encoding" - "encoding/json" - "fmt" - "time" - - "github.com/aws/aws-sdk-go-v2/config" - "github.com/pkg/errors" - "github.com/rs/zerolog" - "github.com/rs/zerolog/log" - - "github.com/aws/aws-sdk-go-v2/service/secretsmanager" -) - -var ( - redacted = "***" - redactedJSON = "{\"key\":\"is_redacted\"}" - redactedTOML = "[Key]\n\nis = redacted" -) - -// AWSSecret is a wrapper preventing accidental printing or marshalling -type AWSSecret string - -// Value is used to return masked secret value -func (s AWSSecret) Value() string { return string(s) } - -// The String method is used to print values passed as an operand -// to any format that accepts a string or to an unformatted printer -// such as Print. -func (s AWSSecret) String() string { return redacted } - -// The GoString method is used to print values passed as an operand -// to a %#v format. -func (s AWSSecret) GoString() string { return redacted } - -// MarshalText encodes the receiver into UTF-8-encoded text and returns the result. -func (s AWSSecret) MarshalText() ([]byte, error) { return []byte(redactedTOML), nil } - -// MarshalJSON Marshaler is the interface implemented by types that -// can marshal themselves into valid JSON. -func (s AWSSecret) MarshalJSON() ([]byte, error) { return []byte(redactedJSON), nil } - -var ( - _ fmt.Stringer = (*AWSSecret)(nil) - _ fmt.GoStringer = (*AWSSecret)(nil) - _ encoding.TextMarshaler = (*AWSSecret)(nil) - _ json.Marshaler = (*AWSSecret)(nil) -) - -// AWSSecretsManager is an AWS Secrets Manager service wrapper -type AWSSecretsManager struct { - Client *secretsmanager.Client - RequestTimeout time.Duration - l zerolog.Logger -} - -// NewAWSSecretsManager create a new connection to AWS Secrets Manager -func NewAWSSecretsManager(requestTimeout time.Duration) (*AWSSecretsManager, error) { - cfg, err := config.LoadDefaultConfig(context.TODO()) - if err != nil { - return nil, fmt.Errorf("unable to load AWS SDK config, %v", err) - } - l := log.Logger.With().Str("Component", "AWSSecretsManager").Logger() - l.Info().Msg("Connecting to AWS Secrets Manager") - return &AWSSecretsManager{ - Client: secretsmanager.NewFromConfig(cfg), - RequestTimeout: requestTimeout, - l: l, - }, nil -} - -// CreateSecret creates a specific secret by key -func (sm *AWSSecretsManager) CreateSecret(key string, val string, override bool) error { - ctx, cancel := context.WithTimeout(context.Background(), sm.RequestTimeout) - defer cancel() - - sm.l.Debug().Str("Key", key).Msg("Creating secret by key") - k := &key - v := &val - _, err := sm.Client.CreateSecret(ctx, &secretsmanager.CreateSecretInput{ - Name: k, - SecretString: v, - ForceOverwriteReplicaSecret: override, - }) - if err != nil { - return errors.Wrapf(err, "failed to create a secret by key") - } - return nil -} - -// GetSecret gets a specific secret by key -func (sm *AWSSecretsManager) GetSecret(key string) (AWSSecret, error) { - ctx, cancel := context.WithTimeout(context.Background(), sm.RequestTimeout) - defer cancel() - - sm.l.Debug().Str("Key", key).Msg("Reading secret by key") - k := &key - out, err := sm.Client.GetSecretValue(ctx, &secretsmanager.GetSecretValueInput{ - SecretId: k, - }) - if err != nil { - return "", errors.Wrapf(err, "failed to read a secret by key") - } - return AWSSecret(*out.SecretString), nil -} - -// RemoveSecret removes a specific secret by key -func (sm *AWSSecretsManager) RemoveSecret(key string, noRecovery bool) error { - ctx, cancel := context.WithTimeout(context.Background(), sm.RequestTimeout) - defer cancel() - - sm.l.Debug().Str("Key", key).Msg("Removing secret by key") - k := &key - b := &noRecovery - _, err := sm.Client.DeleteSecret(ctx, &secretsmanager.DeleteSecretInput{ - SecretId: k, - ForceDeleteWithoutRecovery: b, - }) - if err != nil { - return errors.Wrapf(err, "failed to remove a secret by key") - } - return nil -} diff --git a/lib/client/secretsmanager_test.go b/lib/client/secretsmanager_test.go deleted file mode 100644 index e4679c7a7..000000000 --- a/lib/client/secretsmanager_test.go +++ /dev/null @@ -1,67 +0,0 @@ -package client - -import ( - "encoding/json" - "fmt" - "testing" - "time" - - "github.com/davecgh/go-spew/spew" - "github.com/google/uuid" - "github.com/pelletier/go-toml/v2" - "github.com/stretchr/testify/require" -) - -func TestSecretsPrintMarshal(t *testing.T) { - s := AWSSecret("1") - t.Run("print the whole struct as string", func(t *testing.T) { - //nolint - output := fmt.Sprintf("%s", s) - require.Equal(t, redacted, output) - }) - t.Run("print the whole struct as +v%", func(t *testing.T) { - output := fmt.Sprintf("%+v", s) - require.Equal(t, redacted, output) - }) - t.Run("spew library should not work either", func(t *testing.T) { - output := spew.Sdump(s) - require.Equal(t, "(client.AWSSecret) (len=1) ***", output[:len(output)-1]) - }) - t.Run("marshal the whole struct as JSON", func(t *testing.T) { - d, err := json.Marshal(s) - require.NoError(t, err) - require.Equal(t, redactedJSON, string(d)) - }) - t.Run("marshal the whole struct as TOML results in err", func(t *testing.T) { - // github.com/pelletier/go-toml/v2 since version 2 does not allow any struct to implement MarshalText() - // so it results in error if we try to marshal secrets - _, err := toml.Marshal(s) - require.Error(t, err) - }) -} - -func TestManualSecretsCRUD(t *testing.T) { - t.Skip("Need AWS role to be enabled") - // fill .envrc with AWS auth values and run manually - // export AWS_REGION="us-west-2" - // export AWS_ACCESS_KEY_ID= - // export AWS_SECRET_ACCESS_KEY= - // export AWS_SESSION_TOKEN= - sm, err := NewAWSSecretsManager(1 * time.Minute) - require.NoError(t, err) - - t.Run("basic single value CRUD", func(t *testing.T) { - k := uuid.NewString() - v := uuid.NewString() - t.Cleanup(func() { - err = sm.RemoveSecret(k, true) - require.NoError(t, err) - }) - err = sm.CreateSecret(k, v, true) - require.NoError(t, err) - secret, err := sm.GetSecret(k) - require.NoError(t, err) - require.Equal(t, secret, AWSSecret(v)) - require.Equal(t, v, AWSSecret(v).Value()) - }) -} diff --git a/lib/go.mod b/lib/go.mod index 6c45aa8a9..2e10ed2c9 100644 --- a/lib/go.mod +++ b/lib/go.mod @@ -6,8 +6,6 @@ require ( dario.cat/mergo v1.0.2 github.com/Masterminds/semver/v3 v3.3.0 github.com/avast/retry-go v3.0.0+incompatible - github.com/aws/aws-sdk-go-v2/config v1.28.0 - github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.34.2 github.com/aws/constructs-go/constructs/v10 v10.4.2 github.com/aws/jsii-runtime-go v1.104.0 github.com/barkimedes/go-deepcopy v0.0.0-20220514131651-17c30cfc62df @@ -72,18 +70,6 @@ require ( github.com/VictoriaMetrics/fastcache v1.12.2 // indirect github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137 // indirect github.com/awalterschulze/gographviz v2.0.3+incompatible // indirect - github.com/aws/aws-sdk-go-v2 v1.32.2 // indirect - github.com/aws/aws-sdk-go-v2/credentials v1.17.41 // indirect - github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.17 // indirect - github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.21 // indirect - github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.21 // indirect - github.com/aws/aws-sdk-go-v2/internal/ini v1.8.1 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.0 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.2 // indirect - github.com/aws/aws-sdk-go-v2/service/sso v1.24.2 // indirect - github.com/aws/aws-sdk-go-v2/service/ssooidc v1.28.2 // indirect - github.com/aws/aws-sdk-go-v2/service/sts v1.32.2 // indirect - github.com/aws/smithy-go v1.22.0 // indirect github.com/benbjohnson/clock v1.3.5 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/bits-and-blooms/bitset v1.17.0 // indirect @@ -98,7 +84,7 @@ require ( github.com/cpuguy83/dockercfg v0.3.2 // indirect github.com/crate-crypto/go-ipa v0.0.0-20240724233137-53bbb0ceb27a // indirect github.com/crate-crypto/go-kzg-4844 v1.1.0 // indirect - github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc + github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect github.com/deckarep/golang-set/v2 v2.6.0 // indirect github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 // indirect github.com/distribution/reference v0.6.0 // indirect diff --git a/lib/go.sum b/lib/go.sum index d7474d92d..22f60384a 100644 --- a/lib/go.sum +++ b/lib/go.sum @@ -28,38 +28,10 @@ github.com/avast/retry-go v3.0.0+incompatible h1:4SOWQ7Qs+oroOTQOYnAHqelpCO0biHS github.com/avast/retry-go v3.0.0+incompatible/go.mod h1:XtSnn+n/sHqQIpZ10K1qAevBhOOCWBLXXy3hyiqqBrY= github.com/awalterschulze/gographviz v2.0.3+incompatible h1:9sVEXJBJLwGX7EQVhLm2elIKCm7P2YHFC8v6096G09E= github.com/awalterschulze/gographviz v2.0.3+incompatible/go.mod h1:GEV5wmg4YquNw7v1kkyoX9etIk8yVmXj+AkDHuuETHs= -github.com/aws/aws-sdk-go-v2 v1.32.2 h1:AkNLZEyYMLnx/Q/mSKkcMqwNFXMAvFto9bNsHqcTduI= -github.com/aws/aws-sdk-go-v2 v1.32.2/go.mod h1:2SK5n0a2karNTv5tbP1SjsX0uhttou00v/HpXKM1ZUo= -github.com/aws/aws-sdk-go-v2/config v1.28.0 h1:FosVYWcqEtWNxHn8gB/Vs6jOlNwSoyOCA/g/sxyySOQ= -github.com/aws/aws-sdk-go-v2/config v1.28.0/go.mod h1:pYhbtvg1siOOg8h5an77rXle9tVG8T+BWLWAo7cOukc= -github.com/aws/aws-sdk-go-v2/credentials v1.17.41 h1:7gXo+Axmp+R4Z+AK8YFQO0ZV3L0gizGINCOWxSLY9W8= -github.com/aws/aws-sdk-go-v2/credentials v1.17.41/go.mod h1:u4Eb8d3394YLubphT4jLEwN1rLNq2wFOlT6OuxFwPzU= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.17 h1:TMH3f/SCAWdNtXXVPPu5D6wrr4G5hI1rAxbcocKfC7Q= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.17/go.mod h1:1ZRXLdTpzdJb9fwTMXiLipENRxkGMTn1sfKexGllQCw= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.21 h1:UAsR3xA31QGf79WzpG/ixT9FZvQlh5HY1NRqSHBNOCk= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.21/go.mod h1:JNr43NFf5L9YaG3eKTm7HQzls9J+A9YYcGI5Quh1r2Y= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.21 h1:6jZVETqmYCadGFvrYEQfC5fAQmlo80CeL5psbno6r0s= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.21/go.mod h1:1SR0GbLlnN3QUmYaflZNiH1ql+1qrSiB2vwcJ+4UM60= -github.com/aws/aws-sdk-go-v2/internal/ini v1.8.1 h1:VaRN3TlFdd6KxX1x3ILT5ynH6HvKgqdiXoTxAF4HQcQ= -github.com/aws/aws-sdk-go-v2/internal/ini v1.8.1/go.mod h1:FbtygfRFze9usAadmnGJNc8KsP346kEe+y2/oyhGAGc= -github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.0 h1:TToQNkvGguu209puTojY/ozlqy2d/SFNcoLIqTFi42g= -github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.0/go.mod h1:0jp+ltwkf+SwG2fm/PKo8t4y8pJSgOCO4D8Lz3k0aHQ= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.2 h1:s7NA1SOw8q/5c0wr8477yOPp0z+uBaXBnLE0XYb0POA= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.2/go.mod h1:fnjjWyAW/Pj5HYOxl9LJqWtEwS7W2qgcRLWP+uWbss0= -github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.34.2 h1:Rrqru2wYkKQCS2IM5/JrgKUQIoNTqA6y/iuxkjzxC6M= -github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.34.2/go.mod h1:QuCURO98Sqee2AXmqDNxKXYFm2OEDAVAPApMqO0Vqnc= -github.com/aws/aws-sdk-go-v2/service/sso v1.24.2 h1:bSYXVyUzoTHoKalBmwaZxs97HU9DWWI3ehHSAMa7xOk= -github.com/aws/aws-sdk-go-v2/service/sso v1.24.2/go.mod h1:skMqY7JElusiOUjMJMOv1jJsP7YUg7DrhgqZZWuzu1U= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.28.2 h1:AhmO1fHINP9vFYUE0LHzCWg/LfUWUF+zFPEcY9QXb7o= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.28.2/go.mod h1:o8aQygT2+MVP0NaV6kbdE1YnnIM8RRVQzoeUH45GOdI= -github.com/aws/aws-sdk-go-v2/service/sts v1.32.2 h1:CiS7i0+FUe+/YY1GvIBLLrR/XNGZ4CtM1Ll0XavNuVo= -github.com/aws/aws-sdk-go-v2/service/sts v1.32.2/go.mod h1:HtaiBI8CjYoNVde8arShXb94UbQQi9L4EMr6D+xGBwo= github.com/aws/constructs-go/constructs/v10 v10.4.2 h1:+hDLTsFGLJmKIn0Dg20vWpKBrVnFrEWYgTEY5UiTEG8= github.com/aws/constructs-go/constructs/v10 v10.4.2/go.mod h1:cXsNCKDV+9eR9zYYfwy6QuE4uPFp6jsq6TtH1MwBx9w= github.com/aws/jsii-runtime-go v1.104.0 h1:651Sh6J2FtatfnVzlOQ3/Ye1WWPAseZ6E/tSQxEKdSI= github.com/aws/jsii-runtime-go v1.104.0/go.mod h1:7ZmQXxV0AAhhvv/GaHX4n6zbgA1tSRVdnQYAJbIhXHk= -github.com/aws/smithy-go v1.22.0 h1:uunKnWlcoL3zO7q+gG2Pk53joueEOsnNB28QdMsmiMM= -github.com/aws/smithy-go v1.22.0/go.mod h1:irrKGvNn1InZwb2d7fkIRNucdfwR8R+Ts3wxYa/cJHg= github.com/barkimedes/go-deepcopy v0.0.0-20220514131651-17c30cfc62df h1:GSoSVRLoBaFpOOds6QyY1L8AX7uoY+Ln3BHc22W40X0= github.com/barkimedes/go-deepcopy v0.0.0-20220514131651-17c30cfc62df/go.mod h1:hiVxq5OP2bUGBRNS3Z/bt/reCLFNbdcST6gISi1fiOM= github.com/benbjohnson/clock v1.3.5 h1:VvXlSJBzZpA/zum6Sj74hxwYI2DIxRWuNIoXAzHZz5o= diff --git a/wasp/go.mod b/wasp/go.mod index 7735f710a..126e4488e 100644 --- a/wasp/go.mod +++ b/wasp/go.mod @@ -115,22 +115,8 @@ require ( github.com/armon/go-metrics v0.4.1 // indirect github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 // indirect github.com/aws/aws-sdk-go v1.55.6 // indirect - github.com/aws/aws-sdk-go-v2 v1.32.7 // indirect - github.com/aws/aws-sdk-go-v2/config v1.28.6 // indirect - github.com/aws/aws-sdk-go-v2/credentials v1.17.47 // indirect - github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.21 // indirect - github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.26 // indirect - github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.26 // indirect - github.com/aws/aws-sdk-go-v2/internal/ini v1.8.1 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.1 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.7 // indirect - github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.34.2 // indirect - github.com/aws/aws-sdk-go-v2/service/sso v1.24.7 // indirect - github.com/aws/aws-sdk-go-v2/service/ssooidc v1.28.6 // indirect - github.com/aws/aws-sdk-go-v2/service/sts v1.33.2 // indirect github.com/aws/constructs-go/constructs/v10 v10.4.2 // indirect github.com/aws/jsii-runtime-go v1.104.0 // indirect - github.com/aws/smithy-go v1.22.1 // indirect github.com/bboreham/go-loser v0.0.0-20230920113527-fcc2c21820a3 // indirect github.com/benbjohnson/clock v1.3.5 // indirect github.com/blang/semver/v4 v4.0.0 // indirect diff --git a/wasp/go.sum b/wasp/go.sum index 79d6f5704..db5c1b0e4 100644 --- a/wasp/go.sum +++ b/wasp/go.sum @@ -75,38 +75,10 @@ github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 h1:DklsrG3d github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2/go.mod h1:WaHUgvxTVq04UNunO+XhnAqY/wQc+bxr74GqbsZ/Jqw= github.com/aws/aws-sdk-go v1.55.6 h1:cSg4pvZ3m8dgYcgqB97MrcdjUmZ1BeMYKUxMMB89IPk= github.com/aws/aws-sdk-go v1.55.6/go.mod h1:eRwEWoyTWFMVYVQzKMNHWP5/RV4xIUGMQfXQHfHkpNU= -github.com/aws/aws-sdk-go-v2 v1.32.7 h1:ky5o35oENWi0JYWUZkB7WYvVPP+bcRF5/Iq7JWSb5Rw= -github.com/aws/aws-sdk-go-v2 v1.32.7/go.mod h1:P5WJBrYqqbWVaOxgH0X/FYYD47/nooaPOZPlQdmiN2U= -github.com/aws/aws-sdk-go-v2/config v1.28.6 h1:D89IKtGrs/I3QXOLNTH93NJYtDhm8SYa9Q5CsPShmyo= -github.com/aws/aws-sdk-go-v2/config v1.28.6/go.mod h1:GDzxJ5wyyFSCoLkS+UhGB0dArhb9mI+Co4dHtoTxbko= -github.com/aws/aws-sdk-go-v2/credentials v1.17.47 h1:48bA+3/fCdi2yAwVt+3COvmatZ6jUDNkDTIsqDiMUdw= -github.com/aws/aws-sdk-go-v2/credentials v1.17.47/go.mod h1:+KdckOejLW3Ks3b0E3b5rHsr2f9yuORBum0WPnE5o5w= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.21 h1:AmoU1pziydclFT/xRV+xXE/Vb8fttJCLRPv8oAkprc0= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.21/go.mod h1:AjUdLYe4Tgs6kpH4Bv7uMZo7pottoyHMn4eTcIcneaY= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.26 h1:I/5wmGMffY4happ8NOCuIUEWGUvvFp5NSeQcXl9RHcI= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.26/go.mod h1:FR8f4turZtNy6baO0KJ5FJUmXH/cSkI9fOngs0yl6mA= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.26 h1:zXFLuEuMMUOvEARXFUVJdfqZ4bvvSgdGRq/ATcrQxzM= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.26/go.mod h1:3o2Wpy0bogG1kyOPrgkXA8pgIfEEv0+m19O9D5+W8y8= -github.com/aws/aws-sdk-go-v2/internal/ini v1.8.1 h1:VaRN3TlFdd6KxX1x3ILT5ynH6HvKgqdiXoTxAF4HQcQ= -github.com/aws/aws-sdk-go-v2/internal/ini v1.8.1/go.mod h1:FbtygfRFze9usAadmnGJNc8KsP346kEe+y2/oyhGAGc= -github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.1 h1:iXtILhvDxB6kPvEXgsDhGaZCSC6LQET5ZHSdJozeI0Y= -github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.1/go.mod h1:9nu0fVANtYiAePIBh2/pFUSwtJ402hLnp854CNoDOeE= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.7 h1:8eUsivBQzZHqe/3FE+cqwfH+0p5Jo8PFM/QYQSmeZ+M= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.7/go.mod h1:kLPQvGUmxn/fqiCrDeohwG33bq2pQpGeY62yRO6Nrh0= -github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.34.2 h1:Rrqru2wYkKQCS2IM5/JrgKUQIoNTqA6y/iuxkjzxC6M= -github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.34.2/go.mod h1:QuCURO98Sqee2AXmqDNxKXYFm2OEDAVAPApMqO0Vqnc= -github.com/aws/aws-sdk-go-v2/service/sso v1.24.7 h1:rLnYAfXQ3YAccocshIH5mzNNwZBkBo+bP6EhIxak6Hw= -github.com/aws/aws-sdk-go-v2/service/sso v1.24.7/go.mod h1:ZHtuQJ6t9A/+YDuxOLnbryAmITtr8UysSny3qcyvJTc= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.28.6 h1:JnhTZR3PiYDNKlXy50/pNeix9aGMo6lLpXwJ1mw8MD4= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.28.6/go.mod h1:URronUEGfXZN1VpdktPSD1EkAL9mfrV+2F4sjH38qOY= -github.com/aws/aws-sdk-go-v2/service/sts v1.33.2 h1:s4074ZO1Hk8qv65GqNXqDjmkf4HSQqJukaLuuW0TpDA= -github.com/aws/aws-sdk-go-v2/service/sts v1.33.2/go.mod h1:mVggCnIWoM09jP71Wh+ea7+5gAp53q+49wDFs1SW5z8= github.com/aws/constructs-go/constructs/v10 v10.4.2 h1:+hDLTsFGLJmKIn0Dg20vWpKBrVnFrEWYgTEY5UiTEG8= github.com/aws/constructs-go/constructs/v10 v10.4.2/go.mod h1:cXsNCKDV+9eR9zYYfwy6QuE4uPFp6jsq6TtH1MwBx9w= github.com/aws/jsii-runtime-go v1.104.0 h1:651Sh6J2FtatfnVzlOQ3/Ye1WWPAseZ6E/tSQxEKdSI= github.com/aws/jsii-runtime-go v1.104.0/go.mod h1:7ZmQXxV0AAhhvv/GaHX4n6zbgA1tSRVdnQYAJbIhXHk= -github.com/aws/smithy-go v1.22.1 h1:/HPHZQ0g7f4eUeK6HKglFz8uwVfZKgoI25rb/J+dnro= -github.com/aws/smithy-go v1.22.1/go.mod h1:irrKGvNn1InZwb2d7fkIRNucdfwR8R+Ts3wxYa/cJHg= github.com/bboreham/go-loser v0.0.0-20230920113527-fcc2c21820a3 h1:6df1vn4bBlDDo4tARvBm7l6KA9iVMnE3NWizDeWSrps= github.com/bboreham/go-loser v0.0.0-20230920113527-fcc2c21820a3/go.mod h1:CIWtjkly68+yqLPbvwwR/fjNJA/idrtULjZWh2v1ys0= github.com/benbjohnson/clock v1.3.5 h1:VvXlSJBzZpA/zum6Sj74hxwYI2DIxRWuNIoXAzHZz5o= From 5a9fe9250ecaafb29cc11819dca5f8963a2799ac Mon Sep 17 00:00:00 2001 From: skudasov Date: Fri, 3 Jul 2026 10:40:17 +0200 Subject: [PATCH 3/3] rm k8s-test-runner refs --- .github/dependabot.yml | 9 +-------- .github/workflows/linters.yml | 1 - .github/workflows/test.yaml | 3 --- .prettierignore | 1 - 4 files changed, 1 insertion(+), 13 deletions(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index c799dff30..0598890fc 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -37,11 +37,4 @@ updates: interval: weekly open-pull-requests-limit: 10 labels: - - 'dependencies' - - package-ecosystem: gomod - directory: '/k8s-test-runner' - schedule: - interval: weekly - open-pull-requests-limit: 10 - labels: - - 'dependencies' + - 'dependencies' \ No newline at end of file diff --git a/.github/workflows/linters.yml b/.github/workflows/linters.yml index 17dfad740..bf701d4ce 100644 --- a/.github/workflows/linters.yml +++ b/.github/workflows/linters.yml @@ -13,7 +13,6 @@ jobs: - parrot - wasp - seth - - k8s-test-runner - lib - tools/workflowresultparser - tools/asciitable diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index af75c18b2..4b4bc20c5 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -34,9 +34,6 @@ jobs: - path: wasp vm: ubuntu-latest regex: TestBenchSpy - - path: k8s-test-runner - vm: ubuntu-latest - regex: ./... - path: parrot vm: ubuntu-latest regex: ./... diff --git a/.prettierignore b/.prettierignore index f17e00f4f..0601e91f6 100644 --- a/.prettierignore +++ b/.prettierignore @@ -3,7 +3,6 @@ charts/**/templates/**/*.yaml charts/**/values.yml charts/**/values.yaml charts/**/README.md -k8s-test-runner/chart/**/*.yaml node_modules/ index.yaml wasp/**