Skip to content

Commit

Permalink
Add flow diagram (#9)
Browse files Browse the repository at this point in the history
* Added flow diagram & config field descriptions.

Signed-off-by: vkulkarni3 <[email protected]>

Co-authored-by: vkulkarni3 <[email protected]>
  • Loading branch information
virajrk and vkulkarni3 committed Apr 29, 2022
1 parent 23fdbb3 commit 101f949
Show file tree
Hide file tree
Showing 6 changed files with 93 additions and 5 deletions.
Binary file added Docs/FlowDiagram.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
79 changes: 79 additions & 0 deletions Docs/flow.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
# Flippy Operator Flow

![Block Diagram](FlowDiagram.jpeg)
<HR>

### Description for Flippy Config

##### 1. ProcessFilter:
This section dictates condition(s) on which pod(s)/deployment(s) filtered across kubernetes cluster.<br>
Example -
```
ProcessFilter:
Containers:
- istio-proxy
Labels:
"istio-injection": "enabled"
Annotations:
"sidecar.istio.io/inject": "true"
```
This will filter pod(s)/deployment(s) which has container named `istio-proxy`, contains label `"istio-injection": "enabled"` and has annotation `"sidecar.istio.io/inject": "true"`
##### 2. ImageList
This section dictates desire docker image(s). Flippy will mark deployment(s)/pod(s) for restart if container image doesn't match to any thing from list for condition specified in [#1](#1-processfilter).<br>
Example -
```
ImageList:
- docker.intuit.com/flippy/sample:abc
- docker.intuit.com/flippy/sample:pqr
```
##### 3. Preconditions:
This section dictates wait condition before processing any restart. <br>
Example -
```
Preconditions:
- K8S:
Type: Deployment
Name: istiod
Namespace: istio-system
StatusCheckConfig:
CheckStatus: true
MaxRetry: 10
RetryDuration: 30
```
This will wait & check `istiod` deployment under `istio-system` to be healthy before proceeding any restart.
##### 4. PostFilterRestarts:
This section dictates action which needs to be performed before restarting any deployment(s) from generated list. <br>
Example -
```
PostFilterRestarts:
- K8S:
Type: Deployment
Name: istio-ingressgateway
Namespace: istio-system
StatusCheckConfig:
CheckStatus: true
MaxRetry: 10
RetryDuration: 30
```
This will restart `istio-ingressgateway` deployment under `istio-system` namespace before processing any restart(s) from generated list.
##### 5. RestartObjects:
This section dictates which kubernetes object(s) need to be processed.<br>
Example -
```
RestartObjects:
- Type: Deployment
StatusCheckConfig:
CheckStatus: false
MaxRetry: 10
RetryDuration: 30
- Type: ArgoRollout
StatusCheckConfig:
CheckStatus: false
MaxRetry: 10
RetryDuration: 30
```
This will watch all [Kubernetes Deployment](https://kubernetes.io/docs/concepts/workloads/controllers/deployment/) and [Argo Rollouts](https://argoproj.github.io/argo-rollouts/) which matches [#1](#1-processfilter) & [#2](#2-imagelist)

<hr>

**Feel free to refer [Sample Flippy Config](../sample/sample.yaml).**
2 changes: 2 additions & 0 deletions Docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,5 @@

#### [Examples Installation](install.md)

#### [Flippy Operator Flow](flow.md)

2 changes: 2 additions & 0 deletions Docs/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,5 +61,7 @@ Example - <br>
<HR>

Feel free to refer sample [Example deployment](../sample/deployment.yaml).

Feel free to refer sample [Flippy Config](../sample/sample.yaml)


8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Flippy
[![Go Report Card](https://goreportcard.com/badge/github.com/keikoproj/flippy)](https://goreportcard.com/report/github.com/keikoproj/flippy)
[![codecov](https://codecov.io/gh/keikoproj/flippy/branch/master/graph/badge.svg)](https://codecov.io/gh/keikoproj/flippy)

Flippy is a kubernetes operator which restarts deployments that are Service Mesh enabled if the sidecar container’s docker image doesn’t match the expected docker image. This is useful for forcing Istio data plane upgrades after a control plane upgrade if required.

Expand All @@ -17,6 +18,12 @@ CRD have more wider filtering which can be used to solve more generic solutions

![Block Diagram](Docs/BlockDiagram.jpeg)

### Demo

Flippy demoed in Service Mesh end-user community. Please feel free to [watch the demo](https://youtu.be/Ll68AF3NZjw).

We demoed the old version which was based upon [Kubernetes ConfigMap](https://kubernetes.io/docs/concepts/configuration/configmap/). We have improved over time and provided more advanced filters and support with [Kubernetes CRD-based](https://kubernetes.io/docs/tasks/access-kubernetes-api/extend-api-custom-resource-definitions) approach.

## [Docs](./Docs/index.md)

## Who uses Flippy?
Expand All @@ -28,4 +35,3 @@ Organizations below are **officially** using Flippy. Please send a PR with your

## Contributing
Refer to [Contributing doc](./Docs/contributing.md) <br>

7 changes: 3 additions & 4 deletions sample/sample.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
apiVersion: keikoproj.intuit.com/v1
apiVersion: keikoproj.io/v1
kind: FlippyConfig
metadata:
name: flippy-sample
namespace: istio-system
spec:
# Add fields here
foo: bar1
ImageList:
- docker.intuit.com/strategic/services/service-mesh/service/proxyv2:intuit_master-1.10.4-01599
- docker.intuit.com/strategic/services/service-mesh/service/proxyv2:intuit_master-1.10.4-foo
- docker.intuit.com/flippy/sample:abc
- docker.intuit.com/flippy/sample:pqr
PostFilterRestarts:
- K8S:
Type: Deployment
Expand Down

0 comments on commit 101f949

Please sign in to comment.