-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathsimple-tenant.yaml
More file actions
executable file
·124 lines (107 loc) · 4.38 KB
/
simple-tenant.yaml
File metadata and controls
executable file
·124 lines (107 loc) · 4.38 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
apiVersion: rustfs.com/v1alpha1
kind: Tenant
metadata:
name: example-tenant
namespace: rustfs-system
spec:
# Container image for RustFS (optional, defaults to a specific version)
image: rustfs/rustfs:latest
# Pod management policy for StatefulSet (defaults to Parallel)
# Parallel is recommended for multi-node RustFS deployments
podManagementPolicy: Parallel
# Pool configuration - at least one pool is required
# Each pool must have: servers * volumesPerServer >= 4
pools:
- name: primary
servers: 2
# Persistence configuration for storage (REQUIRED)
# Note: servers * volumesPerServer must be >= 4 for RustFS distributed storage
persistence:
# Number of volumes per server (REQUIRED, must satisfy servers * volumesPerServer >= 4)
volumesPerServer: 2
# Optional: Path where volumes will be mounted in the container (defaults to /data)
# Volumes will be mounted at: /data/rustfs0, /data/rustfs1, etc.
# path: /data
# Optional: PersistentVolumeClaim template for storage (defaults to ReadWriteOnce, 10Gi)
# volumeClaimTemplate:
# accessModes:
# - ReadWriteOnce
# resources:
# requests:
# storage: 10Gi
# # Optional: specify storage class
# # storageClassName: standard
# Optional: Custom labels for PVCs
# The operator automatically adds the following labels:
# - app.kubernetes.io/managed-by: rustfs-operator
# - rustfs.tenant: <tenant-name>
# - rustfs.pool: <pool-name>
# You can add additional labels or override the operator labels:
labels:
app: rustfs
environment: production
team: storage
# Optional: Custom annotations for PVCs
annotations:
backup.velero.io/backup-volumes: "true"
description: "RustFS distributed storage volumes"
# Optional: Kubernetes scheduling configuration for this pool
# All fields below are optional and control where/how pods are scheduled
# Optional: Node selector - target specific nodes by labels
# nodeSelector:
# storage-type: ssd
# disk-size: large
# Optional: Node/pod affinity - complex scheduling rules
# affinity:
# nodeAffinity:
# requiredDuringSchedulingIgnoredDuringExecution:
# nodeSelectorTerms:
# - matchExpressions:
# - key: topology.kubernetes.io/zone
# operator: In
# values: ["us-east-1a", "us-east-1b"]
# Optional: Tolerations - schedule on tainted nodes
# tolerations:
# - key: "dedicated"
# operator: "Equal"
# value: "storage"
# effect: "NoSchedule"
# Optional: Topology spread - distribute pods across failure domains
# topologySpreadConstraints:
# - maxSkew: 1
# topologyKey: topology.kubernetes.io/zone
# whenUnsatisfiable: DoNotSchedule
# labelSelector:
# matchLabels:
# rustfs.pool: primary
# Optional: Resource requirements - CPU and memory for pool containers
# resources:
# requests:
# cpu: "4"
# memory: "16Gi"
# limits:
# cpu: "8"
# memory: "32Gi"
# Optional: Priority class - overrides tenant-level priority
# priorityClassName: high-priority
# Multi-Node Communication (Automatic)
# The operator automatically generates the RUSTFS_VOLUMES environment variable
# for multi-node, multi-disk distributed storage communication.
#
# For this configuration, the generated RUSTFS_VOLUMES will be:
# http://example-tenant-pool-0-{0...1}.example-tenant-hl.rustfs-system.svc.cluster.local:9000/data/rustfs{0...1}
#
# This configures RustFS to:
# - Communicate with 2 nodes (servers: 2)
# - Each node has 2 storage volumes at /data/rustfs0 and /data/rustfs1
# - Use Kubernetes DNS for node discovery via the headless service
#
# Multiple pools will be combined into a single distributed storage cluster.
# Optional environment variables for RustFS containers
# Note: RUSTFS_VOLUMES, RUSTFS_ADDRESS, RUSTFS_CONSOLE_ADDRESS, and
# RUSTFS_CONSOLE_ENABLE are automatically set by the operator
env:
- name: RUST_LOG
value: info
# Optional scheduler name for pod placement
# scheduler: custom-scheduler