---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: cmii-uav-sense-adapter
  namespace: wdd-rmdc
  labels:
    cmii.type: backend
    cmii.app: cmii-uav-sense-adapter
    octopus/control: backend-app-1.0.0
    app.kubernetes.io/managed-by: octopus
    app.kubernetes.io/app-version: base-1.0
spec:
  replicas: 1
  strategy:
    rollingUpdate:
      maxUnavailable: 1
  selector:
    matchLabels:
      cmii.type: backend
      cmii.app: cmii-uav-sense-adapter
  template:
    metadata:
      labels:
        cmii.type: backend
        cmii.app: cmii-uav-sense-adapter
    spec:
      affinity:
        nodeAffinity:
          requiredDuringSchedulingIgnoredDuringExecution:
            nodeSelectorTerms:
              - matchExpressions:
                  - key: uavcloud.env
                    operator: In
                    values:
                      - rmdc
      imagePullSecrets:
        - name: harborsecret
      containers:
        - name: cmii-uav-sense-adapter
          image: harbor.cdcyy.com.cn/cmii/cmii-uav-sense-adapter:pro-2.1.0
          imagePullPolicy: Always
          env:
            - name: K8S_NAMESPACE
              value: wdd-rmdc
            - name: APPLICATION_NAME
              value: cmii-uav-sense-adapter
            - name: CUST_JAVA_OPTS
              value: "-Xms200m -Xmx1500m -Dlog4j2.formatMsgNoLookups=true"
            - name: NACOS_REGISTRY
              value: "helm-nacos:8848"
            - name: NACOS_DISCOVERY_IP
              valueFrom:
                fieldRef:
                  fieldPath: status.podIP
            - name: NACOS_DISCOVERY_PORT
              value: "8080"
            - name: BIZ_CONFIG_GROUP
              value: base-1.0
            - name: SYS_CONFIG_GROUP
              value: base-1.0
            - name: NACOS_USERNAME
              value: "developer"
            - name: NACOS_PASSWORD
              value: "Deve@9128201"
            - name: IMAGE_NAME
              value: harbor.cdcyy.com.cn/cmii/cmii-uav-sense-adapter:pro-2.1.0
            - name: POD_NAME
              valueFrom:
                fieldRef:
                  fieldPath: metadata.name
            - name: POD_NAMESPACE
              valueFrom:
                fieldRef:
                  fieldPath: metadata.namespace
            - name: NODE_NAME
              valueFrom:
                fieldRef:
                  fieldPath: spec.nodeName
            - name: NODE_IP
              valueFrom:
                fieldRef:
                  fieldPath: status.hostIP
            - name: LIMIT_CPU
              valueFrom:
                resourceFieldRef:
                  containerName: cmii-uav-sense-adapter
                  resource: limits.cpu
            - name: LIMIT_MEMORY
              valueFrom:
                resourceFieldRef:
                  containerName: cmii-uav-sense-adapter
                  resource: limits.memory
            - name: REQUEST_CPU
              valueFrom:
                resourceFieldRef:
                  containerName: cmii-uav-sense-adapter
                  resource: requests.cpu
            - name: REQUEST_MEMORY
              valueFrom:
                resourceFieldRef:
                  containerName: cmii-uav-sense-adapter
                  resource: requests.memory
          ports:
            - name: pod-port
              containerPort: 8080
              protocol: TCP
          resources:
             limits:
               memory: 2Gi
               cpu: "2"
             requests:
               memory: 200Mi
               cpu: 200m
          livenessProbe:
            httpGet:
              path: /cmii/health
              port: pod-port
              scheme: HTTP
            initialDelaySeconds: 60
            timeoutSeconds: 5
            periodSeconds: 20
            successThreshold: 1
            failureThreshold: 3
          readinessProbe:
            httpGet:
              path: /cmii/health
              port: pod-port
              scheme: HTTP
            initialDelaySeconds: 60
            timeoutSeconds: 5
            periodSeconds: 20
            successThreshold: 1
            failureThreshold: 3
          startupProbe:
            httpGet:
              path: /cmii/health
              port: pod-port
              scheme: HTTP
            initialDelaySeconds: 60
            timeoutSeconds: 3
            periodSeconds: 20
            successThreshold: 1
            failureThreshold: 5
          volumeMounts:
            - name: nfs-backend-log-volume
              mountPath: /cmii/logs
              readOnly: false
              subPath: wdd-rmdc/cmii-uav-sense-adapter
      volumes:
        - name: nfs-backend-log-volume
          persistentVolumeClaim:
            claimName: nfs-backend-log-pvc
---
apiVersion: v1
kind: Service
metadata:
  name: cmii-uav-sense-adapter
  namespace: wdd-rmdc
  labels:
    cmii.type: backend
    cmii.app: cmii-uav-sense-adapter
    octopus/control: backend-app-1.0.0
    app.kubernetes.io/managed-by: octopus
    app.kubernetes.io/app-version: base-1.0
spec:
  type: ClusterIP
  selector:
    cmii.type: backend
    cmii.app: cmii-uav-sense-adapter
  ports:
    - name: backend-tcp
      port: 8080
      protocol: TCP
      targetPort: 8080
---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: cmii-uas-gateway
  namespace: wdd-rmdc
  labels:
    cmii.type: backend
    cmii.app: cmii-uas-gateway
    octopus/control: backend-app-1.0.0
    app.kubernetes.io/managed-by: octopus
    app.kubernetes.io/app-version: base-1.0
spec:
  replicas: 0
  strategy:
    rollingUpdate:
      maxUnavailable: 1
  selector:
    matchLabels:
      cmii.type: backend
      cmii.app: cmii-uas-gateway
  template:
    metadata:
      labels:
        cmii.type: backend
        cmii.app: cmii-uas-gateway
    spec:
      affinity:
        nodeAffinity:
          requiredDuringSchedulingIgnoredDuringExecution:
            nodeSelectorTerms:
              - matchExpressions:
                  - key: uavcloud.env
                    operator: In
                    values:
                      - rmdc
      imagePullSecrets:
        - name: harborsecret
      containers:
        - name: cmii-uas-gateway
          image: harbor.cdcyy.com.cn/cmii/cmii-uas-gateway:2.1-test-prof
          imagePullPolicy: Always
          env:
            - name: K8S_NAMESPACE
              value: wdd-rmdc
            - name: APPLICATION_NAME
              value: cmii-uas-gateway
            - name: CUST_JAVA_OPTS
              value: "-Xms200m -Xmx1500m -Dlog4j2.formatMsgNoLookups=true"
            - name: NACOS_REGISTRY
              value: "helm-nacos:8848"
            - name: NACOS_DISCOVERY_IP
              valueFrom:
                fieldRef:
                  fieldPath: status.podIP
            - name: NACOS_DISCOVERY_PORT
              value: "8080"
            - name: BIZ_CONFIG_GROUP
              value: base-1.0
            - name: SYS_CONFIG_GROUP
              value: base-1.0
            - name: NACOS_USERNAME
              value: "developer"
            - name: NACOS_PASSWORD
              value: "Deve@9128201"
            - name: IMAGE_NAME
              value: harbor.cdcyy.com.cn/cmii/cmii-uas-gateway:2.1-test-prof
            - name: POD_NAME
              valueFrom:
                fieldRef:
                  fieldPath: metadata.name
            - name: POD_NAMESPACE
              valueFrom:
                fieldRef:
                  fieldPath: metadata.namespace
            - name: NODE_NAME
              valueFrom:
                fieldRef:
                  fieldPath: spec.nodeName
            - name: NODE_IP
              valueFrom:
                fieldRef:
                  fieldPath: status.hostIP
            - name: LIMIT_CPU
              valueFrom:
                resourceFieldRef:
                  containerName: cmii-uas-gateway
                  resource: limits.cpu
            - name: LIMIT_MEMORY
              valueFrom:
                resourceFieldRef:
                  containerName: cmii-uas-gateway
                  resource: limits.memory
            - name: REQUEST_CPU
              valueFrom:
                resourceFieldRef:
                  containerName: cmii-uas-gateway
                  resource: requests.cpu
            - name: REQUEST_MEMORY
              valueFrom:
                resourceFieldRef:
                  containerName: cmii-uas-gateway
                  resource: requests.memory
          ports:
            - name: pod-port
              containerPort: 8080
              protocol: TCP
          resources:
             limits:
               memory: 2Gi
               cpu: "2"
             requests:
               memory: 200Mi
               cpu: 200m
          livenessProbe:
            httpGet:
              path: /cmii/health
              port: pod-port
              scheme: HTTP
            initialDelaySeconds: 60
            timeoutSeconds: 5
            periodSeconds: 20
            successThreshold: 1
            failureThreshold: 3
          readinessProbe:
            httpGet:
              path: /cmii/health
              port: pod-port
              scheme: HTTP
            initialDelaySeconds: 60
            timeoutSeconds: 5
            periodSeconds: 20
            successThreshold: 1
            failureThreshold: 3
          startupProbe:
            httpGet:
              path: /cmii/health
              port: pod-port
              scheme: HTTP
            initialDelaySeconds: 60
            timeoutSeconds: 3
            periodSeconds: 20
            successThreshold: 1
            failureThreshold: 5
          volumeMounts:
            - name: nfs-backend-log-volume
              mountPath: /cmii/logs
              readOnly: false
              subPath: wdd-rmdc/cmii-uas-gateway
      volumes:
        - name: nfs-backend-log-volume
          persistentVolumeClaim:
            claimName: nfs-backend-log-pvc
---
apiVersion: v1
kind: Service
metadata:
  name: cmii-uas-gateway
  namespace: wdd-rmdc
  labels:
    cmii.type: backend
    cmii.app: cmii-uas-gateway
    octopus/control: backend-app-1.0.0
    app.kubernetes.io/managed-by: octopus
    app.kubernetes.io/app-version: base-1.0
spec:
  type: ClusterIP
  selector:
    cmii.type: backend
    cmii.app: cmii-uas-gateway
  ports:
    - name: backend-tcp
      port: 8080
      protocol: TCP
      targetPort: 8080
---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: cmii-uas-lifecycle
  namespace: wdd-rmdc
  labels:
    cmii.type: backend
    cmii.app: cmii-uas-lifecycle
    octopus/control: backend-app-1.0.0
    app.kubernetes.io/managed-by: octopus
    app.kubernetes.io/app-version: base-1.0
spec:
  replicas: 0
  strategy:
    rollingUpdate:
      maxUnavailable: 1
  selector:
    matchLabels:
      cmii.type: backend
      cmii.app: cmii-uas-lifecycle
  template:
    metadata:
      labels:
        cmii.type: backend
        cmii.app: cmii-uas-lifecycle
    spec:
      affinity:
        nodeAffinity:
          requiredDuringSchedulingIgnoredDuringExecution:
            nodeSelectorTerms:
              - matchExpressions:
                  - key: uavcloud.env
                    operator: In
                    values:
                      - rmdc
      imagePullSecrets:
        - name: harborsecret
      containers:
        - name: cmii-uas-lifecycle
          image: harbor.cdcyy.com.cn/cmii/cmii-uas-lifecycle:2.1-test-20250801
          imagePullPolicy: Always
          env:
            - name: K8S_NAMESPACE
              value: wdd-rmdc
            - name: APPLICATION_NAME
              value: cmii-uas-lifecycle
            - name: CUST_JAVA_OPTS
              value: "-Xms200m -Xmx1500m -Dlog4j2.formatMsgNoLookups=true"
            - name: NACOS_REGISTRY
              value: "helm-nacos:8848"
            - name: NACOS_DISCOVERY_IP
              valueFrom:
                fieldRef:
                  fieldPath: status.podIP
            - name: NACOS_DISCOVERY_PORT
              value: "8080"
            - name: BIZ_CONFIG_GROUP
              value: base-1.0
            - name: SYS_CONFIG_GROUP
              value: base-1.0
            - name: NACOS_USERNAME
              value: "developer"
            - name: NACOS_PASSWORD
              value: "Deve@9128201"
            - name: IMAGE_NAME
              value: harbor.cdcyy.com.cn/cmii/cmii-uas-lifecycle:2.1-test-20250801
            - name: POD_NAME
              valueFrom:
                fieldRef:
                  fieldPath: metadata.name
            - name: POD_NAMESPACE
              valueFrom:
                fieldRef:
                  fieldPath: metadata.namespace
            - name: NODE_NAME
              valueFrom:
                fieldRef:
                  fieldPath: spec.nodeName
            - name: NODE_IP
              valueFrom:
                fieldRef:
                  fieldPath: status.hostIP
            - name: LIMIT_CPU
              valueFrom:
                resourceFieldRef:
                  containerName: cmii-uas-lifecycle
                  resource: limits.cpu
            - name: LIMIT_MEMORY
              valueFrom:
                resourceFieldRef:
                  containerName: cmii-uas-lifecycle
                  resource: limits.memory
            - name: REQUEST_CPU
              valueFrom:
                resourceFieldRef:
                  containerName: cmii-uas-lifecycle
                  resource: requests.cpu
            - name: REQUEST_MEMORY
              valueFrom:
                resourceFieldRef:
                  containerName: cmii-uas-lifecycle
                  resource: requests.memory
          ports:
            - name: pod-port
              containerPort: 8080
              protocol: TCP
          resources:
             limits:
               memory: 2Gi
               cpu: "2"
             requests:
               memory: 200Mi
               cpu: 200m
          livenessProbe:
            httpGet:
              path: /cmii/health
              port: pod-port
              scheme: HTTP
            initialDelaySeconds: 60
            timeoutSeconds: 5
            periodSeconds: 20
            successThreshold: 1
            failureThreshold: 3
          readinessProbe:
            httpGet:
              path: /cmii/health
              port: pod-port
              scheme: HTTP
            initialDelaySeconds: 60
            timeoutSeconds: 5
            periodSeconds: 20
            successThreshold: 1
            failureThreshold: 3
          startupProbe:
            httpGet:
              path: /cmii/health
              port: pod-port
              scheme: HTTP
            initialDelaySeconds: 60
            timeoutSeconds: 3
            periodSeconds: 20
            successThreshold: 1
            failureThreshold: 5
          volumeMounts:
            - name: nfs-backend-log-volume
              mountPath: /cmii/logs
              readOnly: false
              subPath: wdd-rmdc/cmii-uas-lifecycle
      volumes:
        - name: nfs-backend-log-volume
          persistentVolumeClaim:
            claimName: nfs-backend-log-pvc
---
apiVersion: v1
kind: Service
metadata:
  name: cmii-uas-lifecycle
  namespace: wdd-rmdc
  labels:
    cmii.type: backend
    cmii.app: cmii-uas-lifecycle
    octopus/control: backend-app-1.0.0
    app.kubernetes.io/managed-by: octopus
    app.kubernetes.io/app-version: base-1.0
spec:
  type: ClusterIP
  selector:
    cmii.type: backend
    cmii.app: cmii-uas-lifecycle
  ports:
    - name: backend-tcp
      port: 8080
      protocol: TCP
      targetPort: 8080
---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: cmii-uas-lifecycle-kny
  namespace: wdd-rmdc
  labels:
    cmii.type: backend
    cmii.app: cmii-uas-lifecycle-kny
    octopus/control: backend-app-1.0.0
    app.kubernetes.io/managed-by: octopus
    app.kubernetes.io/app-version: base-1.0
spec:
  replicas: 1
  strategy:
    rollingUpdate:
      maxUnavailable: 1
  selector:
    matchLabels:
      cmii.type: backend
      cmii.app: cmii-uas-lifecycle-kny
  template:
    metadata:
      labels:
        cmii.type: backend
        cmii.app: cmii-uas-lifecycle-kny
    spec:
      affinity:
        nodeAffinity:
          requiredDuringSchedulingIgnoredDuringExecution:
            nodeSelectorTerms:
              - matchExpressions:
                  - key: uavcloud.env
                    operator: In
                    values:
                      - rmdc
      imagePullSecrets:
        - name: harborsecret
      containers:
        - name: cmii-uas-lifecycle-kny
          image: harbor.cdcyy.com.cn/cmii/cmii-uas-lifecycle-kny:5.7.0-snapshot
          imagePullPolicy: Always
          env:
            - name: K8S_NAMESPACE
              value: wdd-rmdc
            - name: APPLICATION_NAME
              value: cmii-uas-lifecycle-kny
            - name: CUST_JAVA_OPTS
              value: "-Xms200m -Xmx1500m -Dlog4j2.formatMsgNoLookups=true"
            - name: NACOS_REGISTRY
              value: "helm-nacos:8848"
            - name: NACOS_DISCOVERY_IP
              valueFrom:
                fieldRef:
                  fieldPath: status.podIP
            - name: NACOS_DISCOVERY_PORT
              value: "8080"
            - name: BIZ_CONFIG_GROUP
              value: base-1.0
            - name: SYS_CONFIG_GROUP
              value: base-1.0
            - name: NACOS_USERNAME
              value: "developer"
            - name: NACOS_PASSWORD
              value: "Deve@9128201"
            - name: IMAGE_NAME
              value: harbor.cdcyy.com.cn/cmii/cmii-uas-lifecycle-kny:5.7.0-snapshot
            - name: POD_NAME
              valueFrom:
                fieldRef:
                  fieldPath: metadata.name
            - name: POD_NAMESPACE
              valueFrom:
                fieldRef:
                  fieldPath: metadata.namespace
            - name: NODE_NAME
              valueFrom:
                fieldRef:
                  fieldPath: spec.nodeName
            - name: NODE_IP
              valueFrom:
                fieldRef:
                  fieldPath: status.hostIP
            - name: LIMIT_CPU
              valueFrom:
                resourceFieldRef:
                  containerName: cmii-uas-lifecycle-kny
                  resource: limits.cpu
            - name: LIMIT_MEMORY
              valueFrom:
                resourceFieldRef:
                  containerName: cmii-uas-lifecycle-kny
                  resource: limits.memory
            - name: REQUEST_CPU
              valueFrom:
                resourceFieldRef:
                  containerName: cmii-uas-lifecycle-kny
                  resource: requests.cpu
            - name: REQUEST_MEMORY
              valueFrom:
                resourceFieldRef:
                  containerName: cmii-uas-lifecycle-kny
                  resource: requests.memory
          ports:
            - name: pod-port
              containerPort: 8080
              protocol: TCP
          resources:
             limits:
               memory: 2Gi
               cpu: "2"
             requests:
               memory: 200Mi
               cpu: 200m
          livenessProbe:
            httpGet:
              path: /cmii/health
              port: pod-port
              scheme: HTTP
            initialDelaySeconds: 60
            timeoutSeconds: 5
            periodSeconds: 20
            successThreshold: 1
            failureThreshold: 3
          readinessProbe:
            httpGet:
              path: /cmii/health
              port: pod-port
              scheme: HTTP
            initialDelaySeconds: 60
            timeoutSeconds: 5
            periodSeconds: 20
            successThreshold: 1
            failureThreshold: 3
          startupProbe:
            httpGet:
              path: /cmii/health
              port: pod-port
              scheme: HTTP
            initialDelaySeconds: 60
            timeoutSeconds: 3
            periodSeconds: 20
            successThreshold: 1
            failureThreshold: 5
          volumeMounts:
            - name: nfs-backend-log-volume
              mountPath: /cmii/logs
              readOnly: false
              subPath: wdd-rmdc/cmii-uas-lifecycle-kny
      volumes:
        - name: nfs-backend-log-volume
          persistentVolumeClaim:
            claimName: nfs-backend-log-pvc
---
apiVersion: v1
kind: Service
metadata:
  name: cmii-uas-lifecycle-kny
  namespace: wdd-rmdc
  labels:
    cmii.type: backend
    cmii.app: cmii-uas-lifecycle-kny
    octopus/control: backend-app-1.0.0
    app.kubernetes.io/managed-by: octopus
    app.kubernetes.io/app-version: base-1.0
spec:
  type: ClusterIP
  selector:
    cmii.type: backend
    cmii.app: cmii-uas-lifecycle-kny
  ports:
    - name: backend-tcp
      port: 8080
      protocol: TCP
      targetPort: 8080
---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: cmii-uav-material-warehouse
  namespace: wdd-rmdc
  labels:
    cmii.type: backend
    cmii.app: cmii-uav-material-warehouse
    octopus/control: backend-app-1.0.0
    app.kubernetes.io/managed-by: octopus
    app.kubernetes.io/app-version: base-1.0
spec:
  replicas: 1
  strategy:
    rollingUpdate:
      maxUnavailable: 1
  selector:
    matchLabels:
      cmii.type: backend
      cmii.app: cmii-uav-material-warehouse
  template:
    metadata:
      labels:
        cmii.type: backend
        cmii.app: cmii-uav-material-warehouse
    spec:
      affinity:
        nodeAffinity:
          requiredDuringSchedulingIgnoredDuringExecution:
            nodeSelectorTerms:
              - matchExpressions:
                  - key: uavcloud.env
                    operator: In
                    values:
                      - rmdc
      imagePullSecrets:
        - name: harborsecret
      containers:
        - name: cmii-uav-material-warehouse
          image: harbor.cdcyy.com.cn/cmii/cmii-uav-material-warehouse:master-2.1-20250704
          imagePullPolicy: Always
          env:
            - name: K8S_NAMESPACE
              value: wdd-rmdc
            - name: APPLICATION_NAME
              value: cmii-uav-material-warehouse
            - name: CUST_JAVA_OPTS
              value: "-Xms200m -Xmx1500m -Dlog4j2.formatMsgNoLookups=true"
            - name: NACOS_REGISTRY
              value: "helm-nacos:8848"
            - name: NACOS_DISCOVERY_IP
              valueFrom:
                fieldRef:
                  fieldPath: status.podIP
            - name: NACOS_DISCOVERY_PORT
              value: "8080"
            - name: BIZ_CONFIG_GROUP
              value: base-1.0
            - name: SYS_CONFIG_GROUP
              value: base-1.0
            - name: NACOS_USERNAME
              value: "developer"
            - name: NACOS_PASSWORD
              value: "Deve@9128201"
            - name: IMAGE_NAME
              value: harbor.cdcyy.com.cn/cmii/cmii-uav-material-warehouse:master-2.1-20250704
            - name: POD_NAME
              valueFrom:
                fieldRef:
                  fieldPath: metadata.name
            - name: POD_NAMESPACE
              valueFrom:
                fieldRef:
                  fieldPath: metadata.namespace
            - name: NODE_NAME
              valueFrom:
                fieldRef:
                  fieldPath: spec.nodeName
            - name: NODE_IP
              valueFrom:
                fieldRef:
                  fieldPath: status.hostIP
            - name: LIMIT_CPU
              valueFrom:
                resourceFieldRef:
                  containerName: cmii-uav-material-warehouse
                  resource: limits.cpu
            - name: LIMIT_MEMORY
              valueFrom:
                resourceFieldRef:
                  containerName: cmii-uav-material-warehouse
                  resource: limits.memory
            - name: REQUEST_CPU
              valueFrom:
                resourceFieldRef:
                  containerName: cmii-uav-material-warehouse
                  resource: requests.cpu
            - name: REQUEST_MEMORY
              valueFrom:
                resourceFieldRef:
                  containerName: cmii-uav-material-warehouse
                  resource: requests.memory
          ports:
            - name: pod-port
              containerPort: 8080
              protocol: TCP
          resources:
             limits:
               memory: 2Gi
               cpu: "2"
             requests:
               memory: 200Mi
               cpu: 200m
          livenessProbe:
            httpGet:
              path: /cmii/health
              port: pod-port
              scheme: HTTP
            initialDelaySeconds: 60
            timeoutSeconds: 5
            periodSeconds: 20
            successThreshold: 1
            failureThreshold: 3
          readinessProbe:
            httpGet:
              path: /cmii/health
              port: pod-port
              scheme: HTTP
            initialDelaySeconds: 60
            timeoutSeconds: 5
            periodSeconds: 20
            successThreshold: 1
            failureThreshold: 3
          startupProbe:
            httpGet:
              path: /cmii/health
              port: pod-port
              scheme: HTTP
            initialDelaySeconds: 60
            timeoutSeconds: 3
            periodSeconds: 20
            successThreshold: 1
            failureThreshold: 5
          volumeMounts:
            - name: nfs-backend-log-volume
              mountPath: /cmii/logs
              readOnly: false
              subPath: wdd-rmdc/cmii-uav-material-warehouse
      volumes:
        - name: nfs-backend-log-volume
          persistentVolumeClaim:
            claimName: nfs-backend-log-pvc
---
apiVersion: v1
kind: Service
metadata:
  name: cmii-uav-material-warehouse
  namespace: wdd-rmdc
  labels:
    cmii.type: backend
    cmii.app: cmii-uav-material-warehouse
    octopus/control: backend-app-1.0.0
    app.kubernetes.io/managed-by: octopus
    app.kubernetes.io/app-version: base-1.0
spec:
  type: ClusterIP
  selector:
    cmii.type: backend
    cmii.app: cmii-uav-material-warehouse
  ports:
    - name: backend-tcp
      port: 8080
      protocol: TCP
      targetPort: 8080
---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: cmii-uavms-pyfusion
  namespace: wdd-rmdc
  labels:
    cmii.type: backend
    cmii.app: cmii-uavms-pyfusion
    octopus/control: backend-app-1.0.0
    app.kubernetes.io/managed-by: octopus
    app.kubernetes.io/app-version: base-1.0
spec:
  replicas: 1
  strategy:
    rollingUpdate:
      maxUnavailable: 1
  selector:
    matchLabels:
      cmii.type: backend
      cmii.app: cmii-uavms-pyfusion
  template:
    metadata:
      labels:
        cmii.type: backend
        cmii.app: cmii-uavms-pyfusion
    spec:
      affinity:
        nodeAffinity:
          requiredDuringSchedulingIgnoredDuringExecution:
            nodeSelectorTerms:
              - matchExpressions:
                  - key: uavcloud.env
                    operator: In
                    values:
                      - rmdc
      imagePullSecrets:
        - name: harborsecret
      containers:
        - name: cmii-uavms-pyfusion
          image: harbor.cdcyy.com.cn/cmii/cmii-uavms-pyfusion:6.3.6
          imagePullPolicy: Always
          env:
            - name: K8S_NAMESPACE
              value: wdd-rmdc
            - name: APPLICATION_NAME
              value: cmii-uavms-pyfusion
            - name: CUST_JAVA_OPTS
              value: "-Xms200m -Xmx1500m -Dlog4j2.formatMsgNoLookups=true"
            - name: NACOS_REGISTRY
              value: "helm-nacos:8848"
            - name: NACOS_DISCOVERY_IP
              valueFrom:
                fieldRef:
                  fieldPath: status.podIP
            - name: NACOS_DISCOVERY_PORT
              value: "8080"
            - name: BIZ_CONFIG_GROUP
              value: base-1.0
            - name: SYS_CONFIG_GROUP
              value: base-1.0
            - name: NACOS_USERNAME
              value: "developer"
            - name: NACOS_PASSWORD
              value: "Deve@9128201"
            - name: IMAGE_NAME
              value: harbor.cdcyy.com.cn/cmii/cmii-uavms-pyfusion:6.3.6
            - name: POD_NAME
              valueFrom:
                fieldRef:
                  fieldPath: metadata.name
            - name: POD_NAMESPACE
              valueFrom:
                fieldRef:
                  fieldPath: metadata.namespace
            - name: NODE_NAME
              valueFrom:
                fieldRef:
                  fieldPath: spec.nodeName
            - name: NODE_IP
              valueFrom:
                fieldRef:
                  fieldPath: status.hostIP
            - name: LIMIT_CPU
              valueFrom:
                resourceFieldRef:
                  containerName: cmii-uavms-pyfusion
                  resource: limits.cpu
            - name: LIMIT_MEMORY
              valueFrom:
                resourceFieldRef:
                  containerName: cmii-uavms-pyfusion
                  resource: limits.memory
            - name: REQUEST_CPU
              valueFrom:
                resourceFieldRef:
                  containerName: cmii-uavms-pyfusion
                  resource: requests.cpu
            - name: REQUEST_MEMORY
              valueFrom:
                resourceFieldRef:
                  containerName: cmii-uavms-pyfusion
                  resource: requests.memory
          ports:
            - name: pod-port
              containerPort: 8080
              protocol: TCP
          resources:
             limits:
               memory: 2Gi
               cpu: "2"
             requests:
               memory: 200Mi
               cpu: 200m
          livenessProbe:
            httpGet:
              path: /cmii/health
              port: pod-port
              scheme: HTTP
            initialDelaySeconds: 60
            timeoutSeconds: 5
            periodSeconds: 20
            successThreshold: 1
            failureThreshold: 3
          readinessProbe:
            httpGet:
              path: /cmii/health
              port: pod-port
              scheme: HTTP
            initialDelaySeconds: 60
            timeoutSeconds: 5
            periodSeconds: 20
            successThreshold: 1
            failureThreshold: 3
          startupProbe:
            httpGet:
              path: /cmii/health
              port: pod-port
              scheme: HTTP
            initialDelaySeconds: 60
            timeoutSeconds: 3
            periodSeconds: 20
            successThreshold: 1
            failureThreshold: 5
          volumeMounts:
            - name: nfs-backend-log-volume
              mountPath: /cmii/logs
              readOnly: false
              subPath: wdd-rmdc/cmii-uavms-pyfusion
      volumes:
        - name: nfs-backend-log-volume
          persistentVolumeClaim:
            claimName: nfs-backend-log-pvc
---
apiVersion: v1
kind: Service
metadata:
  name: cmii-uavms-pyfusion
  namespace: wdd-rmdc
  labels:
    cmii.type: backend
    cmii.app: cmii-uavms-pyfusion
    octopus/control: backend-app-1.0.0
    app.kubernetes.io/managed-by: octopus
    app.kubernetes.io/app-version: base-1.0
spec:
  type: ClusterIP
  selector:
    cmii.type: backend
    cmii.app: cmii-uavms-pyfusion
  ports:
    - name: backend-tcp
      port: 8080
      protocol: TCP
      targetPort: 8080
---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: cmii-uav-iot-dispatcher
  namespace: wdd-rmdc
  labels:
    cmii.type: backend
    cmii.app: cmii-uav-iot-dispatcher
    octopus/control: backend-app-1.0.0
    app.kubernetes.io/managed-by: octopus
    app.kubernetes.io/app-version: base-1.0
spec:
  replicas: 1
  strategy:
    rollingUpdate:
      maxUnavailable: 1
  selector:
    matchLabels:
      cmii.type: backend
      cmii.app: cmii-uav-iot-dispatcher
  template:
    metadata:
      labels:
        cmii.type: backend
        cmii.app: cmii-uav-iot-dispatcher
    spec:
      affinity:
        nodeAffinity:
          requiredDuringSchedulingIgnoredDuringExecution:
            nodeSelectorTerms:
              - matchExpressions:
                  - key: uavcloud.env
                    operator: In
                    values:
                      - rmdc
      imagePullSecrets:
        - name: harborsecret
      containers:
        - name: cmii-uav-iot-dispatcher
          image: harbor.cdcyy.com.cn/cmii/cmii-uav-iot-dispatcher:6.2.0-focus
          imagePullPolicy: Always
          env:
            - name: K8S_NAMESPACE
              value: wdd-rmdc
            - name: APPLICATION_NAME
              value: cmii-uav-iot-dispatcher
            - name: CUST_JAVA_OPTS
              value: "-Xms200m -Xmx1500m -Dlog4j2.formatMsgNoLookups=true"
            - name: NACOS_REGISTRY
              value: "helm-nacos:8848"
            - name: NACOS_DISCOVERY_IP
              valueFrom:
                fieldRef:
                  fieldPath: status.podIP
            - name: NACOS_DISCOVERY_PORT
              value: "8080"
            - name: BIZ_CONFIG_GROUP
              value: base-1.0
            - name: SYS_CONFIG_GROUP
              value: base-1.0
            - name: NACOS_USERNAME
              value: "developer"
            - name: NACOS_PASSWORD
              value: "Deve@9128201"
            - name: IMAGE_NAME
              value: harbor.cdcyy.com.cn/cmii/cmii-uav-iot-dispatcher:6.2.0-focus
            - name: POD_NAME
              valueFrom:
                fieldRef:
                  fieldPath: metadata.name
            - name: POD_NAMESPACE
              valueFrom:
                fieldRef:
                  fieldPath: metadata.namespace
            - name: NODE_NAME
              valueFrom:
                fieldRef:
                  fieldPath: spec.nodeName
            - name: NODE_IP
              valueFrom:
                fieldRef:
                  fieldPath: status.hostIP
            - name: LIMIT_CPU
              valueFrom:
                resourceFieldRef:
                  containerName: cmii-uav-iot-dispatcher
                  resource: limits.cpu
            - name: LIMIT_MEMORY
              valueFrom:
                resourceFieldRef:
                  containerName: cmii-uav-iot-dispatcher
                  resource: limits.memory
            - name: REQUEST_CPU
              valueFrom:
                resourceFieldRef:
                  containerName: cmii-uav-iot-dispatcher
                  resource: requests.cpu
            - name: REQUEST_MEMORY
              valueFrom:
                resourceFieldRef:
                  containerName: cmii-uav-iot-dispatcher
                  resource: requests.memory
          ports:
            - name: pod-port
              containerPort: 8080
              protocol: TCP
          resources:
             limits:
               memory: 2Gi
               cpu: "2"
             requests:
               memory: 200Mi
               cpu: 200m
          livenessProbe:
            httpGet:
              path: /cmii/health
              port: pod-port
              scheme: HTTP
            initialDelaySeconds: 60
            timeoutSeconds: 5
            periodSeconds: 20
            successThreshold: 1
            failureThreshold: 3
          readinessProbe:
            httpGet:
              path: /cmii/health
              port: pod-port
              scheme: HTTP
            initialDelaySeconds: 60
            timeoutSeconds: 5
            periodSeconds: 20
            successThreshold: 1
            failureThreshold: 3
          startupProbe:
            httpGet:
              path: /cmii/health
              port: pod-port
              scheme: HTTP
            initialDelaySeconds: 60
            timeoutSeconds: 3
            periodSeconds: 20
            successThreshold: 1
            failureThreshold: 5
          volumeMounts:
            - name: nfs-backend-log-volume
              mountPath: /cmii/logs
              readOnly: false
              subPath: wdd-rmdc/cmii-uav-iot-dispatcher
      volumes:
        - name: nfs-backend-log-volume
          persistentVolumeClaim:
            claimName: nfs-backend-log-pvc
---
apiVersion: v1
kind: Service
metadata:
  name: cmii-uav-iot-dispatcher
  namespace: wdd-rmdc
  labels:
    cmii.type: backend
    cmii.app: cmii-uav-iot-dispatcher
    octopus/control: backend-app-1.0.0
    app.kubernetes.io/managed-by: octopus
    app.kubernetes.io/app-version: base-1.0
spec:
  type: ClusterIP
  selector:
    cmii.type: backend
    cmii.app: cmii-uav-iot-dispatcher
  ports:
    - name: backend-tcp
      port: 8080
      protocol: TCP
      targetPort: 8080
