This commit is contained in:
24
File/Shell/inotify-check.sh
Normal file
24
File/Shell/inotify-check.sh
Normal file
@@ -0,0 +1,24 @@
|
||||
#!/bin/bash
|
||||
|
||||
#############################################################################################
|
||||
# 用途: 查看当前inotify实例使用情况
|
||||
# 作者: 丁辉
|
||||
# 编写事件: 2025-12-25
|
||||
#############################################################################################
|
||||
|
||||
echo "=== Inotify 实例使用统计 ==="
|
||||
echo "当前配置限制: $(cat /proc/sys/fs/inotify/max_user_instances)"
|
||||
echo ""
|
||||
|
||||
# 按用户统计
|
||||
sudo find /proc/*/fd -lname anon_inode:inotify 2>/dev/null | \
|
||||
cut -d/ -f3 | xargs -I '{}' ps --no-headers -o '%U' -p '{}' | \
|
||||
sort | uniq -c | sort -nr | head -20
|
||||
|
||||
echo ""
|
||||
echo "=== 推荐值计算 ==="
|
||||
current_used=$(sudo find /proc/*/fd -lname anon_inode:inotify 2>/dev/null | wc -l)
|
||||
echo "当前使用: $current_used 个实例"
|
||||
recommended=$((current_used * 3))
|
||||
echo "推荐配置: $recommended (当前使用量的3倍)"
|
||||
echo "最小安全值: $((current_used * 2))"
|
||||
59
File/Yaml/rustfs-values-distributed.yaml
Normal file
59
File/Yaml/rustfs-values-distributed.yaml
Normal file
@@ -0,0 +1,59 @@
|
||||
image:
|
||||
repository: rustfs/rustfs
|
||||
tag: latest # 部署时使用镜像的版本
|
||||
|
||||
storageclass:
|
||||
name: local-path # 更换为自己的 storageClass 存储
|
||||
dataStorageSize: 10Gi
|
||||
logStorageSize: 5Gi
|
||||
|
||||
replicaCount: 4 # 副本数控制(默认为4, 建议至少4个副本以保证分布式存储的可靠性)
|
||||
mode:
|
||||
standalone:
|
||||
enabled: false # 单节点模式(根据自己需求切换)
|
||||
distributed:
|
||||
enabled: true # 多节点模式(根据自己需求切换)
|
||||
|
||||
resources: # Pod 资源限制
|
||||
requests:
|
||||
cpu: 500m
|
||||
memory: 1Gi
|
||||
limits:
|
||||
cpu: 1000m
|
||||
memory: 2Gi
|
||||
|
||||
secret:
|
||||
rustfs:
|
||||
access_key: rustfsadmin
|
||||
secret_key: rustfsadmin
|
||||
|
||||
service:
|
||||
type: ClusterIP
|
||||
endpoint:
|
||||
port: 9000
|
||||
console:
|
||||
port: 9001
|
||||
|
||||
nodeSelector:
|
||||
kubernetes.io/os: linux
|
||||
rustfs: "true"
|
||||
|
||||
ingress:
|
||||
enabled: false
|
||||
className: "nginx" # 指定 ingress 控制器, 不指定则需要集群内存在默认的 ingress 控制器
|
||||
nginxAnnotations:
|
||||
nginx.ingress.kubernetes.io/proxy-body-size: "1024m" # 调整文件上传允许传输大小
|
||||
nginx.ingress.kubernetes.io/affinity: cookie
|
||||
nginx.ingress.kubernetes.io/session-cookie-expires: "3600"
|
||||
nginx.ingress.kubernetes.io/session-cookie-hash: sha1
|
||||
nginx.ingress.kubernetes.io/session-cookie-max-age: "3600"
|
||||
nginx.ingress.kubernetes.io/session-cookie-name: rustfs
|
||||
hosts:
|
||||
- host: rustfs.example.com # 更换为自己的域名
|
||||
paths:
|
||||
- path: /
|
||||
pathType: Prefix
|
||||
tls:
|
||||
- hosts:
|
||||
- rustfs.example.com # 更换为自己的域名
|
||||
secretName: rustfs-tls
|
||||
55
File/Yaml/rustfs-values-standalone.yaml
Normal file
55
File/Yaml/rustfs-values-standalone.yaml
Normal file
@@ -0,0 +1,55 @@
|
||||
image:
|
||||
repository: rustfs/rustfs
|
||||
tag: latest # 部署时使用镜像的版本
|
||||
|
||||
storageclass:
|
||||
name: local-path # 更换为自己的 storageClass 存储
|
||||
dataStorageSize: 10Gi
|
||||
logStorageSize: 5Gi
|
||||
|
||||
replicaCount: 1 # 副本数控制
|
||||
mode:
|
||||
standalone:
|
||||
enabled: true # 单节点模式(根据自己需求切换)
|
||||
distributed:
|
||||
enabled: false # 多节点模式(根据自己需求切换)
|
||||
|
||||
resources: # Pod 资源限制
|
||||
requests:
|
||||
cpu: 500m
|
||||
memory: 1Gi
|
||||
limits:
|
||||
cpu: 1000m
|
||||
memory: 2Gi
|
||||
|
||||
secret:
|
||||
rustfs:
|
||||
access_key: rustfsadmin
|
||||
secret_key: rustfsadmin
|
||||
|
||||
service:
|
||||
type: ClusterIP
|
||||
endpoint:
|
||||
port: 9000
|
||||
console:
|
||||
port: 9001
|
||||
|
||||
ingress:
|
||||
enabled: true
|
||||
className: "nginx" # 指定 ingress 控制器, 不指定则需要集群内存在默认的 ingress 控制器
|
||||
nginxAnnotations:
|
||||
nginx.ingress.kubernetes.io/proxy-body-size: "1024m" # 调整文件上传允许传输大小
|
||||
nginx.ingress.kubernetes.io/affinity: cookie
|
||||
nginx.ingress.kubernetes.io/session-cookie-expires: "3600"
|
||||
nginx.ingress.kubernetes.io/session-cookie-hash: sha1
|
||||
nginx.ingress.kubernetes.io/session-cookie-max-age: "3600"
|
||||
nginx.ingress.kubernetes.io/session-cookie-name: rustfs
|
||||
hosts:
|
||||
- host: rustfs.example.com # 更换为自己的域名
|
||||
paths:
|
||||
- path: /
|
||||
pathType: Prefix
|
||||
tls:
|
||||
- hosts:
|
||||
- rustfs.example.com # 更换为自己的域名
|
||||
secretName: rustfs-tls
|
||||
Reference in New Issue
Block a user