Skip to content

Commit

Permalink
Merge pull request #281 from dnascimento/crd
Browse files Browse the repository at this point in the history
Custom Resource Definition (CRD) and dynamic reload
  • Loading branch information
seeker89 committed Jul 14, 2020
2 parents 32c9bd7 + 9dd9ec4 commit a3bbba5
Show file tree
Hide file tree
Showing 19 changed files with 1,157 additions and 107 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Expand Up @@ -105,3 +105,6 @@ venv.bak/

# mypy
.mypy_cache/

# NPM
node_modules/
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -61,7 +61,7 @@ powerfulseal autonomous --policy-file ./policy.yaml

## Installing

- [docker hub](https://hub.docker.com/r/bloomberg/powerfulseal/tags): `docker pull bloomberg/powerfulseal:3.0.0rc9`
- [docker hub](https://hub.docker.com/r/bloomberg/powerfulseal/tags): `docker pull bloomberg/powerfulseal:3.0.0rc10`
- [pip](https://pypi.org/project/powerfulseal/): `pip install powerfulseal`


Expand Down
4 changes: 2 additions & 2 deletions docs/2_getting-started.md
Expand Up @@ -85,7 +85,7 @@ For help, just type `help`. For more information about the modes, see our [docs
For each [release](https://github.com/bloomberg/powerfulseal/releases) a `docker` image is built and published to the [docker hub](https://hub.docker.com/r/bloomberg/powerfulseal/tags).

```sh
docker pull bloomberg/powerfulseal:3.0.0rc9
docker pull bloomberg/powerfulseal:3.0.0rc10
```

### Run docker image
Expand All @@ -97,7 +97,7 @@ Below is an example of using the `-v` flag to inject your local `kubeconfig` to
```sh
docker run -it \
-v ~/.kube:/root/.kube \
bloomberg/powerfulseal:3.0.0rc9 \
bloomberg/powerfulseal:3.0.0rc10 \
interactive
```

Expand Down
44 changes: 44 additions & 0 deletions docs/crd.md
@@ -0,0 +1,44 @@
---
layout: default
title: Kubernetes Custom Resources
nav_order: 2
description: ""
permalink: /crd
parent: Setup
---

## Kubernetes Custom Resource Definition
{: .no_toc }

## Table of contents
{: .no_toc .text-delta }

1. TOC
{:toc}

---

`Powerfulseal` can be deployed on Kubernetes cluster to perform random chaos the application services.
It also allows teams to define scenarios in their own namespace using [Kubernetes Custom Resources (CRD)](https://kubernetes.io/docs/concepts/extend-kubernetes/api-extension/custom-resources/).
Powerfulseal adds all CRD-defined scenarios to the ones defined in the policy configuration file (optional).
*Scenarios are reloaded after the execution of the current run.*

## Kubernetes Installation

- Apply the rbac.yml (choose the appropriate namespace) to setup a service account with sufficient privileges

`kubectl apply -f kubernetes/rbac.yml`

- Deploy powerfulseal
`kubectl apply -f kubernetes/powerfulseal.yml`

## CRD Installation

- Create the Custom Resource Definition
`kubectl apply -f kubernetes/crd.yml`

## Deploy Example

An example scenario is provided. This creates a sandbox namespace with 2 nginx replicas and ensures their resilience
`kubectl apply -f kubernetes/sandbox.yml`
`kubectl apply -f kubernetes/sandbox_scenario.yml`
2 changes: 1 addition & 1 deletion docs/policies/kubectl.md
Expand Up @@ -66,7 +66,7 @@ scenarios:
spec:
containers:
- name: powerfulseal
image: bloomberg/powerfulseal:3.0.0rc9
image: bloomberg/powerfulseal:3.0.0rc10
args:
- autonomous
- --policy-file=/policy.yml
Expand Down

0 comments on commit a3bbba5

Please sign in to comment.