改备注
This commit is contained in:
@@ -14,9 +14,9 @@ spec:
|
|||||||
replicas: 1
|
replicas: 1
|
||||||
selector:
|
selector:
|
||||||
matchLabels:
|
matchLabels:
|
||||||
app: test-lessie-agents
|
app: test-lessie-agents
|
||||||
environment: test
|
environment: test
|
||||||
project: lessie
|
project: lessie
|
||||||
strategy:
|
strategy:
|
||||||
type: RollingUpdate # 滚动更新策略
|
type: RollingUpdate # 滚动更新策略
|
||||||
rollingUpdate:
|
rollingUpdate:
|
||||||
@@ -30,61 +30,60 @@ spec:
|
|||||||
project: lessie
|
project: lessie
|
||||||
spec:
|
spec:
|
||||||
imagePullSecrets:
|
imagePullSecrets:
|
||||||
- name: dxin-image-repository # 镜像仓库凭证Secret
|
- name: dxin-image-repository # 镜像仓库凭证Secret
|
||||||
volumes:
|
volumes:
|
||||||
- name: aws-credentials-volume # aws-credentials 卷文件
|
- name: aws-credentials-volume # aws-credentials 卷文件
|
||||||
configMap:
|
configMap:
|
||||||
name: aws-credentials
|
name: aws-credentials
|
||||||
- name: google-credentials-volume
|
|
||||||
configMap:
|
|
||||||
name: google-credentials
|
|
||||||
- name: lessie-logs-volume
|
|
||||||
hostPath:
|
|
||||||
path: /data/logs/lessie-agents/
|
|
||||||
type: DirectoryOrCreate
|
|
||||||
containers:
|
|
||||||
- name: test-lessie-agents # 容器名称
|
|
||||||
image: uswccr.ccs.tencentyun.com/lessietest/lessie-sourcing-agents:v24_dxin_9042beec_202510271811 # 容器镜像
|
|
||||||
imagePullPolicy: IfNotPresent # 镜像拉取策略 ,有则不拉
|
|
||||||
env:
|
|
||||||
- name: POD_NAME
|
|
||||||
valueFrom:
|
|
||||||
fieldRef:
|
|
||||||
fieldPath: metadata.name
|
|
||||||
- name: APP_ENV
|
|
||||||
value: "s1"
|
|
||||||
- name: APP_PORT
|
|
||||||
value: "8000"
|
|
||||||
- name: GUNICORN_WORKERS
|
|
||||||
value: "2"
|
|
||||||
- name: MAX_REQUESTS
|
|
||||||
value: "200"
|
|
||||||
- name: MAX_REQUESTS_JITTER
|
|
||||||
value: "50"
|
|
||||||
ports:
|
|
||||||
- containerPort: 8000 # 容器暴露的端口
|
|
||||||
resources:
|
|
||||||
requests:
|
|
||||||
cpu: "1" # 容器请求分配1个CPU核心
|
|
||||||
memory: "2Gi" # 容器请求分配2Gi内存
|
|
||||||
limits:
|
|
||||||
cpu: "2" # 最多可以使用2个CPU核心
|
|
||||||
memory: "8Gi" # 容器最多可以使用8Gi内存
|
|
||||||
volumeMounts:
|
|
||||||
- name: aws-credentials-volume
|
|
||||||
mountPath: /root/.aws/
|
|
||||||
- name: google-credentials-volume
|
- name: google-credentials-volume
|
||||||
mountPath: /root/.google/
|
configMap:
|
||||||
|
name: google-credentials
|
||||||
- name: lessie-logs-volume
|
- name: lessie-logs-volume
|
||||||
mountPath: /data/webapps/lessie_sourcing_agents/logs/
|
hostPath:
|
||||||
subPathExpr: lessie-agents-$(POD_NAME)
|
path: /data/logs/lessie-agents/
|
||||||
|
type: DirectoryOrCreate
|
||||||
|
containers:
|
||||||
|
- name: test-lessie-agents # 容器名称
|
||||||
|
image: uswccr.ccs.tencentyun.com/lessietest/lessie-sourcing-agents:v24_dxin_9042beec_202510271811 # 容器镜像
|
||||||
|
imagePullPolicy: IfNotPresent # 镜像拉取策略 ,有则不拉
|
||||||
|
env:
|
||||||
|
- name: POD_NAME
|
||||||
|
valueFrom:
|
||||||
|
fieldRef:
|
||||||
|
fieldPath: metadata.name
|
||||||
|
- name: APP_ENV
|
||||||
|
value: "s1"
|
||||||
|
- name: APP_PORT
|
||||||
|
value: "8000"
|
||||||
|
- name: GUNICORN_WORKERS
|
||||||
|
value: "2"
|
||||||
|
- name: MAX_REQUESTS
|
||||||
|
value: "200"
|
||||||
|
- name: MAX_REQUESTS_JITTER
|
||||||
|
value: "50"
|
||||||
|
ports:
|
||||||
|
- containerPort: 8000 # 容器暴露的端口
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
cpu: "1" # 容器请求分配1个CPU核心
|
||||||
|
memory: "2Gi" # 容器请求分配2Gi内存
|
||||||
|
limits:
|
||||||
|
cpu: "2" # 最多可以使用2个CPU核心
|
||||||
|
memory: "8Gi" # 容器最多可以使用8Gi内存
|
||||||
|
volumeMounts:
|
||||||
|
- name: aws-credentials-volume
|
||||||
|
mountPath: /root/.aws/
|
||||||
|
- name: google-credentials-volume
|
||||||
|
mountPath: /root/.google/
|
||||||
|
- name: lessie-logs-volume
|
||||||
|
mountPath: /data/webapps/lessie_sourcing_agents/logs/
|
||||||
|
subPathExpr: lessie-agents-$(POD_NAME)
|
||||||
|
|
||||||
---
|
---
|
||||||
# ----------------------------
|
# ----------------------------
|
||||||
# Service
|
# Service
|
||||||
# 集群内部(其他 Pod):http://test-lessie-agents-svc.test-lessie:8000(错误的)
|
# 集群内部:http://test-lessie-agents-svc.test-lessie.svc.cluster.local:8000
|
||||||
# 集群外部(其他节点):http://<Node_IP>:38000
|
# 集群外部:http://<Node_IP>:38000
|
||||||
# ----------------------------
|
# ----------------------------
|
||||||
|
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
@@ -104,8 +103,7 @@ spec:
|
|||||||
project: lessie
|
project: lessie
|
||||||
ports:
|
ports:
|
||||||
- name: http
|
- name: http
|
||||||
port: 8000 # ClusterIP 内部端口
|
port: 8000 # ClusterIP 内部端口
|
||||||
targetPort: 8000 # 容器端口
|
targetPort: 8000 # 容器端口
|
||||||
nodePort: 30800 # 节点对外端口(30000-32767)
|
nodePort: 30800 # 节点对外端口(30000-32767)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user