apiVersion: apps/v1
kind: Deployment
metadata:
  name: mall-search-deployment
  namespace: default
  labels:
    app: mall-search
spec:
  replicas: 1
  selector:
    matchLabels:
      app: mall-search
  template:
    metadata:
      labels:
        app: mall-search
    spec:
      containers:
        - name: mall-search
          # /home/farokh/codesss/ERP/mall-swarm/document/k8s/mall-admin-deployment.yaml
          image: macrodocker/mall-search:1.0-SNAPSHOT
          ports:
            - containerPort: 8081
          env:
            # Environment Profile
            - name: spring.profiles.active
              value: prod
            # Specify time zone
            - name: TZ
              value: Asia/Shanghai
            # Specify Nacos address
            - name: spring.cloud.nacos.discovery.server-addr
              value: http://192.168.3.101:8848
            - name: spring.cloud.nacos.config.server-addr
              value: http://192.168.3.101:8848
          volumeMounts:
            - mountPath: /var/logs
              name: log-volume
      volumes:
        - name: log-volume
          hostPath:
            path: /mydata/app/mall-search/logs
            type: DirectoryOrCreate