Browse Source
helm: enhance all-in-one deployment configuration
helm: enhance all-in-one deployment configuration
Fixes #7110 This PR addresses multiple issues with the all-in-one Helm chart configuration: ## New Features ### Configurable Replicas - Added `allInOne.replicas` (was hardcoded to 1) ### S3 Gateway Configuration - Added full S3 config under `allInOne.s3`: - port, httpsPort, domainName, allowEmptyFolder - enableAuth, existingConfigSecret, auditLogConfig - createBuckets for declarative bucket creation ### SFTP Server Configuration - Added full SFTP config under `allInOne.sftp`: - port, sshPrivateKey, hostKeysFolder, authMethods - maxAuthTries, bannerMessage, loginGraceTime - clientAliveInterval, clientAliveCountMax, enableAuth ### Command Line Arguments - Added `allInOne.extraArgs` for custom CLI arguments ### Update Strategy - Added `allInOne.updateStrategy.type` (Recreate/RollingUpdate) ### Secret Environment Variables - Added `allInOne.secretExtraEnvironmentVars` for injecting secrets ### Ingress Support - Added `allInOne.ingress` with S3, filer, and master sub-configs ### Storage Options - Enhanced `allInOne.data` with existingClaim support - Added PVC template for persistentVolumeClaim type ## CI Enhancements - Added comprehensive tests for all-in-one configurations - Tests cover replicas, S3, SFTP, extraArgs, strategies, PVC, ingresspull/7640/head
7 changed files with 573 additions and 80 deletions
-
172.github/workflows/helm_ci.yml
-
112k8s/charts/seaweedfs/templates/all-in-one/all-in-one-deployment.yaml
-
154k8s/charts/seaweedfs/templates/all-in-one/all-in-one-ingress.yaml
-
23k8s/charts/seaweedfs/templates/all-in-one/all-in-one-pvc.yaml
-
18k8s/charts/seaweedfs/templates/all-in-one/all-in-one-service.yml
-
66k8s/charts/seaweedfs/templates/shared/post-install-bucket-hook.yaml
-
108k8s/charts/seaweedfs/values.yaml
@ -0,0 +1,154 @@ |
|||
{{- if .Values.allInOne.enabled }} |
|||
{{- if .Values.allInOne.ingress.enabled }} |
|||
{{- $fullName := printf "%s-all-in-one" (include "seaweedfs.name" .) -}} |
|||
|
|||
{{- /* S3 Ingress */}} |
|||
{{- if and .Values.allInOne.s3.enabled .Values.allInOne.ingress.s3.enabled }} |
|||
--- |
|||
apiVersion: networking.k8s.io/v1 |
|||
kind: Ingress |
|||
metadata: |
|||
name: {{ $fullName }}-s3 |
|||
namespace: {{ .Release.Namespace }} |
|||
labels: |
|||
app.kubernetes.io/name: {{ template "seaweedfs.name" . }} |
|||
helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} |
|||
app.kubernetes.io/managed-by: {{ .Release.Service }} |
|||
app.kubernetes.io/instance: {{ .Release.Name }} |
|||
app.kubernetes.io/component: seaweedfs-all-in-one |
|||
{{- with .Values.allInOne.ingress.s3.annotations }} |
|||
annotations: |
|||
{{- toYaml . | nindent 4 }} |
|||
{{- end }} |
|||
spec: |
|||
{{- if .Values.allInOne.ingress.className }} |
|||
ingressClassName: {{ .Values.allInOne.ingress.className }} |
|||
{{- end }} |
|||
{{- if .Values.allInOne.ingress.s3.tls }} |
|||
tls: |
|||
{{- range .Values.allInOne.ingress.s3.tls }} |
|||
- hosts: |
|||
{{- range .hosts }} |
|||
- {{ . | quote }} |
|||
{{- end }} |
|||
secretName: {{ .secretName }} |
|||
{{- end }} |
|||
{{- end }} |
|||
rules: |
|||
{{- if .Values.allInOne.ingress.host }} |
|||
- host: {{ .Values.allInOne.ingress.host | quote }} |
|||
http: |
|||
{{- else }} |
|||
- http: |
|||
{{- end }} |
|||
paths: |
|||
- path: {{ .Values.allInOne.ingress.s3.path }} |
|||
pathType: {{ .Values.allInOne.ingress.s3.pathType }} |
|||
backend: |
|||
service: |
|||
name: {{ $fullName }} |
|||
port: |
|||
number: {{ .Values.allInOne.s3.port | default .Values.s3.port }} |
|||
{{- end }} |
|||
|
|||
{{- /* Filer Ingress */}} |
|||
{{- if .Values.allInOne.ingress.filer.enabled }} |
|||
--- |
|||
apiVersion: networking.k8s.io/v1 |
|||
kind: Ingress |
|||
metadata: |
|||
name: {{ $fullName }}-filer |
|||
namespace: {{ .Release.Namespace }} |
|||
labels: |
|||
app.kubernetes.io/name: {{ template "seaweedfs.name" . }} |
|||
helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} |
|||
app.kubernetes.io/managed-by: {{ .Release.Service }} |
|||
app.kubernetes.io/instance: {{ .Release.Name }} |
|||
app.kubernetes.io/component: seaweedfs-all-in-one |
|||
{{- with .Values.allInOne.ingress.filer.annotations }} |
|||
annotations: |
|||
{{- toYaml . | nindent 4 }} |
|||
{{- end }} |
|||
spec: |
|||
{{- if .Values.allInOne.ingress.className }} |
|||
ingressClassName: {{ .Values.allInOne.ingress.className }} |
|||
{{- end }} |
|||
{{- if .Values.allInOne.ingress.filer.tls }} |
|||
tls: |
|||
{{- range .Values.allInOne.ingress.filer.tls }} |
|||
- hosts: |
|||
{{- range .hosts }} |
|||
- {{ . | quote }} |
|||
{{- end }} |
|||
secretName: {{ .secretName }} |
|||
{{- end }} |
|||
{{- end }} |
|||
rules: |
|||
{{- if .Values.allInOne.ingress.host }} |
|||
- host: {{ .Values.allInOne.ingress.host | quote }} |
|||
http: |
|||
{{- else }} |
|||
- http: |
|||
{{- end }} |
|||
paths: |
|||
- path: {{ .Values.allInOne.ingress.filer.path }} |
|||
pathType: {{ .Values.allInOne.ingress.filer.pathType }} |
|||
backend: |
|||
service: |
|||
name: {{ $fullName }} |
|||
port: |
|||
number: {{ .Values.filer.port }} |
|||
{{- end }} |
|||
|
|||
{{- /* Master Ingress */}} |
|||
{{- if .Values.allInOne.ingress.master.enabled }} |
|||
--- |
|||
apiVersion: networking.k8s.io/v1 |
|||
kind: Ingress |
|||
metadata: |
|||
name: {{ $fullName }}-master |
|||
namespace: {{ .Release.Namespace }} |
|||
labels: |
|||
app.kubernetes.io/name: {{ template "seaweedfs.name" . }} |
|||
helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} |
|||
app.kubernetes.io/managed-by: {{ .Release.Service }} |
|||
app.kubernetes.io/instance: {{ .Release.Name }} |
|||
app.kubernetes.io/component: seaweedfs-all-in-one |
|||
{{- with .Values.allInOne.ingress.master.annotations }} |
|||
annotations: |
|||
{{- toYaml . | nindent 4 }} |
|||
{{- end }} |
|||
spec: |
|||
{{- if .Values.allInOne.ingress.className }} |
|||
ingressClassName: {{ .Values.allInOne.ingress.className }} |
|||
{{- end }} |
|||
{{- if .Values.allInOne.ingress.master.tls }} |
|||
tls: |
|||
{{- range .Values.allInOne.ingress.master.tls }} |
|||
- hosts: |
|||
{{- range .hosts }} |
|||
- {{ . | quote }} |
|||
{{- end }} |
|||
secretName: {{ .secretName }} |
|||
{{- end }} |
|||
{{- end }} |
|||
rules: |
|||
{{- if .Values.allInOne.ingress.host }} |
|||
- host: {{ .Values.allInOne.ingress.host | quote }} |
|||
http: |
|||
{{- else }} |
|||
- http: |
|||
{{- end }} |
|||
paths: |
|||
- path: {{ .Values.allInOne.ingress.master.path }} |
|||
pathType: {{ .Values.allInOne.ingress.master.pathType }} |
|||
backend: |
|||
service: |
|||
name: {{ $fullName }} |
|||
port: |
|||
number: {{ .Values.master.port }} |
|||
{{- end }} |
|||
|
|||
{{- end }} |
|||
{{- end }} |
|||
|
|||
@ -1,21 +1,28 @@ |
|||
{{- if and .Values.allInOne.enabled (eq .Values.allInOne.data.type "persistentVolumeClaim") }} |
|||
{{- if .Values.allInOne.enabled }} |
|||
{{- if eq .Values.allInOne.data.type "persistentVolumeClaim" }} |
|||
apiVersion: v1 |
|||
kind: PersistentVolumeClaim |
|||
metadata: |
|||
name: {{ .Values.allInOne.data.claimName }} |
|||
name: {{ template "seaweedfs.name" . }}-all-in-one-data |
|||
namespace: {{ .Release.Namespace }} |
|||
labels: |
|||
app.kubernetes.io/name: {{ template "seaweedfs.name" . }} |
|||
helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} |
|||
app.kubernetes.io/managed-by: {{ .Release.Service }} |
|||
app.kubernetes.io/instance: {{ .Release.Name }} |
|||
app.kubernetes.io/component: seaweedfs-all-in-one |
|||
{{- if .Values.allInOne.annotations }} |
|||
{{- with .Values.allInOne.data.annotations }} |
|||
annotations: |
|||
{{- toYaml .Values.allInOne.annotations | nindent 4 }} |
|||
{{- toYaml . | nindent 4 }} |
|||
{{- end }} |
|||
spec: |
|||
accessModes: |
|||
- ReadWriteOnce |
|||
resources: |
|||
requests: |
|||
storage: {{ .Values.allInOne.data.size }} |
|||
{{- if .Values.allInOne.data.storageClass }} |
|||
storageClassName: {{ .Values.allInOne.data.storageClass }} |
|||
{{- end }} |
|||
{{- end }} |
|||
resources: |
|||
requests: |
|||
storage: {{ .Values.allInOne.data.size | default "10Gi" }} |
|||
{{- end }} |
|||
{{- end }} |
|||
Write
Preview
Loading…
Cancel
Save
Reference in new issue