ipfs功能

This commit is contained in:
Sense T
2026-05-18 05:37:35 +00:00
parent 3e3a629f73
commit 82b46ae11f
4 changed files with 144 additions and 0 deletions
+50
View File
@@ -0,0 +1,50 @@
kind: Deployment
apiVersion: apps/v1
metadata:
name: ipfs
namespace: ipfs
spec:
strategy:
type: Recreate
replicas: 1
selector:
matchLabels:
app: ipfs
template:
metadata:
labels:
app: ipfs
spec:
volumes:
- name: data
hostPath:
path: /data/ipfs
type: DirectoryOrCreate
containers:
- name: ipfs
# image: cr.wetofu.me/ipfs/kubo:v0.41.0
image: image
ports:
- containerPort: 4001
name: ipfs-p2p
- containerPort: 5001
name: ipfs-api
- containerPort: 8080
name: ipfs-webui
volumeMounts:
- name: data
mountPath: /data/ipfs
subPath: ipfs
- name: data
mountPath: /export
subPath: export
resources:
requests:
cpu: 250m
memory: 256M
limits:
cpu: '1'
memory: '1Gi'
envFrom:
- configMapRef:
name: ipfs-env
+25
View File
@@ -0,0 +1,25 @@
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: ipfs
labels:
app.kubernetes.io/name: ipfs
spec:
rules:
- host: ipfs.233.local
http:
paths:
- pathType: Prefix
path: "/api"
backend:
service:
name: ipfs-svc
port:
number: 5001
- pathType: Prefix
path: "/"
backend:
service:
name: ipfs-svc
port:
number: 8080
+17
View File
@@ -0,0 +1,17 @@
# yaml-language-server: $schema=https://json.schemastore.org/kustomization.json
kind: Kustomization
namespace: ipfs
resources:
- services.yaml
- deploy.yaml
- ingress.yaml
images:
- name: image
newName: cr.wetofu.me/ipfs/kubo
newTag: v0.41.0
configMapGenerator:
- name: ipfs-env
files:
- ./config/IPFS_PROFILE
- ./config/IPFS_TELEMETRY
+52
View File
@@ -0,0 +1,52 @@
apiVersion: v1
kind: Service
metadata:
name: ipfs-p2p-tcp
spec:
selector:
app: ipfs
ports:
- port: 4001
targetPort: ipfs-p2p
protocol: TCP
type: LoadBalancer
ipFamilyPolicy: PreferDualStack
ipFamilies:
- IPv4
- IPv6
---
apiVersion: v1
kind: Service
metadata:
name: ipfs-p2p-udp
spec:
selector:
app: ipfs
ports:
- port: 4001
targetPort: ipfs-p2p
protocol: UDP
type: LoadBalancer
ipFamilyPolicy: PreferDualStack
ipFamilies:
- IPv4
- IPv6
---
apiVersion: v1
kind: Service
metadata:
name: ipfs-svc
spec:
selector:
app: ipfs
ports:
- port: 5001
targetPort: ipfs-api
name: api
- port: 8080
targetPort: ipfs-webui
name: webui
ipFamilyPolicy: PreferDualStack
ipFamilies:
- IPv4
- IPv6