diff --git a/helm/rustfs/Chart.yaml b/helm/rustfs/Chart.yaml index 1027301bf..4d812c2f4 100644 --- a/helm/rustfs/Chart.yaml +++ b/helm/rustfs/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 name: rustfs description: RustFS helm chart to deploy RustFS on kubernetes cluster. type: application -version: "0.4.0" +version: "0.4.1" appVersion: "1.0.0-beta.4" home: https://rustfs.com icon: https://media.sys.truenas.net/apps/rustfs/icons/icon.svg diff --git a/helm/rustfs/templates/service.yaml b/helm/rustfs/templates/service.yaml index 56d6b146b..c600e3ccc 100644 --- a/helm/rustfs/templates/service.yaml +++ b/helm/rustfs/templates/service.yaml @@ -51,6 +51,18 @@ spec: sessionAffinityConfig: clientIP: timeoutSeconds: 10800 + {{- else if eq $serviceType "LoadBalancer" }} + type: LoadBalancer + {{- with .Values.service.loadBalancerIP }} + loadBalancerIP: {{ . }} + {{- end }} + {{- with .Values.service.loadBalancerClass }} + loadBalancerClass: {{ . }} + {{- end }} + {{- with .Values.service.loadBalancerSourceRanges }} + loadBalancerSourceRanges: + {{- toYaml . | nindent 4 }} + {{- end }} {{- end }} ports: - name: endpoint diff --git a/helm/rustfs/values.yaml b/helm/rustfs/values.yaml index c3784c2c4..740e71ca4 100644 --- a/helm/rustfs/values.yaml +++ b/helm/rustfs/values.yaml @@ -176,6 +176,10 @@ service: traefik.ingress.kubernetes.io/service.sticky.cookie.samesite: none traefik.ingress.kubernetes.io/service.sticky.cookie.secure: "true" type: ClusterIP + # LoadBalancer-specific fields (only used when type=LoadBalancer) + loadBalancerIP: "" # Request a specific IP from the load balancer (e.g. for Cilium LB-IPAM or MetalLB) + loadBalancerClass: "" # Specify a load balancer implementation (e.g. "io.cilium/bgp", "metallb") + loadBalancerSourceRanges: [] # Restrict client IPs (e.g. ["10.0.0.0/8"]) endpoint: port: 9000 nodePort: 32000