ksd
2
你可以提供下具体的 yaml 文件,或者按照字面意思调整对应的 selector 和 labels
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: bcjhrbb-manage
namespace: bcjhrbb-prod
labels:
app: bcjhrbb-manage
spec:
replicas: 1
selector:
matchLabels:
app: bcjhrbb-manage
strategy:
rollingUpdate:
maxSurge: 1
maxUnavailable: 0
type: RollingUpdate
template:
metadata:
labels:
app: bcjhrbb-manage
spec:
imagePullSecrets:
- name: alicloud-hub-hk
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: project
operator: In
values:
- bcjhrbb
containers:
- name: bcjhrbb-manage
image: xxx/xxx:latest
imagePullPolicy: Always
ports:
- name: bcjhrbb-manage
containerPort: 8801
protocol: TCP
resources:
requests:
memory: "128Mi"
limits:
memory: "1Gi"
volumeMounts:
- name: global-db-config
mountPath: /home/gcweb/home/project/webapps/ROOT/WEB-INF/classes/init.cla
subPath: init.cla
volumes:
- name: global-db-config
configMap:
name: global-db-config
defaultMode: 0777
items:
- key: "init.cla"
path: "init.cla"