Skip to content

Commit

Permalink
docs: improve documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
Tchoupinax committed May 10, 2024
1 parent 61146f8 commit 6478f44
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 34 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ We have a deployment called `api` with labels `app=api` and `kubernetes.io/name=

Additional documentations:

- [Service is not the only resource that target pods](docs/resources-targeting-pods.md )
- [Managed resources](docs/managed-resources.md)

## Zero downtime testing

Expand Down
30 changes: 30 additions & 0 deletions docs/managed-resources.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Managed resourced

We identify a set of resources that are matching or are linked to the pods we are trying to migrate.

- #### Keda
-`ScaledObject`: This resources target the deployment (`.spec.scaleTargetRef.name`) and not pods. However, we don't want Keda to perfom operations during the procedure. That's why we pause the keda scaled object during the operation. This is done with an annotation meant for that purpose by keda.sh. (see `keda.go`).

- #### Kubernetes
- 🛑 `PodDisruptionBudget`

- #### Istio
- 🛑 `AuthorizationPolicy`
-`DestinationRule`: like Kubernetes services, destination rules match pods with matching labels. We repeat the same operation we did for service for the replacement.
- 🛑 `VirtualService` (host match the DNS name, means it match the deployment name [docs](https://istio.io/latest/docs/reference/config/networking/virtual-service/#VirtualService))

- #### Monitoring
- 🛑 `PrometheusRule`: (rules could match pod or deployment in the query)
- 🛑 `PodMonitor`: matches pods by labels (`.spec.selector.matchLabels`)


```bash
# Display existing resources in the cluster
kubectl api-resources --verbs=list --namespaced -o name
```

export KUBERNETES_RESOURCE=ScaledObject
export NAME=
export NAMESPACE=

kubectl get $KUBERNETES_RESOURCE $NAME -n $NAMESPACE -o yaml | yq '.spec.selector.matchLabels'
33 changes: 0 additions & 33 deletions docs/resources-targeting-pods.md

This file was deleted.

0 comments on commit 6478f44

Please sign in to comment.