deployment.yaml

apiVersion: apps/v1
kind: Deployment
metadata:
  name: wms-hub-center-server 
  namespace: {{NAMESPACE}}
spec:
  replicas: 1
  selector:
    matchLabels:
      app: wms-hub-center-server
  template:
    metadata:
      labels:
        app: wms-hub-center-server
    spec:
      volumes:
      - name: logpath
        hostPath:
          path: /nfsdata
      containers:
        - name: wms-hub-center-server
          image: {{IMAGE_URL}}
          imagePullPolicy: IfNotPresent
          ports:
            - containerPort: 12008
          env:
          - name: HOSTNAME
            valueFrom:
              fieldRef:
                apiVersion: v1
                fieldPath: status.hostIP
          - name: DOCKER_CONSUL_HOST
            valueFrom:
              fieldRef:
                apiVersion: v1
                fieldPath: status.hostIP
          - name: HOST_IP
            valueFrom:
              fieldRef:
                apiVersion: v1
                fieldPath: status.hostIP
          - name: HOST_NAME
            valueFrom:
              fieldRef:
                apiVersion: v1
                fieldPath: spec.nodeName
          - name: POD_IP
            valueFrom:
              fieldRef:
                apiVersion: v1
                fieldPath: status.podIP
          - name: POD_NAME
            valueFrom:
              fieldRef:
                apiVersion: v1
                fieldPath: metadata.name
          - name: ITWORK_ENV_CODE
            valueFrom:
              fieldRef:
                apiVersion: v1
                fieldPath: metadata.namespace
          resources:
            requests:
              memory: 1000Mi
              cpu: 500m
            limits:
              memory: 5000Mi
              cpu: 1000m
          volumeMounts:
          - name: logpath
            mountPath: /data/log

 

posted @ 2022-12-27 13:54  繁星下的晴空  阅读(99)  评论(0编辑  收藏  举报