Skip to content

Commit 693a63b

Browse files
committed
feat: implement topologySpreadConstraints and bump kuzzle to v2.48.0
1 parent d74d95b commit 693a63b

File tree

4 files changed

+143
-123
lines changed

4 files changed

+143
-123
lines changed

charts/kuzzle/Chart.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ type: application
1414

1515
# This is the chart version. This version number should be incremented each time you make changes
1616
# to the chart and its templates, including the app version.
17-
version: 1.5.1
17+
version: 1.6.0
1818

1919
# This is the version number of the application being deployed. This version number should be
2020
# incremented each time you make changes to the application. Versions are not expected to
2121
# follow Semantic Versioning. They should reflect the version the application is using.
2222
# It is recommended to use it with quotes.
23-
appVersion: 2.47.0
23+
appVersion: 2.48.0

charts/kuzzle/README.md

Lines changed: 48 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -1,67 +1,59 @@
11
# kuzzle
22

3-
![Version: 1.5.0](https://img.shields.io/badge/Version-1.5.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 2.47.0](https://img.shields.io/badge/AppVersion-2.47.0-informational?style=flat-square)
3+
![Version: 1.6.0](https://img.shields.io/badge/Version-1.6.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 2.48.0](https://img.shields.io/badge/AppVersion-2.48.0-informational?style=flat-square)
44

5-
Kuzzle Kubernetes chart compatible for ES7
5+
Kuzzle Kubernetes chart
66

77
## Values
88

99
| Key | Type | Default | Description |
1010
|-----|------|---------|-------------|
11-
| affinity | object | `{}` | |
12-
| args | list | `[]` | |
13-
| command | list | `[]` | |
14-
| entrypoints.cluster_command.port | int | `7510` | |
15-
| entrypoints.cluster_command.targetPort | int | `7510` | |
16-
| entrypoints.cluster_sync.port | int | `7511` | |
17-
| entrypoints.cluster_sync.targetPort | int | `7511` | |
18-
| entrypoints.http.port | int | `7512` | |
19-
| entrypoints.http.targetPort | int | `7512` | |
20-
| extraEntrypoints[0].name | string | `"mqtt"` | |
21-
| extraEntrypoints[0].port | int | `1883` | |
22-
| extraEntrypoints[0].protocol | string | `"TCP"` | |
23-
| extraEntrypoints[0].targetPort | int | `1883` | |
24-
| extraEntrypoints[1].name | string | `"debug"` | |
25-
| extraEntrypoints[1].port | int | `9229` | |
26-
| extraEntrypoints[1].protocol | string | `"TCP"` | |
27-
| extraEntrypoints[1].targetPort | int | `9229` | |
28-
| extraEnvs[0].name | string | `"kuzzle_services__storageEngine__client__node"` | |
29-
| extraEnvs[0].value | string | `"http://elasticsearch-master:9200"` | |
30-
| extraEnvs[1].name | string | `"kuzzle_services__internalCache__node__host"` | |
31-
| extraEnvs[1].value | string | `"redis-master"` | |
32-
| extraEnvs[2].name | string | `"kuzzle_services__memoryStorage__node__host"` | |
33-
| extraEnvs[2].value | string | `"redis-master"` | |
34-
| extraEnvs[3].name | string | `"NODE_ENV"` | |
35-
| extraEnvs[3].value | string | `"production"` | |
36-
| extraInitContainers | list | `[]` | |
37-
| fullnameOverride | string | `""` | |
38-
| image.name | string | `"kuzzleio/kuzzle"` | |
39-
| image.pullPolicy | string | `"Always"` | |
40-
| image.tag | string | `""` | |
41-
| imagePullSecrets | list | `[]` | |
42-
| ingress.annotations | object | `{}` | |
43-
| ingress.className | string | `""` | |
44-
| ingress.enabled | bool | `false` | |
45-
| ingress.hosts | list | `[]` | |
46-
| ingress.tls | list | `[]` | |
47-
| labels | object | `{}` | |
48-
| metrics.path | string | `"/_/metrics"` | |
49-
| metrics.port | int | `7512` | |
50-
| nameOverride | string | `""` | |
51-
| nodeSelector | object | `{}` | |
52-
| podLabels | object | `{}` | |
53-
| podSecurityContext.fsGroup | int | `1000` | |
54-
| probes.liveness.httpGet.path | string | `"/_healthcheck"` | |
55-
| probes.liveness.httpGet.port | string | `"kuzzle-api"` | |
56-
| probes.readiness.httpGet.path | string | `"/_healthcheck"` | |
57-
| probes.readiness.httpGet.port | string | `"kuzzle-api"` | |
58-
| replicaCount | int | `1` | |
59-
| resources | object | `{}` | |
60-
| securityContext | object | `{}` | |
61-
| tolerations | list | `[]` | |
62-
| updateStrategy.rollingUpdate.maxSurge | int | `1` | |
63-
| updateStrategy.rollingUpdate.maxUnavailable | int | `1` | |
64-
| updateStrategy.type | string | `"RollingUpdate"` | |
11+
| affinity | object | `{}` | Affinity rules for pod scheduling (advanced usage) |
12+
| args | list | `[]` | Container args override (leave empty to use image default) |
13+
| command | list | `[]` | Container command override (leave empty to use image default) |
14+
| entrypoints.cluster_command.port | int | `7510` | Service port for cluster command channel |
15+
| entrypoints.cluster_command.targetPort | int | `7510` | Container port for cluster command channel |
16+
| entrypoints.cluster_sync.port | int | `7511` | Service port for cluster sync channel |
17+
| entrypoints.cluster_sync.targetPort | int | `7511` | Container port for cluster sync channel |
18+
| entrypoints.http.port | int | `7512` | Service port for HTTP API |
19+
| entrypoints.http.targetPort | int | `7512` | Container port for HTTP API |
20+
| extraEntrypoints | list | `[]` | Additional container ports to expose (e.g., MQTT, debug) |
21+
| extraEnvs | list | `[]` | Additional environment variables to inject into the Kuzzle container |
22+
| extraInitContainers | list | `[]` | Extra init containers to run before the main container |
23+
| fullnameOverride | string | `""` | String to fully override chart name |
24+
| image.name | string | `"kuzzleio/kuzzle"` | Kuzzle container image repository |
25+
| image.pullPolicy | string | `"Always"` | Image pull policy |
26+
| image.tag | string | `"2.48.0"` | Kuzzle image tag (overrides .Chart.AppVersion if set) |
27+
| imagePullSecrets | list | `[]` | List of image pull secrets (for private registries) |
28+
| ingress.annotations | object | `{}` | Additional annotations to add to the Ingress |
29+
| ingress.className | string | `""` | IngressClass name (e.g., nginx, traefik); leave empty to use the cluster default |
30+
| ingress.enabled | bool | `false` | Enable Ingress resource |
31+
| ingress.hosts | list | `[]` | Ingress hosts configuration list |
32+
| ingress.tls | list | `[]` | Ingress TLS configuration list |
33+
| labels | object | `{}` | Extra labels added to all chart resources |
34+
| metrics.path | string | `"/_/metrics"` | HTTP path for metrics endpoint |
35+
| metrics.port | int | `7512` | Port exposed for metrics scraping |
36+
| nameOverride | string | `""` | String to partially override chart name |
37+
| nodeSelector | object | `{}` | Node labels for pod assignment |
38+
| podLabels | object | `{}` | Extra labels added to the pod template metadata |
39+
| podSecurityContext.fsGroup | int | `1000` | fsGroup for shared volumes in the pod |
40+
| probes.liveness.httpGet | object | `{"path":"/_healthcheck","port":"kuzzle-api"}` | Liveness probe configuration |
41+
| probes.liveness.httpGet.path | string | `"/_healthcheck"` | Liveness probe path |
42+
| probes.liveness.httpGet.port | string | `"kuzzle-api"` | Liveness probe port (must match a named port) |
43+
| probes.readiness.httpGet | object | `{"path":"/_healthcheck","port":"kuzzle-api"}` | Readiness probe configuration |
44+
| probes.readiness.httpGet.path | string | `"/_healthcheck"` | Readiness probe path |
45+
| probes.readiness.httpGet.port | string | `"kuzzle-api"` | Readiness probe port (must match a named port) |
46+
| replicaCount | int | `1` | Number of Kuzzle pod replicas |
47+
| resources | object | `{}` | Resource requests/limits for the Kuzzle container |
48+
| securityContext | object | `{}` | Security context for the main Kuzzle container |
49+
| tolerations | list | `[]` | Tolerations for tainted nodes |
50+
| topologySpreadConstraints.enabled | bool | `false` | Enable pod distribution via topology spread constraints |
51+
| topologySpreadConstraints.maxSkew | int | `1` | Maximum allowed skew between topology domains (1 = most even) |
52+
| topologySpreadConstraints.topologyKey | string | `"kubernetes.io/hostname"` | Topology key to spread across (e.g., kubernetes.io/hostname or topology.kubernetes.io/zone) |
53+
| topologySpreadConstraints.whenUnsatisfiable | string | `"DoNotSchedule"` | Behavior when constraints cannot be satisfied (DoNotSchedule|ScheduleAnyway) |
54+
| updateStrategy.rollingUpdate.maxSurge | int | `1` | Max surge pods during rolling update |
55+
| updateStrategy.rollingUpdate.maxUnavailable | int | `1` | Max unavailable pods during rolling update |
56+
| updateStrategy.type | string | `"RollingUpdate"` | Deployment update strategy type |
6557

6658
----------------------------------------------
6759
Autogenerated from chart metadata using [helm-docs v1.14.2](https://github.com/norwoodj/helm-docs/releases/v1.14.2)

charts/kuzzle/templates/deployment.yaml

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,11 @@ spec:
3636
{{- toYaml .Values.podSecurityContext | nindent 8 }}
3737

3838
# Init containers
39-
{{ if .Values.extraInitContainers }}
39+
{{- if .Values.extraInitContainers }}
4040
initContainers:
4141
{{- toYaml .Values.extraInitContainers | nindent 8 }}
42-
{{ end }}
42+
{{- end }}
43+
4344
containers:
4445
- name: {{ .Chart.Name }}
4546
securityContext:
@@ -77,14 +78,27 @@ spec:
7778
{{- end }}
7879
resources:
7980
{{- toYaml .Values.resources | nindent 12 }}
81+
8082
{{- with .Values.nodeSelector }}
8183
nodeSelector:
8284
{{- toYaml . | nindent 8 }}
8385
{{- end }}
86+
87+
{{- if .Values.topologySpreadConstraints.enabled }}
88+
topologySpreadConstraints:
89+
- maxSkew: {{ .Values.topologySpreadConstraints.maxSkew | default 1 }}
90+
topologyKey: {{ .Values.topologySpreadConstraints.topologyKey | default "kubernetes.io/hostname" | quote }}
91+
whenUnsatisfiable: {{ .Values.topologySpreadConstraints.whenUnsatisfiable | default "DoNotSchedule" }}
92+
labelSelector:
93+
matchLabels:
94+
{{ include "kuzzle.selectorLabels" . | nindent 14 }}
95+
{{- end }}
96+
8497
{{- with .Values.affinity }}
8598
affinity:
8699
{{- toYaml . | nindent 8 }}
87100
{{- end }}
101+
88102
{{- with .Values.tolerations }}
89103
tolerations:
90104
{{- toYaml . | nindent 8 }}

charts/kuzzle/values.yaml

Lines changed: 77 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -1,131 +1,145 @@
11
# Default values for kuzzle.
2-
# This is a YAML-formatted file.
3-
# Declare variables to be passed into your templates.
42

3+
# -- Number of Kuzzle pod replicas
54
replicaCount: 1
65

76
image:
7+
# -- Kuzzle container image repository
88
name: kuzzleio/kuzzle
9-
tag: ""
9+
# -- Kuzzle image tag (overrides .Chart.AppVersion if set)
10+
tag: "2.48.0"
11+
# -- Image pull policy
1012
pullPolicy: Always
1113

14+
# -- List of image pull secrets (for private registries)
1215
imagePullSecrets: []
1316

17+
# -- Extra labels added to all chart resources
1418
labels: {}
19+
# -- Extra labels added to the pod template metadata
1520
podLabels: {}
1621

22+
# -- String to partially override chart name
1723
nameOverride: ""
24+
# -- String to fully override chart name
1825
fullnameOverride: ""
1926

2027
updateStrategy:
28+
# -- Deployment update strategy type
2129
type: RollingUpdate
2230
rollingUpdate:
31+
# -- Max surge pods during rolling update
2332
maxSurge: 1
33+
# -- Max unavailable pods during rolling update
2434
maxUnavailable: 1
2535

2636
podSecurityContext:
37+
# -- fsGroup for shared volumes in the pod
2738
fsGroup: 1000
2839

29-
extraEnvs:
30-
- name: kuzzle_services__storageEngine__client__node
31-
value: http://elasticsearch-master:9200
32-
- name: kuzzle_services__internalCache__node__host
33-
value: redis-master
34-
- name: kuzzle_services__memoryStorage__node__host
35-
value: redis-master
36-
- name: NODE_ENV
37-
value: production
38-
40+
# -- Additional environment variables to inject into the Kuzzle container
41+
extraEnvs: []
42+
# - name: kuzzle_services__storageEngine__client__node
43+
# value: http://elasticsearch:9200
44+
# - name: kuzzle_services__internalCache__node__host
45+
# value: redis-master
46+
# - name: kuzzle_services__memoryStorage__node__host
47+
# value: redis-master
48+
# - name: NODE_ENV
49+
# value: production
50+
51+
# -- Container command override (leave empty to use image default)
3952
command: []
53+
54+
# -- Container args override (leave empty to use image default)
4055
args: []
4156

4257
entrypoints:
4358
http:
59+
# -- Service port for HTTP API
4460
port: 7512
61+
# -- Container port for HTTP API
4562
targetPort: 7512
4663
cluster_command:
64+
# -- Service port for cluster command channel
4765
port: 7510
66+
# -- Container port for cluster command channel
4867
targetPort: 7510
4968
cluster_sync:
69+
# -- Service port for cluster sync channel
5070
port: 7511
71+
# -- Container port for cluster sync channel
5172
targetPort: 7511
5273

53-
extraEntrypoints:
54-
- name: mqtt
55-
port: 1883
56-
targetPort: 1883
57-
protocol: TCP
58-
59-
- name: debug
60-
port: 9229
61-
targetPort: 9229
62-
protocol: TCP
74+
# -- Additional container ports to expose (e.g., MQTT, debug)
75+
extraEntrypoints: []
76+
# - name: mqtt
77+
# port: 1883
78+
# targetPort: 1883
79+
# protocol: TCP
80+
# - name: debug
81+
# port: 9229
82+
# targetPort: 9229
83+
# protocol: TCP
6384

6485
probes:
6586
liveness:
87+
# -- Liveness probe configuration
6688
httpGet:
89+
# -- Liveness probe path
6790
path: /_healthcheck
91+
# -- Liveness probe port (must match a named port)
6892
port: kuzzle-api
6993
readiness:
94+
# -- Readiness probe configuration
7095
httpGet:
71-
path: /_healthcheck
96+
# -- Readiness probe path
97+
path: /_ready
98+
# -- Readiness probe port (must match a named port)
7299
port: kuzzle-api
73100

74101
metrics:
102+
# -- Port exposed for metrics scraping
75103
port: 7512
104+
# -- HTTP path for metrics endpoint
76105
path: "/_/metrics"
77106

78-
securityContext:
79-
{}
80-
# capabilities:
81-
# drop:
82-
# - ALL
83-
# readOnlyRootFilesystem: true
84-
# runAsNonRoot: true
85-
# runAsUser: 1000
86-
87-
resources:
88-
{}
89-
# We usually recommend not to specify default resources and to leave this as a conscious
90-
# choice for the user. This also increases chances charts run on environments with little
91-
# resources, such as Minikube. If you do want to specify resources, uncomment the following
92-
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
93-
# limits:
94-
# cpu: 100m
95-
# memory: 128Mi
96-
# requests:
97-
# cpu: 100m
98-
# memory: 128Mi
107+
# -- Security context for the main Kuzzle container
108+
securityContext: {}
109+
110+
# -- Resource requests/limits for the Kuzzle container
111+
resources: {}
99112

113+
# -- Node labels for pod assignment
100114
nodeSelector: {}
101115

116+
# -- Tolerations for tainted nodes
102117
tolerations: []
103118

119+
# -- Affinity rules for pod scheduling (advanced usage)
104120
affinity: {}
105121

106-
# Extra Containers to run before the main container in the pod (e.g. for sidecar containers)
107-
# extraContainers:
108-
# - name: my-sidecar
109-
# image: my-sidecar-image
110-
# imagePullPolicy: Always
111-
# resources:
112-
# {}
113-
# volumeMounts:
114-
# - name: my-volume
115-
# mountPath: /path/to/my-volume
122+
topologySpreadConstraints:
123+
# -- Enable pod distribution via topology spread constraints
124+
enabled: false
125+
# -- Maximum allowed skew between topology domains (1 = most even)
126+
maxSkew: 1
127+
# -- Topology key to spread across (e.g., kubernetes.io/hostname or topology.kubernetes.io/zone)
128+
topologyKey: kubernetes.io/hostname
129+
# -- Behavior when constraints cannot be satisfied (DoNotSchedule|ScheduleAnyway)
130+
whenUnsatisfiable: DoNotSchedule
131+
132+
# -- Extra init containers to run before the main container
116133
extraInitContainers: []
117134

118-
# Configuration of the ingress to the Kuzzle API
119135
ingress:
136+
# -- Enable Ingress resource
120137
enabled: false
138+
# -- IngressClass name (e.g., nginx, traefik); leave empty to use the cluster default
121139
className: ""
140+
# -- Additional annotations to add to the Ingress
122141
annotations: {}
142+
# -- Ingress hosts configuration list
123143
hosts: []
124-
# - host: kuzzle.example.com
125-
# paths:
126-
# - path: /
127-
# pathType: Prefix
144+
# -- Ingress TLS configuration list
128145
tls: []
129-
# - secretName: my-certificate
130-
# hosts:
131-
# - kuzzle.example.com

0 commit comments

Comments
 (0)