Files
admin-ui/deploy.yaml
张斌 5771e196f9
Some checks failed
全局K3s部署 / deploy (push) Has been cancelled
dockerfile
2026-05-23 17:26:24 +08:00

44 lines
921 B
YAML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
apiVersion: apps/v1
kind: Deployment
metadata:
name: ${APP_NAME}
namespace: default
labels:
app: ${APP_NAME}
spec:
replicas: 1
selector:
matchLabels:
app: ${APP_NAME}
template:
metadata:
labels:
app: ${APP_NAME}
spec:
containers:
- name: ${APP_NAME}
image: ${REGISTRY}/${APP_NAME}:${gitea.sha}
imagePullPolicy: Always
ports:
- containerPort: 80 # 你的项目实际端口比如前端80、后端8080
resources:
requests:
cpu: 100m
memory: 128Mi
limits:
cpu: 500m
memory: 512Mi
---
apiVersion: v1
kind: Service
metadata:
name: ${APP_NAME}-service
namespace: default
spec:
type: NodePort
selector:
app: ${APP_NAME}
ports:
- port: 80
targetPort: 80
nodePort: 30001 # 必须在30000-32767之间