helm: add enableServiceLinks, poddisruptionbudget (#1293)

Signed-off-by: Juri Malinovski <juri.malinovski@coolbet.com>
This commit is contained in:
Juri Malinovski
2025-12-29 03:31:18 +02:00
committed by GitHub
parent eb33e82b56
commit 4603ece708
4 changed files with 37 additions and 0 deletions

View File

@@ -31,6 +31,7 @@ RustFS helm chart supports **standalone and distributed mode**. For standalone m
| containerSecurityContext.capabilities.drop[0] | string | `"ALL"` | |
| containerSecurityContext.readOnlyRootFilesystem | bool | `true` | |
| containerSecurityContext.runAsNonRoot | bool | `true` | |
| enableServiceLinks | bool | `false` | |
| extraManifests | list | `[]` | List of additional k8s manifests. |
| fullnameOverride | string | `""` | |
| image.pullPolicy | string | `"IfNotPresent"` | |
@@ -73,6 +74,9 @@ RustFS helm chart supports **standalone and distributed mode**. For standalone m
| mode.standalone.enabled | bool | `false` | RustFS standalone mode support, namely one pod one pvc. |
| nameOverride | string | `""` | |
| nodeSelector | object | `{}` | |
| pdb.create | bool | `false` | Enable/disable a Pod Disruption Budget creation |
| pdb.maxUnavailable | string | `1` | |
| pdb.minAvailable | string | `""` | |
| podAnnotations | object | `{}` | |
| podLabels | object | `{}` | |
| podSecurityContext.fsGroup | int | `10001` | |

View File

@@ -0,0 +1,22 @@
{{- if and .Values.pdb.create .Values.mode.distributed.enabled }}
---
apiVersion: policy/v1
kind: PodDisruptionBudget
metadata:
name: {{ include "rustfs.fullname" . }}
labels:
{{- include "rustfs.labels" . | nindent 4 }}
{{- with .Values.commonLabels }}
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
{{- if .Values.pdb.minAvailable }}
minAvailable: {{ .Values.pdb.minAvailable }}
{{- end }}
{{- if or .Values.pdb.maxUnavailable (not .Values.pdb.minAvailable) }}
maxUnavailable: {{ .Values.pdb.maxUnavailable }}
{{- end }}
selector:
matchLabels:
{{- include "rustfs.selectorLabels" . | nindent 6 }}
{{- end }}

View File

@@ -26,6 +26,7 @@ spec:
{{- toYaml . | nindent 8 }}
{{- end }}
spec:
enableServiceLinks: {{ .Values.enableServiceLinks }}
{{- with include "chart.imagePullSecrets" . }}
imagePullSecrets:
{{- . | nindent 8 }}

View File

@@ -187,4 +187,14 @@ initStep:
runAsUser: 0
runAsGroup: 0
pdb:
create: false
# Minimum number/percentage of pods that should remain scheduled
minAvailable: ""
# Maximum number/percentage of pods that may be made unavailable
maxUnavailable: 1
# Whether information about services should be injected into pod's environment variable
enableServiceLinks: false
extraManifests: []