mirror of
https://github.com/rustfs/rustfs.git
synced 2026-08-11 23:56:53 +00:00
helm: fix service/containers ports, fix podAntiAffinity (#1230)
Co-authored-by: majinghe <42570491+majinghe@users.noreply.github.com>
This commit is contained in:
@@ -104,10 +104,10 @@ Render RUSTFS_VOLUMES
|
||||
*/}}
|
||||
{{- define "rustfs.volumes" -}}
|
||||
{{- if eq (int .Values.replicaCount) 4 }}
|
||||
{{- printf "http://%s-{0...%d}.%s-headless:%d/data/rustfs{0...%d}" (include "rustfs.fullname" .) (sub (.Values.replicaCount | int) 1) (include "rustfs.fullname" . ) (.Values.service.ep_port | int) (sub (.Values.replicaCount | int) 1) }}
|
||||
{{- printf "http://%s-{0...%d}.%s-headless:%d/data/rustfs{0...%d}" (include "rustfs.fullname" .) (sub (.Values.replicaCount | int) 1) (include "rustfs.fullname" . ) (.Values.service.endpoint.port | int) (sub (.Values.replicaCount | int) 1) }}
|
||||
{{- end }}
|
||||
{{- if eq (int .Values.replicaCount) 16 }}
|
||||
{{- printf "http://%s-{0...%d}.%s-headless:%d/data" (include "rustfs.fullname" .) (sub (.Values.replicaCount | int) 1) (include "rustfs.fullname" .) (.Values.service.ep_port | int) }}
|
||||
{{- printf "http://%s-{0...%d}.%s-headless:%d/data" (include "rustfs.fullname" .) (sub (.Values.replicaCount | int) 1) (include "rustfs.fullname" .) (.Values.service.endpoint.port | int) }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
|
||||
@@ -83,10 +83,10 @@ spec:
|
||||
{{- toYaml .Values.containerSecurityContext | nindent 12 }}
|
||||
{{- end }}
|
||||
ports:
|
||||
- containerPort: {{ .Values.service.ep_port }}
|
||||
name: endpoint
|
||||
- containerPort: {{ .Values.service.console_port }}
|
||||
name: console
|
||||
- name: endpoint
|
||||
containerPort: {{ .Values.service.endpoint.port }}
|
||||
- name: console
|
||||
containerPort: {{ .Values.service.console.port }}
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: {{ include "rustfs.fullname" . }}-config
|
||||
|
||||
@@ -42,6 +42,7 @@ spec:
|
||||
{{- else }}
|
||||
{}
|
||||
{{- if .Values.affinity.podAntiAffinity.enabled }}
|
||||
{{- end }}
|
||||
podAntiAffinity:
|
||||
requiredDuringSchedulingIgnoredDuringExecution:
|
||||
- labelSelector:
|
||||
@@ -52,7 +53,6 @@ spec:
|
||||
- {{ include "rustfs.name" . }}
|
||||
topologyKey: {{ .Values.affinity.podAntiAffinity.topologyKey }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if .Values.tolerations }}
|
||||
tolerations:
|
||||
@@ -111,10 +111,10 @@ spec:
|
||||
{{- toYaml .Values.containerSecurityContext | nindent 12 }}
|
||||
{{- end }}
|
||||
ports:
|
||||
- containerPort: {{ .Values.service.ep_port }}
|
||||
name: endpoint
|
||||
- containerPort: {{ .Values.service.console_port }}
|
||||
name: console
|
||||
- name: endpoint
|
||||
containerPort: {{ .Values.service.endpoint.port }}
|
||||
- name: console
|
||||
containerPort: {{ .Values.service.console.port }}
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: {{ include "rustfs.fullname" . }}-config
|
||||
|
||||
@@ -11,5 +11,5 @@ spec:
|
||||
- name: wget
|
||||
image: busybox
|
||||
command: ['wget']
|
||||
args: ['-O', '/dev/null', '{{ include "rustfs.fullname" . }}-svc:{{ .Values.service.ep_port }}/health']
|
||||
args: ['-O', '/dev/null', '{{ include "rustfs.fullname" . }}-svc:{{ .Values.service.endpoint.port }}/health']
|
||||
restartPolicy: Never
|
||||
|
||||
Reference in New Issue
Block a user