kind: Deployment
apiVersion: apps/v1
metadata:
  name: cmii-uav-sense-adapter
  namespace: cmii-s1
  labels:
    app.kubernetes.io/instance: cmii-uav-sense-adapter
    app.kubernetes.io/managed-by: Helm
    cmii.app: cmii-uav-sense-adapter
    cmii.modules: cmlc
    cmii.type: backend
    cmii/managed-by: jenkins-pipeline-standalone-job
spec:
  replicas: 1
  selector:
    matchLabels:
      cmii.app: cmii-uav-sense-adapter
      cmii.type: backend
      cmii/managed-by: jenkins-pipeline-standalone-job
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: cmii-uav-sense-adapter
        app.kubernetes.io/managed-by: Helm
        cmii.app: cmii-uav-sense-adapter
        cmii.modules: cmlc
        cmii.type: backend
        cmii/managed-by: jenkins-pipeline-standalone-job
    spec:
      volumes:
        - name: nfs-backend-log-volume
          persistentVolumeClaim:
            claimName: nfs-backend-log-pvc
      containers:
        - name: cmii-uav-sense-adapter
          image: 'harbor.cdcyy.com.cn/cmii/cmii-uav-sense-adapter:5.6.0-0629'
          ports:
            - name: pod-port
              containerPort: 8080
              protocol: TCP
            - name: pod-port-10
              containerPort: 8010
              protocol: TCP
            - name: pod-port-12
              containerPort: 8012
              protocol: TCP
            - name: pod-port-11
              containerPort: 8011
              protocol: UDP
            - name: pod-port-13
              containerPort: 8013
              protocol: UDP
          env:
            - name: GIT_BRANCH
              value: master
            - name: GIT_COMMIT
              value: 08c82e1261825e4842245df76f3f52c9c4c069eb
            - name: K8S_NAMESPACE
              value: uavcloud-dev
            - name: APPLICATION_NAME
              value: cmii-uav-sense-adapter
            - name: CUST_JAVA_OPTS
              value: '-Xms512m -Xmx2048m -Dlog4j2.formatMsgNoLookups=true'
            - name: NACOS_REGISTRY
              value: 'helm-nacos:8848'
            - name: NACOS_USERNAME
              value: developer
            - name: NACOS_PASSWORD
              value: Deve@9128201
            - name: NACOS_DISCOVERY_IP
              valueFrom:
                fieldRef:
                  apiVersion: v1
                  fieldPath: status.podIP
            - name: NACOS_DISCOVERY_PORT
              value: '8080'
            - name: IMAGE_VERSION
              value: 5.6.0
            - name: BIZ_CONFIG_GROUP
            - name: SYS_CONFIG_GROUP
          resources:
            limits:
              cpu: '2'
              memory: 2Gi
            requests:
              cpu: 100m
              memory: 200Mi
          volumeMounts:
            - name: nfs-backend-log-volume
              mountPath: /cmii/logs
              subPath: cmii-s1/cmii-uav-sense-adapter
          livenessProbe:
            httpGet:
              path: /cmii/health
              port: pod-port
              scheme: HTTP
            initialDelaySeconds: 5
            timeoutSeconds: 2
            periodSeconds: 10
            successThreshold: 1
            failureThreshold: 3
          readinessProbe:
            httpGet:
              path: /cmii/health
              port: pod-port
              scheme: HTTP
            initialDelaySeconds: 5
            timeoutSeconds: 2
            periodSeconds: 10
            successThreshold: 1
            failureThreshold: 3
          startupProbe:
            httpGet:
              path: /cmii/health
              port: pod-port
              scheme: HTTP
            initialDelaySeconds: 120
            timeoutSeconds: 2
            periodSeconds: 10
            successThreshold: 1
            failureThreshold: 10
          terminationMessagePath: /dev/termination-log
          terminationMessagePolicy: File
          imagePullPolicy: Always
      restartPolicy: Always
      terminationGracePeriodSeconds: 30
      dnsPolicy: ClusterFirst
      securityContext: {}
      imagePullSecrets:
        - name: harborsecret
      affinity: {}
      schedulerName: default-scheduler
  strategy:
    type: RollingUpdate
    rollingUpdate:
      maxUnavailable: 1
      maxSurge: 25%
  revisionHistoryLimit: 10
  progressDeadlineSeconds: 600
---
kind: Service
apiVersion: v1
metadata:
  name: cmii-uav-sense-adapter
  namespace: cmii-s1
  labels:
    app.kubernetes.io/instance: cmii-uav-sense-adapter
    app.kubernetes.io/managed-by: Helm
    cmii.app: cmii-uav-sense-adapter
    cmii.modules: cmlc
    cmii.type: backend
    cmii/managed-by: jenkins-pipeline-standalone-job
spec:
  ports:
    - name: cmii-uav-sense-adapter
      protocol: TCP
      port: 8080
      targetPort: 8080
    - name: cmii-uav-sense-8010
      protocol: TCP
      port: 8010
      targetPort: 8010
    - name: cmii-uav-sense-8012
      protocol: TCP
      port: 8012
      targetPort: 8012
    - name: cmii-uav-sense-8011
      protocol: UDP
      port: 8011
      targetPort: 8011
    - name: cmii-uav-sense-8013
      protocol: UDP
      port: 8013
      targetPort: 8013
  selector:
    cmii.app: cmii-uav-sense-adapter
    cmii.type: backend
    cmii/managed-by: jenkins-pipeline-standalone-job
  type: NodePort
  sessionAffinity: None
  externalTrafficPolicy: Cluster
---