Skip to content

Commit b974e8a

Browse files
zOnlyKroksgithub-actions[bot]mms-gianni
authored
[memcached]: Implement PDB (CloudPirates-io#295)
* [memcached]: Implement PDB * Bump chart version * Update CHANGELOG.md Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> * Adjust readme * Fix linting * Update CHANGELOG.md Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> * Update CHANGELOG.md Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> --------- Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Gianni <gianni.carafa@srf.ch>
1 parent ecf445f commit b974e8a

File tree

6 files changed

+117
-4
lines changed

6 files changed

+117
-4
lines changed

charts/memcached/CHANGELOG.md

Lines changed: 32 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,35 @@
11
# Changelog
22

3-
## 0.2.1 (2025-10-09)
3+
## 0.2.2 (2025-10-10)
44

5-
* [mongodb] fix: newline between mongo labels and additional labels ([#301](https://github.com/CloudPirates-io/helm-charts/pull/301))
5+
* [memcached]: Implement PDB ([#295](https://github.com/CloudPirates-io/helm-charts/pull/295))
6+
7+
## <small>0.2.1 (2025-10-02)</small>
8+
9+
* chore(deps): update docker.io/memcached:1.6.39 Docker digest to 157c563 (#185) ([d55b428](https://github.com/CloudPirates-io/helm-charts/commit/d55b428)), closes [#185](https://github.com/CloudPirates-io/helm-charts/issues/185)
10+
11+
## 0.2.0 (2025-10-01)
12+
13+
* cast verbosity to int before passing to repeat ([518b602](https://github.com/CloudPirates-io/helm-charts/commit/518b602))
14+
* chore(deps): update docker.io/memcached:1.6.39 Docker digest to 68c1185 ([3c6ec49](https://github.com/CloudPirates-io/helm-charts/commit/3c6ec49))
15+
* make memcached run on openshift (#194) ([87ffbbf](https://github.com/CloudPirates-io/helm-charts/commit/87ffbbf)), closes [#194](https://github.com/CloudPirates-io/helm-charts/issues/194)
16+
* Bump chart version ([1661d8d](https://github.com/CloudPirates-io/helm-charts/commit/1661d8d))
17+
* bump version ([884f4ab](https://github.com/CloudPirates-io/helm-charts/commit/884f4ab))
18+
* mariadb now respects full custom container security context settings ([770ea69](https://github.com/CloudPirates-io/helm-charts/commit/770ea69))
19+
* Update CHANGELOG.md ([7a828fa](https://github.com/CloudPirates-io/helm-charts/commit/7a828fa))
20+
* Update CHANGELOG.md ([f9df296](https://github.com/CloudPirates-io/helm-charts/commit/f9df296))
21+
* Update CHANGELOG.md ([0c85529](https://github.com/CloudPirates-io/helm-charts/commit/0c85529))
22+
* Update CHANGELOG.md ([0e5b657](https://github.com/CloudPirates-io/helm-charts/commit/0e5b657))
23+
* Update CHANGELOG.md ([dcabcee](https://github.com/CloudPirates-io/helm-charts/commit/dcabcee))
24+
* Update CHANGELOG.md ([812bd46](https://github.com/CloudPirates-io/helm-charts/commit/812bd46))
25+
* Update docker.io/memcached:1.6.39 Docker digest to 4404f32 ([454eea5](https://github.com/CloudPirates-io/helm-charts/commit/454eea5))
26+
27+
## 0.1.0 (2025-09-02)
28+
29+
* add extraObject array to all charts ([34772b7](https://github.com/CloudPirates-io/helm-charts/commit/34772b7))
30+
* Add initial Changelogs to all Charts ([68f10ca](https://github.com/CloudPirates-io/helm-charts/commit/68f10ca))
31+
* bump all chart versions for new extraObjects feature ([aaa57f9](https://github.com/CloudPirates-io/helm-charts/commit/aaa57f9))
32+
33+
## <small>0.0.1 (2025-08-26)</small>
34+
35+
* [memcached]: Initial Memcached Implementation (#17) ([790bcbd](https://github.com/CloudPirates-io/helm-charts/commit/790bcbd)), closes [#17](https://github.com/CloudPirates-io/helm-charts/issues/17)

charts/memcached/Chart.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@ apiVersion: v2
22
name: memcached
33
description: Memcached is an in-memory key-value store for small chunks of arbitrary data (strings, objects) from results of database calls, API calls, or page rendering.
44
type: application
5-
6-
version: 0.2.1
5+
version: 0.2.2
76
appVersion: "1.6.39"
87

98
keywords:

charts/memcached/README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,14 @@ The following table lists the configurable parameters of the Memcached chart and
158158
| `ingress.hosts` | An array with hosts and paths | `[{"host": "memcached.local", "paths": [{"path": "/", "pathType": "ImplementationSpecific"}]}]` |
159159
| `ingress.tls` | TLS configuration for the Ingress | `[]` |
160160

161+
### Pod Disruption Budget Parameters
162+
163+
| Parameter | Description | Default |
164+
| -------------------- | -------------------------------------------------------------- | ------- |
165+
| `pdb.create` | Enable/disable a Pod Disruption Budget creation | `false` |
166+
| `pdb.minAvailable` | Minimum number/percentage of pods that should remain scheduled | `""` |
167+
| `pdb.maxUnavailable` | Maximum number/percentage of pods that may be made unavailable | `""` |
168+
161169
### Extra Configuration Parameters
162170

163171
| Parameter | Description | Default |
@@ -258,6 +266,11 @@ resources:
258266
service:
259267
type: ClusterIP
260268
269+
# Enable Pod Disruption Budget for high availability
270+
pdb:
271+
create: true
272+
minAvailable: 1
273+
261274
# Use anti-affinity to spread pods across nodes
262275
affinity:
263276
podAntiAffinity:
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{{- if .Values.pdb.create }}
2+
apiVersion: policy/v1
3+
kind: PodDisruptionBudget
4+
metadata:
5+
name: {{ template "memcached.fullname" . }}-pdb
6+
namespace: {{ .Release.Namespace }}
7+
labels: {{- include "memcached.labels" . | nindent 4 }}
8+
{{- with (include "memcached.annotations" .) }}
9+
annotations:
10+
{{- . | nindent 4 }}
11+
{{- end }}
12+
spec:
13+
{{- if .Values.pdb.minAvailable }}
14+
minAvailable: {{ .Values.pdb.minAvailable }}
15+
{{- end }}
16+
{{- if or .Values.pdb.maxUnavailable (not .Values.pdb.minAvailable) }}
17+
maxUnavailable: {{ .Values.pdb.maxUnavailable | default 1 }}
18+
{{- end }}
19+
selector:
20+
matchLabels:
21+
{{- include "memcached.selectorLabels" . | nindent 6 }}
22+
{{- end }}

charts/memcached/values.schema.json

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,46 @@
143143
"type": "object",
144144
"description": "A Kubernetes manifest object. All fields are allowed."
145145
}
146+
},
147+
"pdb": {
148+
"type": "object",
149+
"title": "Pod Disruption Budget configuration",
150+
"description": "Pod Disruption Budget (PDB) configuration to ensure high availability",
151+
"properties": {
152+
"create": {
153+
"type": "boolean",
154+
"title": "Create PDB",
155+
"description": "Enable/disable a Pod Disruption Budget creation"
156+
},
157+
"minAvailable": {
158+
"oneOf": [
159+
{
160+
"type": "integer",
161+
"minimum": 0
162+
},
163+
{
164+
"type": "string",
165+
"pattern": "^([0-9]+%|)$"
166+
}
167+
],
168+
"title": "Minimum Available",
169+
"description": "Minimum number/percentage of pods that should remain scheduled"
170+
},
171+
"maxUnavailable": {
172+
"oneOf": [
173+
{
174+
"type": "integer",
175+
"minimum": 0
176+
},
177+
{
178+
"type": "string",
179+
"pattern": "^([0-9]+%|)$"
180+
}
181+
],
182+
"title": "Maximum Unavailable",
183+
"description": "Maximum number/percentage of pods that may be made unavailable"
184+
}
185+
}
146186
}
147187
}
148188
}

charts/memcached/values.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,15 @@ tolerations: []
103103
## @param affinity Affinity rules for pod assignment
104104
affinity: {}
105105

106+
## @section Pod Disruption Budget parameters
107+
pdb:
108+
## @param pdb.create Enable/disable a Pod Disruption Budget creation
109+
create: false
110+
## @param pdb.minAvailable Minimum number/percentage of pods that should remain scheduled
111+
minAvailable: ""
112+
## @param pdb.maxUnavailable Maximum number/percentage of pods that may be made unavailable.
113+
maxUnavailable: ""
114+
106115
containerSecurityContext:
107116
## @param containerSecurityContext.runAsUser User ID to run the container
108117
runAsUser: 11211

0 commit comments

Comments
 (0)