{"id":21475116,"url":"https://github.com/snapp-incubator/chaos-operator","last_synced_at":"2025-07-15T09:32:08.942Z","repository":{"id":223442390,"uuid":"743663531","full_name":"snapp-incubator/chaos-operator","owner":"snapp-incubator","description":"A kubernetes operator for chaos engineering","archived":false,"fork":false,"pushed_at":"2024-09-07T23:17:31.000Z","size":112,"stargazers_count":6,"open_issues_count":0,"forks_count":1,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-06-12T08:53:01.230Z","etag":null,"topics":["chaos","chaos-engineering","chaos-operator","k8s","kubernetes","kubernetes-operator","operator","testing","testing-tools","toxiproxy"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/snapp-incubator.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-01-15T18:06:37.000Z","updated_at":"2024-09-10T11:15:28.000Z","dependencies_parsed_at":"2024-09-08T00:26:00.755Z","dependency_job_id":"6f6c62ab-69a0-49a0-82b8-bf4978166fb7","html_url":"https://github.com/snapp-incubator/chaos-operator","commit_stats":null,"previous_names":["snapp-incubator/chaos-operator"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/snapp-incubator/chaos-operator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/snapp-incubator%2Fchaos-operator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/snapp-incubator%2Fchaos-operator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/snapp-incubator%2Fchaos-operator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/snapp-incubator%2Fchaos-operator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/snapp-incubator","download_url":"https://codeload.github.com/snapp-incubator/chaos-operator/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/snapp-incubator%2Fchaos-operator/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265425320,"owners_count":23762900,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["chaos","chaos-engineering","chaos-operator","k8s","kubernetes","kubernetes-operator","operator","testing","testing-tools","toxiproxy"],"created_at":"2024-11-23T10:37:32.801Z","updated_at":"2025-07-15T09:32:08.634Z","avatar_url":"https://github.com/snapp-incubator.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# A Toxiproxy Chaos Operator for simulating chaos experiments on Kubernetes\nThe Chaos Operator is designed to simulate chaos within applications and Kubernetes infrastructure, utilizing Toxiproxy under the hood. Its primary objective is to automate the installation of Toxiproxy and persist its configuration within the Kubernetes cluster.\nWith Chaos Operator, you can conveniently simulate various abnormalities in a controlled way that might occur in reality during development, testing, and production environments. This allows you to find potential problems in the system. Currently, it offers latency and timeout types of fault simulation.\n\n\n## How the Chaos Operator Works\nThe Chaos Operator enables you to create proxies with various toxics that mimic real-world network issues. It creates proxy instances that sit between your application and the actual service, intercepting and controlling the network traffic. Toxics are components that introduce various network conditions or issues, simulating problems like latency, timeouts, and connection issues. Toxics are applied to specific proxies, allowing you to selectively introduce these issues for testing.\n\n## Getting Started\n\n* Install the chaos infrastructure components (RBAC, CRDs) and the Operator \n* Create a NetworkChaos custom resource to simulating the chaos\n\n## Installation\n\n#### Install Chaos Operator using Helm\n\n[Helm](https://helm.sh) must be installed to use the charts. Please refer to\nHelm's [documentation](https://helm.sh/docs) to get started.\n\nOnce Helm has been set up correctly, add the repo as follows:\n\n```shell\nhelm repo add chaos-operator https://snapp-incubator.github.io/chaos-operator\n```\n\nIf you had already added this repo earlier, run `helm repo update` to retrieve\nthe latest versions of the packages. You can then run `helm search repo\nchaos-operator` to see the charts.\n\nTo install the chaos-operator chart:\n\n```shell\nhelm install chaos-operator chaos-operator/chaos-operator\n```\n\nTo uninstall the chart:\n\n```shell\nhelm delete chaos-operator\n```\n\n\n#### Create the namespace to install Chaos Operator\n\n```\nkubectl create ns my-chaos-operator\n```\n\n#### Verify the installation\n\n```bash\nkubectl get po -n my-chaos-operator\nNAME                                                       READY   STATUS    RESTARTS          AGE\nchaos-operator-controller-manager-694fcd95fc-r6kjb         2/2     Running   0                 1d\n```\n```bash\nkubectl get sa -n chaos\nNAME                                      SECRETS   AGE\nchaos-operator-controller-manager         2         1d\n```\n\n## How to use\nTo simulate a fault for your service, you need to create a Chaos Proxy with a NetworkChaos object. Create a new YAML file to define a Chaos Proxy and add configuration parameters based on the type of Chaos you want to create.\n\n```yaml\napiVersion: \"chaos.snappcloud.io/v1alpha1\"\nkind: NetworkChaos\nmetadata:\n  name: network-chaos-example\n  namespace: network-chaos-example\nspec:\n  upstream:   \n    name: my-upstream-svc\n    port: \"8080\"\n  enabled: true\n  stream: upstream\n  latencyToxic:\n   latency: 7000\n   jitter: 1\n   probabilty: 1.0\n  timeoutToxic:\n   timeout: 2000\n    probabilty: 1.0\n```\nThis example defines a proxy targeting the my-upstream-svc service with port 8080 under the network-chaos-example namespace.\nAfter creating the NetworkChaos object, a proxy is created and sits between your application and the my-upstream-svc service:\n\n```bash\noc get svc \nNAME                                     TYPE        CLUSTER-IP       EXTERNAL-IP   PORT(S)     AGE\nnetwork-chaos-example-my-upstream-svc    ClusterIP   172.30.115.120   \u003cnone\u003e        38861/TCP   2h\n```\nNow, you can request the network-chaos-example-my-upstream-svc service, and you will see the request with a faulty response.\n\n## Contributing\nContributions are welcomed and you can contribute by raising issues, improving the documentation, contributing to the core framework and tooling, etc.\n\n## License\n\nCopyright 2024.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsnapp-incubator%2Fchaos-operator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsnapp-incubator%2Fchaos-operator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsnapp-incubator%2Fchaos-operator/lists"}