Files
metis/deployment.yml
clay 0001b1db04 ci(.drone.yml): 更新触发条件
- 移除了 .drone.yml 文件中的 event 触发条件
- 仅保留 branch触发条件,指定在 test 分支上触发

fix(deployment.yml): 修改镜像拉取密钥

- 在 deployment.yml 文件中,将镜像拉取密钥从 aliyun-docker-registry 更改为 nexus
2025-04-26 17:46:49 +08:00

52 lines
1.0 KiB
YAML

apiVersion: v1
kind: Service
metadata:
name: $DRONE_REPO_NAME
spec:
type: NodePort
ports:
- protocol: TCP
port: 8080
targetPort: 8080
nodePort: 48090
selector:
app: $DRONE_REPO_NAME
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: $DRONE_REPO_NAME
spec:
replicas: 1
selector:
matchLabels:
app: $DRONE_REPO_NAME
template:
metadata:
labels:
app: $DRONE_REPO_NAME
spec:
imagePullSecrets:
- name: nexus
containers:
- image: $REGISTRY/$REGISTRY_NAMESPACE/$DRONE_REPO_NAME:$DRONE_COMMIT
name: $DRONE_REPO_NAME
imagePullPolicy: Always
env:
- name: TIME_ZONE
value: Asia/Shanghai
- name: REF_NAME
value: $DRONE_REPO_NAME
resources:
requests:
memory: 1Gi
cpu: 1
limits:
memory: 2Gi
cpu: 2
ports:
- containerPort: 8080
name: app-port