Skip to content

Commit

Permalink
feat: Added Tolerations to docs (#118)
Browse files Browse the repository at this point in the history
  • Loading branch information
diegolagospagopa authored Jul 9, 2024
1 parent c4c4fbb commit 17eccd4
Show file tree
Hide file tree
Showing 8 changed files with 42 additions and 23 deletions.
31 changes: 28 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ version: 1.0.0
appVersion: 1.0.0
dependencies:
- name: microservice-chart
version: 1.19.0
version: 5.9.1
repository: "https://pagopa.github.io/aks-microservice-chart-blueprint"
EOF
```
Expand Down Expand Up @@ -125,7 +125,7 @@ K8s:

- Reloader of other tools that allow to restar the pod in case of some of the config map or secret are changed

## 🚀 Functionality & Values keys/Yaml chart configuration properties (values.yaml)
## 📑 Functionality & Values keys/Yaml chart configuration properties (values.yaml)

see [README/Microservice Chart configuration](charts/microservice-chart/README.md) to understand how to use the values.

Expand Down Expand Up @@ -257,7 +257,7 @@ This volume use a pvc to persist the data
minAvailable: 0
```

### `affinity (HA)`
### `Affinity/HA (nodeAffinity & podAntiAffinity)`

This snippet allows to install pod into different nodes, created in different AZ's

Expand Down Expand Up @@ -287,6 +287,31 @@ This snippet allows to install pod into different nodes, created in different AZ
topologyKey: topology.kubernetes.io/zone
```

This code snippet in AKS forces the pods not to be all in the same node but to distribute themselves as much as possible in nodes created in different AZs, this is not blocking but only a desire, in fact if it is not possible the pods will still be deployed inside a node

```yaml
affinity:
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 100
podAffinityTerm:
labelSelector:
matchLabels:
aadpodidbinding: blueprint-pod-identity
namespaces: ["blueprint"]
topologyKey: topology.kubernetes.io/zone
```

### Tolerations

```yaml
tolerations:
- effect: "NoSchedule"
key: "paymentWalletOnly"
operator: "Equal"
value: "true"
```

### Probe: Liveness, Readiness, Starup

#### `livenessProbe`
Expand Down
2 changes: 1 addition & 1 deletion charts/microservice-chart/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# microservice-chart

![Version: 5.9.0](https://img.shields.io/badge/Version-5.9.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.0.0](https://img.shields.io/badge/AppVersion-0.0.0-informational?style=flat-square)
![Version: 5.9.1](https://img.shields.io/badge/Version-5.9.1-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.0.0](https://img.shields.io/badge/AppVersion-0.0.0-informational?style=flat-square)

A Helm chart for PagoPA microservice

Expand Down
6 changes: 3 additions & 3 deletions tests/v5-java-helm-complete-test-bar/helm/Chart.lock
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
dependencies:
- name: microservice-chart
repository: file://../../../charts/microservice-chart
version: 5.9.0
digest: sha256:8890aa322d3ea0ce725bcbff2f9b243037b2fec73a6eea690ff7d5673ecf8275
generated: "2024-05-22T15:46:19.905526+02:00"
version: 5.9.1
digest: sha256:16387a60e66fc6d5437dbd006ca32f917f50cbf9f8e16d8afd3a9790e7caddc4
generated: "2024-06-12T19:30:53.77837+02:00"
2 changes: 1 addition & 1 deletion tests/v5-java-helm-complete-test-bar/helm/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ version: 1.0.0
appVersion: 1.0.0
dependencies:
- name: microservice-chart
version: 5.9.0
version: 5.9.1
repository: file://../../../charts/microservice-chart
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,11 @@ microservice-chart:

# nodeSelector: {}

# tolerations: []
tolerations:
- effect: "NoSchedule"
key: "paymentWalletOnly"
operator: "Equal"
value: "true"

affinity:
nodeAffinity:
Expand All @@ -165,11 +169,6 @@ microservice-chart:
operator: In
values:
- user
- matchExpressions:
- key: elastic
operator: In
values:
- eck
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 100
Expand Down
6 changes: 3 additions & 3 deletions tests/v5-java-helm-complete-test-foo/helm/Chart.lock
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
dependencies:
- name: microservice-chart
repository: file://../../../charts/microservice-chart
version: 5.9.0
digest: sha256:8890aa322d3ea0ce725bcbff2f9b243037b2fec73a6eea690ff7d5673ecf8275
generated: "2024-05-22T15:47:51.972745+02:00"
version: 5.9.1
digest: sha256:16387a60e66fc6d5437dbd006ca32f917f50cbf9f8e16d8afd3a9790e7caddc4
generated: "2024-06-12T22:55:34.585351+02:00"
2 changes: 1 addition & 1 deletion tests/v5-java-helm-complete-test-foo/helm/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ version: 1.0.0
appVersion: 1.0.0
dependencies:
- name: microservice-chart
version: 5.9.0
version: 5.9.1
repository: file://../../../charts/microservice-chart
Original file line number Diff line number Diff line change
Expand Up @@ -141,11 +141,6 @@ microservice-chart:
operator: In
values:
- user
- matchExpressions:
- key: elastic
operator: In
values:
- eck
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 100
Expand Down

0 comments on commit 17eccd4

Please sign in to comment.