Skip to content

Commit 934259f

Browse files
author
Juan Ariza Toledano
authored
[bitnami/*] Affinity based on common presets (ii) (#4472)
1 parent 17909ff commit 934259f

File tree

95 files changed

+2666
-1158
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

95 files changed

+2666
-1158
lines changed

bitnami/etcd/Chart.lock

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
dependencies:
2+
- name: common
3+
repository: https://charts.bitnami.com/bitnami
4+
version: 1.0.1
5+
digest: sha256:e66388f254b9de6470bca6d8c1c565d1c16a5569beef68a7bc99e486e73ccbdb
6+
generated: "2020-11-24T12:52:51.180468+01:00"

bitnami/etcd/Chart.yaml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@ annotations:
22
category: Database
33
apiVersion: v2
44
appVersion: 3.4.13
5+
dependencies:
6+
- name: common
7+
repository: https://charts.bitnami.com/bitnami
8+
tags:
9+
- bitnami-common
10+
version: 1.x.x
511
description: etcd is a distributed key value store that provides a reliable way to store data across a cluster of machines
612
engine: gotpl
713
home: https://github.com/bitnami/charts/tree/master/bitnami/etcd
@@ -19,4 +25,4 @@ name: etcd
1925
sources:
2026
- https://github.com/bitnami/bitnami-docker-etcd
2127
- https://coreos.com/etcd/
22-
version: 5.1.0
28+
version: 5.2.0

bitnami/etcd/README.md

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -130,9 +130,14 @@ The following tables lists the configurable parameters of the etcd chart and the
130130
| `readinessProbe.failureThreshold` | Minimum consecutive failures for the probe to be considered failed after having succeeded. | `6` |
131131
| `readinessProbe.successThreshold` | Minimum consecutive successes for the probe to be considered successful after having failed | `1` |
132132
| `podAnnotations` | Annotations to be added to pods | `{}` |
133-
| `affinity` | Map of node/pod affinities | `{}` (The value is evaluated as a template) |
134-
| `nodeSelector` | Node labels for pod assignment | `{}` (The value is evaluated as a template) |
135-
| `tolerations` | Tolerations for pod assignment | `[]` (The value is evaluated as a template) |
133+
| `podAffinityPreset` | Pod affinity preset. Ignored if `affinity` is set. Allowed values: `soft` or `hard` | `""` |
134+
| `podAntiAffinityPreset` | Pod anti-affinity preset. Ignored if `affinity` is set. Allowed values: `soft` or `hard` | `soft` |
135+
| `nodeAffinityPreset.type` | Node affinity preset type. Ignored if `affinity` is set. Allowed values: `soft` or `hard` | `""` |
136+
| `nodeAffinityPreset.key` | Node label key to match Ignored if `affinity` is set. | `""` |
137+
| `nodeAffinityPreset.values` | Node label values to match. Ignored if `affinity` is set. | `[]` |
138+
| `affinity` | Affinity for pod assignment | `{}` (evaluated as a template) |
139+
| `nodeSelector` | Node labels for pod assignment | `{}` (evaluated as a template) |
140+
| `tolerations` | Tolerations for pod assignment | `[]` (evaluated as a template) |
136141
| `priorityClassName` | Name of the existing priority class to be used by etcd pods. | `""` |
137142
| `metrics.enabled` | Enable Prometheus exporter to expose etcd metrics | `false` |
138143
| `metrics.podAnnotations` | Annotations for enabling prometheus to access the metrics endpoint | {`prometheus.io/scrape: "true",prometheus.io/port: "2379"`} |
@@ -297,6 +302,12 @@ disasterRecovery.pvc.storageClassName=nfs
297302

298303
> **Note**: Disaster recovery feature requires using volumes with ReadWriteMany access mode. For instance, you can use the stable/nfs-server-provisioner chart to provide NFS PVCs.
299304
305+
### Setting Pod's affinity
306+
307+
This chart allows you to set your custom affinity using the `affinity` paremeter. Find more infomation about Pod's affinity in the [kubernetes documentation](https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity).
308+
309+
As an alternative, you can use of the preset configurations for pod affinity, pod anti-affinity, and node affinity available at the [bitnami/common](https://github.com/bitnami/charts/tree/master/bitnami/common#affinities) chart. To do so, set the `podAffinityPreset`, `podAntiAffinityPreset`, or `nodeAffinityPreset` parameters.
310+
300311
## Persistence
301312

302313
The [Bitnami etcd](https://github.com/bitnami/bitnami-docker-etcd) image stores the etcd data at the `/bitnami/etcd` path of the container. Persistent Volume Claims are used to keep the data across statefulsets.
@@ -318,6 +329,10 @@ Find more information about how to deal with common errors related to Bitnami’
318329

319330
## Upgrading
320331

332+
### 5.2.0
333+
334+
This version also introduces `bitnami/common`, a [library chart](https://helm.sh/docs/topics/library_charts/#helm) as a dependency. More documentation about this new utility could be found [here](https://github.com/bitnami/charts/tree/master/bitnami/common#bitnami-common-library-chart). Please, make sure that you have updated the chart dependencies before executing any upgrade.
335+
321336
### To 5.0.0
322337

323338
[On November 13, 2020, Helm v2 support was formally finished](https://github.com/helm/charts#status-of-the-project), this major version is the result of the required changes applied to the Helm Chart to be able to incorporate the different features added in Helm v3 and to be consistent with the Helm project itself regarding the Helm v2 EOL.

bitnami/etcd/templates/statefulset.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,11 @@ spec:
3333
{{- include "etcd.imagePullSecrets" . | indent 6 }}
3434
{{- if .Values.affinity }}
3535
affinity: {{- include "etcd.tplValue" (dict "value" .Values.affinity "context" $) | nindent 8 }}
36+
{{- else }}
37+
affinity:
38+
podAffinity: {{- include "common.affinities.pods" (dict "type" .Values.podAffinityPreset "context" $) | nindent 10 }}
39+
podAntiAffinity: {{- include "common.affinities.pods" (dict "type" .Values.podAntiAffinityPreset "context" $) | nindent 10 }}
40+
nodeAffinity: {{- include "common.affinities.nodes" (dict "type" .Values.nodeAffinityPreset.type "key" .Values.nodeAffinityPreset.key "values" .Values.nodeAffinityPreset.values) | nindent 10 }}
3641
{{- end }}
3742
{{- if .Values.nodeSelector }}
3843
nodeSelector: {{- include "etcd.tplValue" (dict "value" .Values.nodeSelector "context" $) | nindent 8 }}

bitnami/etcd/values-production.yaml

Lines changed: 35 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -300,12 +300,46 @@ readinessProbe:
300300
##
301301
podAnnotations: {}
302302

303+
## Pod affinity preset
304+
## ref: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#inter-pod-affinity-and-anti-affinity
305+
## Allowed values: soft, hard
306+
##
307+
podAffinityPreset: ""
308+
309+
## Pod anti-affinity preset
310+
## Ref: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#inter-pod-affinity-and-anti-affinity
311+
## Allowed values: soft, hard
312+
##
313+
podAntiAffinityPreset: soft
314+
315+
## Node affinity preset
316+
## Ref: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#node-affinity
317+
## Allowed values: soft, hard
318+
##
319+
nodeAffinityPreset:
320+
## Node affinity type
321+
## Allowed values: soft, hard
322+
type: ""
323+
## Node label key to match
324+
## E.g.
325+
## key: "kubernetes.io/e2e-az-name"
326+
##
327+
key: ""
328+
## Node label values to match
329+
## E.g.
330+
## values:
331+
## - e2e-az1
332+
## - e2e-az2
333+
##
334+
values: []
335+
303336
## Affinity for pod assignment
304337
## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity
338+
## Note: podAffinityPreset, podAntiAffinityPreset, and nodeAffinityPreset will be ignored when it's set
305339
##
306340
affinity: {}
307341

308-
## Node labels for pod assignment. Evaluated as a template.
342+
## Node labels for pod assignment
309343
## Ref: https://kubernetes.io/docs/user-guide/node-selection/
310344
##
311345
nodeSelector: {}

bitnami/etcd/values.yaml

Lines changed: 35 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -302,12 +302,46 @@ readinessProbe:
302302
##
303303
podAnnotations: {}
304304

305+
## Pod affinity preset
306+
## ref: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#inter-pod-affinity-and-anti-affinity
307+
## Allowed values: soft, hard
308+
##
309+
podAffinityPreset: ""
310+
311+
## Pod anti-affinity preset
312+
## Ref: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#inter-pod-affinity-and-anti-affinity
313+
## Allowed values: soft, hard
314+
##
315+
podAntiAffinityPreset: soft
316+
317+
## Node affinity preset
318+
## Ref: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#node-affinity
319+
## Allowed values: soft, hard
320+
##
321+
nodeAffinityPreset:
322+
## Node affinity type
323+
## Allowed values: soft, hard
324+
type: ""
325+
## Node label key to match
326+
## E.g.
327+
## key: "kubernetes.io/e2e-az-name"
328+
##
329+
key: ""
330+
## Node label values to match
331+
## E.g.
332+
## values:
333+
## - e2e-az1
334+
## - e2e-az2
335+
##
336+
values: []
337+
305338
## Affinity for pod assignment
306339
## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity
340+
## Note: podAffinityPreset, podAntiAffinityPreset, and nodeAffinityPreset will be ignored when it's set
307341
##
308342
affinity: {}
309343

310-
## Node labels for pod assignment. Evaluated as a template.
344+
## Node labels for pod assignment
311345
## Ref: https://kubernetes.io/docs/user-guide/node-selection/
312346
##
313347
nodeSelector: {}

bitnami/external-dns/Chart.lock

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
dependencies:
2+
- name: common
3+
repository: https://charts.bitnami.com/bitnami
4+
version: 1.0.1
5+
digest: sha256:e66388f254b9de6470bca6d8c1c565d1c16a5569beef68a7bc99e486e73ccbdb
6+
generated: "2020-11-24T12:52:59.358249+01:00"

bitnami/external-dns/Chart.yaml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@ annotations:
22
category: DeveloperTools
33
apiVersion: v2
44
appVersion: 0.7.4
5+
dependencies:
6+
- name: common
7+
repository: https://charts.bitnami.com/bitnami
8+
tags:
9+
- bitnami-common
10+
version: 1.x.x
511
description: ExternalDNS is a Kubernetes addon that configures public DNS servers with information about exposed Kubernetes services to make them discoverable.
612
engine: gotpl
713
home: https://github.com/bitnami/charts/tree/master/bitnami/external-dns
@@ -18,4 +24,4 @@ sources:
1824
- https://github.com/kubernetes-sigs/external-dns
1925
- https://github.com/bitnami/bitnami-docker-external-dns
2026
- https://github.com/kubernetes-sigs/external-dns
21-
version: 4.2.0
27+
version: 4.3.0

0 commit comments

Comments
 (0)