* feat: improve allInOne mode support for admin/volume ingress and fix master UI links - Add allInOne support to admin ingress template, matching the pattern used by filer and s3 ingress templates (or-based enablement with ternary service name selection) - Add allInOne support to volume ingress template, which previously required volume.enabled even when the volume server runs within the allInOne pod - Expose admin ports in allInOne deployment and service when allInOne.admin.enabled is set - Add allInOne.admin config section to values.yaml (enabled by default, ports inherit from admin.*) - Fix legacy master UI templates (master.html, masterNewRaft.html) to prefer PublicUrl over internal Url when linking to volume server UI. The new admin UI already handles this correctly. * fix: revert admin allInOne changes and fix PublicUrl in admin dashboard The admin binary (`weed admin`) is a separate process that cannot run inside `weed server` (allInOne mode). Revert the admin-related allInOne helm chart changes that caused 503 errors on admin ingress. Fix bug in cluster_topology.go where VolumeServer.PublicURL was set to node.Id (internal pod address) instead of the actual public URL. Add public_url field to DataNodeInfo proto message so the topology gRPC response carries the public URL set via -volume.publicUrl flag. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * fix: use HTTP /dir/status to populate PublicUrl in admin dashboard The gRPC DataNodeInfo proto does not include PublicUrl, so the admin dashboard showed internal pod IPs instead of the configured public URL. Fetch PublicUrl from the master's /dir/status HTTP endpoint and apply it in both GetClusterTopology and GetClusterVolumeServers code paths. Also reverts the unnecessary proto field additions from the previous commit and cleans up a stray blank line in all-in-one-service.yml. * fix: apply PublicUrl link fix to masterNewRaft.html Match the same conditional logic already applied to master.html — prefer PublicUrl when set and different from Url. * fix: add HTTP timeout and status check to fetchPublicUrlMap Use a 5s-timeout client instead of http.DefaultClient to prevent blocking indefinitely when the master is unresponsive. Also check the HTTP status code before attempting to parse the response body. * fix: fall back to node address when PublicUrl is empty Prevents blank links in the admin dashboard when PublicUrl is not configured, such as in standalone or mixed-version clusters. * fix: log io.ReadAll error in fetchPublicUrlMap --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> Co-authored-by: Chris Lu <chris.lu@gmail.com>
90 lines
3.1 KiB
YAML
90 lines
3.1 KiB
YAML
{{- if .Values.allInOne.enabled }}
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: {{ include "seaweedfs.componentName" (list . "all-in-one") }}
|
|
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.service.annotations }}
|
|
annotations:
|
|
{{- toYaml .Values.allInOne.service.annotations | nindent 4 }}
|
|
{{- end }}
|
|
spec:
|
|
type: {{ .Values.allInOne.service.type | default "ClusterIP" }}
|
|
internalTrafficPolicy: {{ .Values.allInOne.service.internalTrafficPolicy | default "Cluster" }}
|
|
{{- if and (semverCompare ">=1.31-0" .Capabilities.KubeVersion.GitVersion) .Values.allInOne.s3.trafficDistribution }}
|
|
trafficDistribution: {{ include "seaweedfs.trafficDistribution" (dict "value" .Values.allInOne.s3.trafficDistribution "Capabilities" .Capabilities) }}
|
|
{{- end }}
|
|
ports:
|
|
# Master ports
|
|
- name: "swfs-master"
|
|
port: {{ .Values.master.port }}
|
|
targetPort: {{ .Values.master.port }}
|
|
protocol: TCP
|
|
- name: "swfs-master-grpc"
|
|
port: {{ .Values.master.grpcPort }}
|
|
targetPort: {{ .Values.master.grpcPort }}
|
|
protocol: TCP
|
|
|
|
# Volume ports
|
|
- name: "swfs-volume"
|
|
port: {{ .Values.volume.port }}
|
|
targetPort: {{ .Values.volume.port }}
|
|
protocol: TCP
|
|
- name: "swfs-volume-grpc"
|
|
port: {{ .Values.volume.grpcPort }}
|
|
targetPort: {{ .Values.volume.grpcPort }}
|
|
protocol: TCP
|
|
|
|
# Filer ports
|
|
- name: "swfs-filer"
|
|
port: {{ .Values.filer.port }}
|
|
targetPort: {{ .Values.filer.port }}
|
|
protocol: TCP
|
|
- name: "swfs-filer-grpc"
|
|
port: {{ .Values.filer.grpcPort }}
|
|
targetPort: {{ .Values.filer.grpcPort }}
|
|
protocol: TCP
|
|
|
|
# S3 ports (if enabled)
|
|
{{- if .Values.allInOne.s3.enabled }}
|
|
- name: "swfs-s3"
|
|
port: {{ .Values.allInOne.s3.port | default .Values.s3.port }}
|
|
targetPort: {{ .Values.allInOne.s3.port | default .Values.s3.port }}
|
|
protocol: TCP
|
|
{{- $httpsPort := .Values.allInOne.s3.httpsPort | default .Values.s3.httpsPort }}
|
|
{{- if $httpsPort }}
|
|
- name: "swfs-s3-tls"
|
|
port: {{ $httpsPort }}
|
|
targetPort: {{ $httpsPort }}
|
|
protocol: TCP
|
|
{{- end }}
|
|
{{- end }}
|
|
|
|
# SFTP ports (if enabled)
|
|
{{- if .Values.allInOne.sftp.enabled }}
|
|
- name: "swfs-sftp"
|
|
port: {{ .Values.allInOne.sftp.port | default .Values.sftp.port }}
|
|
targetPort: {{ .Values.allInOne.sftp.port | default .Values.sftp.port }}
|
|
protocol: TCP
|
|
{{- end }}
|
|
|
|
# Server metrics port (single metrics endpoint for all services)
|
|
{{- if .Values.allInOne.metricsPort }}
|
|
- name: "server-metrics"
|
|
port: {{ .Values.allInOne.metricsPort }}
|
|
targetPort: {{ .Values.allInOne.metricsPort }}
|
|
protocol: TCP
|
|
{{- end }}
|
|
|
|
selector:
|
|
app.kubernetes.io/name: {{ template "seaweedfs.name" . }}
|
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
|
app.kubernetes.io/component: seaweedfs-all-in-one
|
|
{{- end }}
|