ipfs功能
This commit is contained in:
@@ -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
|
||||||
@@ -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
|
||||||
@@ -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
|
||||||
@@ -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
|
||||||
Reference in New Issue
Block a user