Some checks failed
go: build dev binaries / cleanup (push) Successful in 4s
Codespell / Check for spelling errors (push) Failing after 3s
docker: build dev containers / build-rust-binaries (amd64, x86_64-unknown-linux-musl) (push) Failing after 3s
docker: build dev containers / build-dev-containers (push) Has been skipped
docker: build dev containers / build-rust-binaries (arm64, true, aarch64-unknown-linux-musl) (push) Failing after 3s
End to End / FUSE Mount (push) Failing after 2s
EC Integration Tests / EC Integration Tests (push) Failing after 30s
FUSE DLM Integration Tests / FUSE DLM Integration Tests (push) Failing after 3s
FUSE Volume Server Failover Tests / FUSE Volume Server Failover (push) Failing after 3s
FUSE Integration Tests / FUSE Integration Testing (push) Failing after 2s
FUSE P2P Peer Chunk Sharing Integration Tests / FUSE P2P Peer Chunk Sharing (push) Failing after 3s
go: build binary / Go Vet (push) Failing after 2s
go: build binary / Go Vet 32-bit (push) Failing after 3s
go: build binary / Build (push) Failing after 4s
go: build binary / Build cross-platform (freebsd/amd64) (push) Failing after 3s
go: build binary / Build cross-platform (windows/amd64) (push) Failing after 3s
go: build binary / Build cross-platform (darwin/arm64) (push) Failing after 3s
go: build binary / Build cross-platform (windows/arm64) (push) Failing after 3s
go: build binary / Test (push) Failing after 2s
go: build binary / Test 32-bit (push) Failing after 3s
helm: lint and test charts / lint-test (push) Failing after 3s
Java Client Integration Tests / Java Integration Tests (11) (push) Failing after 3s
Java Client Integration Tests / Java Integration Tests (17) (push) Failing after 3s
go: build dev binaries / build_dev_linux_windows (amd64, linux) (push) Failing after 2s
go: build dev binaries / build_dev_linux_windows (amd64, windows) (push) Failing after 3s
go: build dev binaries / build_dev_darwin (amd64, darwin) (push) Has been skipped
go: build dev binaries / build_dev_darwin (arm64, darwin) (push) Has been skipped
Java Client Unit Tests / Java Unit Tests (11) (push) Failing after 3s
Java Client Unit Tests / Java Unit Tests (17) (push) Failing after 2s
Java Client Unit Tests / Java Unit Tests (21) (push) Failing after 3s
Java Client Unit Tests / Java Unit Tests (8) (push) Failing after 3s
Kafka Quick Test (Load Test with Schema Registry) / Kafka Client Load Test (Quick) (push) Failing after 3s
Kafka Gateway Tests / Kafka Unit Tests (unit-tests-1) (push) Failing after 11s
Kafka Gateway Tests / Kafka Integration Tests (Critical) (integration-1) (push) Failing after 3s
Kafka Gateway Tests / Kafka End-to-End Tests (with SMQ) (e2e-1) (push) Failing after 3s
Kafka Gateway Tests / Kafka Consumer Group Tests (Highly Isolated) (consumer-group-1) (push) Failing after 2s
Kafka Gateway Tests / Kafka Client Compatibility (with SMQ) (client-compat-1) (push) Failing after 3s
Kafka Gateway Tests / Kafka SMQ Integration Tests (Full Stack) (smq-integration-1) (push) Failing after 3s
Kafka Gateway Tests / Kafka Protocol Tests (Isolated) (protocol-1) (push) Failing after 3s
KMS Tests / KMS Provider Integration Tests (push) Failing after 2s
KMS Tests / S3 KMS End-to-End Tests (push) Failing after 3s
Master Cold Start Tests / Master Cold Start Tests (push) Failing after 4s
Metadata Subscribe Integration Tests / Metadata Subscribe Integration Tests (push) Failing after 3s
Multi-Master Tests / Multi-Master Failover Tests (push) Failing after 3s
Performance / CPU and Heap Profile (push) Failing after 2s
Performance / S3 Read/Write Benchmark (rust volume) (push) Failing after 3s
pjdfstest POSIX Compliance / pjdfstest (push) Failing after 2s
Plugin Worker Integration Tests / Plugin Worker: erasure_coding (push) Failing after 3s
Plugin Worker Integration Tests / Plugin Worker: vacuum (push) Failing after 3s
Rust Volume Server Tests / Rust Integration Tests (push) Failing after 3s
Rust Volume Server Tests / Go Tests with Rust Volume (grpc - Shard 1) (push) Failing after 2s
Rust Volume Server Tests / Go Tests with Rust Volume (http - Shard 1) (push) Failing after 3s
Rust Volume Server Tests / Go Tests with Rust Volume (grpc - Shard 2) (push) Failing after 3s
Rust Volume Server Tests / Go Tests with Rust Volume (http - Shard 2) (push) Failing after 3s
Rust Volume Server Tests / Go Tests with Rust Volume (grpc - Shard 3) (push) Failing after 3s
S3 IAM Integration Tests / S3 IAM Distributed Tests (push) Failing after 2s
S3 IAM Integration Tests / S3 IAM Performance Tests (push) Failing after 3s
Performance / Throughput Benchmark (go volume) (push) Failing after 3s
Performance / Throughput Benchmark (rust volume) (push) Failing after 2s
Performance / S3 Read/Write Benchmark (go volume) (push) Failing after 3s
Plugin Worker Integration Tests / Plugin Worker: volume_balance (push) Failing after 3s
PostgreSQL Gateway Tests / PostgreSQL Basic Tests (push) Failing after 3s
Rust Volume Server Tests / Rust Unit Tests (push) Failing after 2s
Rust Volume Server Tests / Go Tests with Rust Volume (http - Shard 3) (push) Failing after 3s
Rust Plugin Worker Tests / Rust Plugin Worker Build and Unit Tests (push) Failing after 3s
rust: build dev volume server binaries / cleanup (push) Successful in 3s
S3 ETag and ACL Tests / S3 ETag + ACL Integration Tests (push) Failing after 3s
S3 IAM Integration Tests / IAM Unit Tests (push) Failing after 3s
S3 IAM Integration Tests / S3 IAM Integration Tests (advanced) (push) Failing after 3s
S3 IAM Integration Tests / S3 IAM Integration Tests (basic) (push) Failing after 2s
S3 IAM Integration Tests / S3 IAM Integration Tests (group) (push) Failing after 3s
S3 IAM Integration Tests / S3 IAM Integration Tests (policy-enforcement) (push) Failing after 2s
S3 IAM Integration Tests / S3 IAM Integration Tests (sts) (push) Failing after 4s
S3 Keycloak Integration Tests / S3 Keycloak Integration Tests (push) Failing after 3s
S3 PyArrow Parquet Tests / PyArrow Parquet Tests (Python 3.11) (push) Failing after 3s
S3 PyArrow Parquet Tests / Go Unit Tests (Implicit Directory) (push) Has been cancelled
S3 PyArrow Parquet Tests / PyArrow Parquet Tests (Python 3.12) (push) Has been cancelled
rust: build dev volume server binaries / build-rust-volume-dev-darwin (darwin-amd64, x86_64-apple-darwin) (push) Has been cancelled
rust: build dev volume server binaries / build-rust-volume-dev-darwin (darwin-arm64, aarch64-apple-darwin) (push) Has been cancelled
rust: build dev volume server binaries / build-rust-volume-dev-linux (linux-amd64, x86_64-unknown-linux-gnu) (push) Has been cancelled
S3 PyArrow Parquet Tests / PyArrow Parquet Tests (Python 3.9) (push) Has been cancelled
S3 Proxy Signature Tests / S3 Proxy Signature Verification Tests (push) Has been cancelled
S3 SDK V2 Route Disambiguation Tests / S3 SDK V2 Routing Tests (push) Has been cancelled
S3 SSE Tests / S3 SSE Integration Tests (quick) (push) Has been cancelled
S3 SSE Tests / S3 SSE Compatibility Test (push) Has been cancelled
S3 SSE Tests / S3 SSE Metadata Persistence Test (push) Has been cancelled
S3 SSE Tests / S3 SSE Copy Operations Test (push) Has been cancelled
S3 SSE Tests / S3 SSE Multipart Upload Test (push) Has been cancelled
S3 SSE Tests / S3 SSE Performance Test (push) Has been cancelled
S3 SSE Tests / S3 Volume Encryption Test (push) Has been cancelled
S3 SSE Tests / S3 SSE Integration Tests (comprehensive) (push) Has been cancelled
Spark Integration Tests / Spark Integration Tests (push) Failing after 2s
Telemetry Integration Tests / telemetry-integration-test (push) Failing after 3s
Volume Server Integration Tests / Volume Server Integration Tests (grpc - Shard 1) (push) Failing after 3s
Volume Server Integration Tests / Volume Server Integration Tests (http - Shard 1) (push) Failing after 3s
Ceph S3 tests / Basic S3 tests (KV store) (push) Has been cancelled
Ceph S3 tests / S3 Versioning & Object Lock tests (push) Has been cancelled
S3 Policy Integration Tests / S3 Policy Unit Tests (push) Failing after 3s
Ceph S3 tests / S3 CORS tests (push) Has been cancelled
Ceph S3 tests / SeaweedFS Custom S3 Copy tests (push) Has been cancelled
Ceph S3 tests / Basic S3 tests (SQL store) (push) Has been cancelled
test s3 over https using aws-cli / awscli-tests (push) Has been cancelled
TLS Rotation Integration Tests / TLS Rotation Integration Tests (push) Has been cancelled
Vacuum Integration Tests / Vacuum Integration Tests (push) Has been cancelled
S3 Policy Integration Tests / S3 Policy Variables Integration Tests (push) Failing after 3s
S3 Policy Integration Tests / S3 Policy Enforcement Integration Tests (advanced-policy) (push) Failing after 3s
S3 Policy Integration Tests / S3 Policy Enforcement Integration Tests (basic-policy) (push) Failing after 2s
S3 Policy Integration Tests / S3 Policy Enforcement Integration Tests (contextual-policy) (push) Failing after 4s
S3 Policy Integration Tests / Trusted Proxy Detection Tests (push) Failing after 2s
S3 Policy Integration Tests / S3 Policy Shell Integration Tests (push) Failing after 3s
Samba on FUSE Integration / samba-integration (push) Failing after 2s
SFTP Integration Tests / SFTP Integration Testing (push) Failing after 3s
terraform: validate and test modules / fmt, validate, plan-level tests (push) Failing after 3s
terraform: validate and test modules / local cluster smoke test (real weed) (push) Failing after 2s
Volume Server Integration Tests / Volume Server Integration Tests (grpc - Shard 3) (push) Failing after 3s
Volume Server Integration Tests / Volume Server Integration Tests (grpc - Shard 2) (push) Failing after 3s
Volume Server Integration Tests / Volume Server Integration Tests (http - Shard 2) (push) Failing after 2s
Volume Server Integration Tests / Volume Server Integration Tests (http - Shard 3) (push) Failing after 5s
mount: windows conformance / WinFsp conformance (push) Has been cancelled
mount: windows / Mount on Windows (push) Has been cancelled
448 lines
18 KiB
YAML
448 lines
18 KiB
YAML
{{- include "seaweedfs.compat" . -}}
|
|
{{ $volumes := deepCopy .Values.volumes | mergeOverwrite (dict "" .Values.volume) }}
|
|
{{- range $vname, $volume := $volumes }}
|
|
{{- $volumeName := trimSuffix "-" (printf "volume-%s" $vname) }}
|
|
{{- $volume := mergeOverwrite (deepCopy $.Values.volume) (dict "enabled" true) $volume }}
|
|
|
|
{{- if and $volume.idx (eq ($volume.idx.type | toString) "emptyDir") }}
|
|
{{- fail (printf "%s: idx.type \"emptyDir\" is not supported. An ephemeral index is wiped on every pod restart while the data persists, forcing a full index rebuild from the .dat on each start (a fatal crash on older versions). Use the default (idx: {}, kept next to the data) or a persistentVolumeClaim/hostPath/existingClaim for a separate persistent index." $volumeName) }}
|
|
{{- end }}
|
|
|
|
{{- if $volume.enabled }}
|
|
---
|
|
apiVersion: apps/v1
|
|
kind: StatefulSet
|
|
metadata:
|
|
name: {{ include "seaweedfs.componentName" (list $ $volumeName) }}
|
|
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: {{ $volumeName }}
|
|
{{- if $volume.annotations }}
|
|
annotations:
|
|
{{- toYaml $volume.annotations | nindent 4 }}
|
|
{{- end }}
|
|
spec:
|
|
serviceName: {{ include "seaweedfs.componentName" (list $ $volumeName) }}
|
|
replicas: {{ $volume.replicas }}
|
|
podManagementPolicy: {{ $volume.podManagementPolicy }}
|
|
selector:
|
|
matchLabels:
|
|
app.kubernetes.io/name: {{ template "seaweedfs.name" $ }}
|
|
app.kubernetes.io/instance: {{ $.Release.Name }}
|
|
app.kubernetes.io/component: {{ $volumeName }}
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app.kubernetes.io/name: {{ template "seaweedfs.name" $ }}
|
|
helm.sh/chart: {{ $.Chart.Name }}-{{ $.Chart.Version | replace "+" "_" }}
|
|
app.kubernetes.io/instance: {{ $.Release.Name }}
|
|
app.kubernetes.io/component: {{ $volumeName }}
|
|
{{ with $.Values.podLabels }}
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
{{- with $volume.podLabels }}
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
annotations:
|
|
{{ with $.Values.podAnnotations }}
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
{{- with $volume.podAnnotations }}
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
spec:
|
|
{{- if $volume.affinity }}
|
|
affinity:
|
|
{{ tpl (printf "{{ $volumeName := \"%s\" }}%s" $volumeName $volume.affinity) $ | indent 8 | trim }}
|
|
{{- end }}
|
|
{{- if $volume.topologySpreadConstraints }}
|
|
topologySpreadConstraints:
|
|
{{ tpl (printf "{{ $volumeName := \"%s\" }}%s" $volumeName $volume.topologySpreadConstraints) $ | nindent 8 | trim }}
|
|
{{- end }}
|
|
restartPolicy: {{ default $.Values.global.seaweedfs.restartPolicy $volume.restartPolicy }}
|
|
{{- if $volume.tolerations }}
|
|
tolerations:
|
|
{{ tpl (printf "{{ $volumeName := \"%s\" }}%s" $volumeName $volume.tolerations) $ | indent 8 | trim }}
|
|
{{- end }}
|
|
{{- include "seaweedfs.imagePullSecrets" $ | nindent 6 }}
|
|
terminationGracePeriodSeconds: 150
|
|
{{- if $volume.priorityClassName }}
|
|
priorityClassName: {{ $volume.priorityClassName | quote }}
|
|
{{- end }}
|
|
{{- if $volume.schedulerName }}
|
|
schedulerName: {{ $volume.schedulerName | quote }}
|
|
{{- end }}
|
|
enableServiceLinks: false
|
|
serviceAccountName: {{ $volume.serviceAccountName | default (include "seaweedfs.serviceAccountName" $) | quote }} # for deleting statefulset pods after migration
|
|
{{- $initContainers_exists := include "seaweedfs.volume.initContainers_exists" $ -}}
|
|
{{- if $initContainers_exists }}
|
|
initContainers:
|
|
{{- if $volume.idx }}
|
|
- name: seaweedfs-vol-move-idx
|
|
image: {{ template "seaweedfs.volume.image" $ }}
|
|
imagePullPolicy: {{ $.Values.global.seaweedfs.imagePullPolicy | default "IfNotPresent" }}
|
|
command: [ '/bin/sh', '-c' ]
|
|
args:
|
|
- |
|
|
for dir in {{ range $index, $dir := $volume.dataDirs }}{{ if ne $index 0 }} {{ end }}/{{ $dir.name }}{{ end }}; do
|
|
# Rebuild a .idx missing from both dirs (e.g. an index volume that lost files) from the .dat, else the server fatally exits on its idx check.
|
|
for dat in "$dir"/*.dat; do
|
|
[ -e "$dat" ] || continue
|
|
base=${dat##*/}; base=${base%.dat}
|
|
if [ ! -e "$dir/$base.idx" ] && [ ! -e "/idx/$base.idx" ]; then
|
|
echo "rebuilding missing idx in $dir (trigger: volume $base)"
|
|
weed fix "$dir"
|
|
break
|
|
fi
|
|
done
|
|
if ls "$dir"/*.idx >/dev/null 2>&1; then
|
|
mv "$dir"/*.idx /idx/
|
|
fi
|
|
done
|
|
volumeMounts:
|
|
- name: idx
|
|
mountPath: /idx
|
|
{{- range $dir := $volume.dataDirs }}
|
|
- name: {{ $dir.name }}
|
|
mountPath: /{{ $dir.name }}
|
|
{{- end }}
|
|
{{- with $volume.idxVolMoveResources }}
|
|
resources:
|
|
{{- toYaml . | nindent 12 }}
|
|
{{- end }}
|
|
{{- if $volume.containerSecurityContext.enabled }}
|
|
securityContext: {{- omit $volume.containerSecurityContext "enabled" | toYaml | nindent 12 }}
|
|
{{- end }}
|
|
{{- end }}
|
|
{{- if $volume.initContainers }}
|
|
{{ tpl (printf "{{ $volumeName := \"%s\" }}%s" $volumeName $volume.initContainers) $ | indent 8 | trim }}
|
|
{{- end }}
|
|
{{- end }}
|
|
{{- if $volume.podSecurityContext.enabled }}
|
|
securityContext: {{- omit $volume.podSecurityContext "enabled" | toYaml | nindent 8 }}
|
|
{{- end }}
|
|
containers:
|
|
- name: seaweedfs
|
|
image: {{ template "seaweedfs.volume.image" $ }}
|
|
imagePullPolicy: {{ default "IfNotPresent" $.Values.global.seaweedfs.imagePullPolicy }}
|
|
env:
|
|
- name: POD_NAME
|
|
valueFrom:
|
|
fieldRef:
|
|
fieldPath: metadata.name
|
|
- name: NAMESPACE
|
|
valueFrom:
|
|
fieldRef:
|
|
fieldPath: metadata.namespace
|
|
- name: HOST_IP
|
|
valueFrom:
|
|
fieldRef:
|
|
fieldPath: status.hostIP
|
|
- name: SEAWEEDFS_FULLNAME
|
|
value: "{{ include "seaweedfs.fullname" $ }}"
|
|
{{- $mergedExtraEnvironmentVars := dict }}
|
|
{{- include "seaweedfs.mergeExtraEnvironmentVars" (dict "global" $.Values.global.seaweedfs "component" $volume "target" $mergedExtraEnvironmentVars) }}
|
|
{{- range $key := keys $mergedExtraEnvironmentVars | sortAlpha }}
|
|
{{- $value := index $mergedExtraEnvironmentVars $key }}
|
|
- name: {{ $key }}
|
|
{{- if kindIs "string" $value }}
|
|
value: {{ tpl $value $ | quote }}
|
|
{{- else }}
|
|
valueFrom:
|
|
{{ toYaml $value | nindent 16 | trim }}
|
|
{{- end -}}
|
|
{{- end }}
|
|
command:
|
|
- "/bin/sh"
|
|
- "-ec"
|
|
- |
|
|
{{- if $volume.rust }}
|
|
exec /usr/bin/weed-volume \
|
|
{{- else }}
|
|
exec /usr/bin/weed \
|
|
{{- if $volume.logs }}
|
|
-logdir=/logs \
|
|
{{- else }}
|
|
-logtostderr=true \
|
|
{{- end }}
|
|
{{- if $volume.loggingOverrideLevel }}
|
|
-v={{ $volume.loggingOverrideLevel }} \
|
|
{{- else }}
|
|
-v={{ $.Values.global.seaweedfs.loggingLevel }} \
|
|
{{- end }}
|
|
volume \
|
|
{{- end }}
|
|
-port={{ $volume.port }} \
|
|
{{- if $volume.metricsPort }}
|
|
-metricsPort={{ $volume.metricsPort }} \
|
|
{{- end }}
|
|
{{- if $volume.metricsIp }}
|
|
-metricsIp={{ $volume.metricsIp }} \
|
|
{{- end }}
|
|
-dir {{range $index, $dir := $volume.dataDirs }}{{if ne $index 0}},{{end}}/{{$dir.name}}{{end}} \
|
|
{{- if $volume.idx }}
|
|
-dir.idx=/idx \
|
|
{{- end }}
|
|
-max {{range $index, $dir := $volume.dataDirs }}{{if ne $index 0}},{{end}}
|
|
{{- if eq ($dir.maxVolumes | toString) "0" }}0{{ else if not $dir.maxVolumes }}7{{ else }}{{$dir.maxVolumes}}{{ end }}
|
|
{{- end }} \
|
|
{{- if $volume.rack }}
|
|
-rack={{ $volume.rack }} \
|
|
{{- end }}
|
|
{{- if $volume.dataCenter }}
|
|
-dataCenter={{ $volume.dataCenter }} \
|
|
{{- end }}
|
|
{{- if $volume.id }}
|
|
-id={{ $volume.id }} \
|
|
{{- end }}
|
|
-ip.bind={{ $volume.ipBind }} \
|
|
-readMode={{ $volume.readMode }} \
|
|
{{- if $volume.whiteList }}
|
|
-whiteList={{ $volume.whiteList }} \
|
|
{{- end }}
|
|
{{- if $volume.imagesFixOrientation }}
|
|
-images.fix.orientation \
|
|
{{- end }}
|
|
{{- if and $volume.pulseSeconds (not $volume.rust) }}
|
|
-pulseSeconds={{ $volume.pulseSeconds }} \
|
|
{{- end }}
|
|
{{- if $volume.index }}
|
|
-index={{ $volume.index }} \
|
|
{{- end }}
|
|
{{- if $volume.fileSizeLimitMB }}
|
|
-fileSizeLimitMB={{ $volume.fileSizeLimitMB }} \
|
|
{{- end }}
|
|
-minFreeSpacePercent={{ $volume.minFreeSpacePercent }} \
|
|
-ip=${POD_NAME}.{{ include "seaweedfs.componentName" (list $ $volumeName) }}.{{ $.Release.Namespace }} \
|
|
-compactionMBps={{ $volume.compactionMBps }} \
|
|
-master={{ include "seaweedfs.masterServerArg" $ }} \
|
|
{{- range $volume.extraArgs }}
|
|
{{ . }} \
|
|
{{- end }}
|
|
volumeMounts:
|
|
{{- range $dir := $volume.dataDirs }}
|
|
{{- if not ( eq $dir.type "custom" ) }}
|
|
- name: {{ $dir.name }}
|
|
mountPath: "/{{ $dir.name }}/"
|
|
{{- end }}
|
|
{{- end }}
|
|
{{- if $volume.logs }}
|
|
- name: logs
|
|
mountPath: "/logs/"
|
|
{{- end }}
|
|
{{- if $volume.idx }}
|
|
- name: idx
|
|
mountPath: "/idx/"
|
|
{{- end }}
|
|
{{- if include "seaweedfs.securityConfigEnabled" $ }}
|
|
- name: security-config
|
|
readOnly: true
|
|
mountPath: /etc/seaweedfs/security.toml
|
|
subPath: security.toml
|
|
{{- end }}
|
|
{{- if $.Values.global.seaweedfs.enableSecurity }}
|
|
- name: ca-cert
|
|
readOnly: true
|
|
mountPath: /usr/local/share/ca-certificates/ca/
|
|
- name: master-cert
|
|
readOnly: true
|
|
mountPath: /usr/local/share/ca-certificates/master/
|
|
- name: volume-cert
|
|
readOnly: true
|
|
mountPath: /usr/local/share/ca-certificates/volume/
|
|
- name: filer-cert
|
|
readOnly: true
|
|
mountPath: /usr/local/share/ca-certificates/filer/
|
|
- name: client-cert
|
|
readOnly: true
|
|
mountPath: /usr/local/share/ca-certificates/client/
|
|
{{- end }}
|
|
{{ tpl (printf "{{ $volumeName := \"%s\" }}%s" $volumeName $volume.extraVolumeMounts) $ | indent 12 | trim }}
|
|
ports:
|
|
- containerPort: {{ $volume.port }}
|
|
name: swfs-vol
|
|
{{- if $volume.metricsPort }}
|
|
- containerPort: {{ $volume.metricsPort }}
|
|
name: metrics
|
|
{{- end }}
|
|
- containerPort: {{ $volume.grpcPort }}
|
|
name: swfs-vol-grpc
|
|
{{- if $volume.readinessProbe.enabled }}
|
|
readinessProbe:
|
|
httpGet:
|
|
path: {{ $volume.readinessProbe.httpGet.path }}
|
|
port: {{ $volume.port }}
|
|
scheme: {{ $volume.readinessProbe.httpGet.scheme }}
|
|
initialDelaySeconds: {{ $volume.readinessProbe.initialDelaySeconds }}
|
|
periodSeconds: {{ $volume.readinessProbe.periodSeconds }}
|
|
successThreshold: {{ $volume.readinessProbe.successThreshold }}
|
|
failureThreshold: {{ $volume.readinessProbe.failureThreshold }}
|
|
timeoutSeconds: {{ $volume.readinessProbe.timeoutSeconds }}
|
|
{{- end }}
|
|
{{- if $volume.livenessProbe.enabled }}
|
|
livenessProbe:
|
|
httpGet:
|
|
path: {{ $volume.livenessProbe.httpGet.path }}
|
|
port: {{ $volume.port }}
|
|
scheme: {{ $volume.livenessProbe.httpGet.scheme }}
|
|
initialDelaySeconds: {{ $volume.livenessProbe.initialDelaySeconds }}
|
|
periodSeconds: {{ $volume.livenessProbe.periodSeconds }}
|
|
successThreshold: {{ $volume.livenessProbe.successThreshold }}
|
|
failureThreshold: {{ $volume.livenessProbe.failureThreshold }}
|
|
timeoutSeconds: {{ $volume.livenessProbe.timeoutSeconds }}
|
|
{{- end }}
|
|
{{- with $volume.resources }}
|
|
resources:
|
|
{{- toYaml . | nindent 12 }}
|
|
{{- end }}
|
|
{{- if $volume.containerSecurityContext.enabled }}
|
|
securityContext: {{- omit $volume.containerSecurityContext "enabled" | toYaml | nindent 12 }}
|
|
{{- end }}
|
|
{{- if $volume.sidecars }}
|
|
{{- include "seaweedfs.tplvalues.render" (dict "value" (printf "{{ $volumeName := \"%s\" }}%s" $volumeName $volume.sidecars) "context" $) | nindent 8 }}
|
|
{{- end }}
|
|
volumes:
|
|
|
|
{{- range $dir := $volume.dataDirs }}
|
|
|
|
{{- if eq $dir.type "hostPath" }}
|
|
- name: {{ $dir.name }}
|
|
hostPath:
|
|
path: {{ $dir.hostPathPrefix }}/object_store/
|
|
type: DirectoryOrCreate
|
|
{{- end }}
|
|
{{- if eq $dir.type "existingClaim" }}
|
|
- name: {{ $dir.name }}
|
|
persistentVolumeClaim:
|
|
claimName: {{ $dir.claimName }}
|
|
{{- end }}
|
|
{{- if eq $dir.type "emptyDir" }}
|
|
- name: {{ $dir.name }}
|
|
emptyDir: {}
|
|
{{- end }}
|
|
|
|
{{- end }}
|
|
|
|
{{- if $volume.idx }}
|
|
{{- if eq $volume.idx.type "hostPath" }}
|
|
- name: idx
|
|
hostPath:
|
|
path: {{ $volume.idx.hostPathPrefix }}/seaweedfs-volume-idx/
|
|
type: DirectoryOrCreate
|
|
{{- end }}
|
|
{{- if eq $volume.idx.type "existingClaim" }}
|
|
- name: idx
|
|
persistentVolumeClaim:
|
|
claimName: {{ $volume.idx.claimName }}
|
|
{{- end }}
|
|
{{- if eq $volume.idx.type "emptyDir" }}
|
|
- name: idx
|
|
emptyDir: {}
|
|
{{- end }}
|
|
{{- end }}
|
|
|
|
{{- if $volume.logs }}
|
|
{{- if eq $volume.logs.type "hostPath" }}
|
|
- name: logs
|
|
hostPath:
|
|
path: {{ $volume.logs.hostPathPrefix }}/logs/seaweedfs/volume
|
|
type: DirectoryOrCreate
|
|
{{- end }}
|
|
{{- if eq $volume.logs.type "existingClaim" }}
|
|
- name: logs
|
|
persistentVolumeClaim:
|
|
claimName: {{ $volume.logs.claimName }}
|
|
{{- end }}
|
|
{{- if eq $volume.logs.type "emptyDir" }}
|
|
- name: logs
|
|
emptyDir: {}
|
|
{{- end }}
|
|
{{- end }}
|
|
{{- if include "seaweedfs.securityConfigEnabled" $ }}
|
|
- name: security-config
|
|
configMap:
|
|
name: {{ include "seaweedfs.fullname" $ }}-security-config
|
|
{{- end }}
|
|
{{- if $.Values.global.seaweedfs.enableSecurity }}
|
|
- name: ca-cert
|
|
secret:
|
|
secretName: {{ include "seaweedfs.fullname" $ }}-ca-cert
|
|
- name: master-cert
|
|
secret:
|
|
secretName: {{ include "seaweedfs.fullname" $ }}-master-cert
|
|
- name: volume-cert
|
|
secret:
|
|
secretName: {{ include "seaweedfs.fullname" $ }}-volume-cert
|
|
- name: filer-cert
|
|
secret:
|
|
secretName: {{ include "seaweedfs.fullname" $ }}-filer-cert
|
|
- name: client-cert
|
|
secret:
|
|
secretName: {{ include "seaweedfs.fullname" $ }}-client-cert
|
|
{{- end }}
|
|
{{- if $volume.extraVolumes }}
|
|
{{ tpl $volume.extraVolumes $ | indent 8 | trim }}
|
|
{{- end }}
|
|
{{- if $volume.nodeSelector }}
|
|
nodeSelector:
|
|
{{ tpl (printf "{{ $volumeName := \"%s\" }}%s" $volumeName $volume.nodeSelector) $ | indent 8 | trim }}
|
|
{{- end }}
|
|
volumeClaimTemplates:
|
|
{{- range $dir := $volume.dataDirs }}
|
|
{{- if eq $dir.type "persistentVolumeClaim" }}
|
|
- apiVersion: v1
|
|
kind: PersistentVolumeClaim
|
|
metadata:
|
|
name: {{ $dir.name }}
|
|
{{- with $dir.annotations }}
|
|
annotations:
|
|
{{- toYaml . | nindent 10 }}
|
|
{{- end }}
|
|
spec:
|
|
accessModes: [ "ReadWriteOnce" ]
|
|
storageClassName: {{ $dir.storageClass }}
|
|
resources:
|
|
requests:
|
|
storage: {{ $dir.size }}
|
|
{{- end }}
|
|
{{- end }}
|
|
|
|
{{- if and $volume.idx (eq $volume.idx.type "persistentVolumeClaim") }}
|
|
- apiVersion: v1
|
|
kind: PersistentVolumeClaim
|
|
metadata:
|
|
name: idx
|
|
{{- with $volume.idx.annotations }}
|
|
annotations:
|
|
{{- toYaml . | nindent 10 }}
|
|
{{- end }}
|
|
spec:
|
|
accessModes: [ "ReadWriteOnce" ]
|
|
storageClassName: {{ $volume.idx.storageClass }}
|
|
resources:
|
|
requests:
|
|
storage: {{ $volume.idx.size }}
|
|
{{- end }}
|
|
{{- if and $volume.logs (eq $volume.logs.type "persistentVolumeClaim") }}
|
|
- apiVersion: v1
|
|
kind: PersistentVolumeClaim
|
|
metadata:
|
|
name: logs
|
|
{{- with $volume.logs.annotations }}
|
|
annotations:
|
|
{{- toYaml . | nindent 10 }}
|
|
{{- end }}
|
|
spec:
|
|
accessModes: [ "ReadWriteOnce" ]
|
|
storageClassName: {{ $volume.logs.storageClass }}
|
|
resources:
|
|
requests:
|
|
storage: {{ $volume.logs.size }}
|
|
{{- end }}
|
|
{{- end }}
|
|
{{- end }}
|