apiVersion: apps/v1
kind: Deployment
metadata:
  name: dubbo-admin-deployment
  namespace: bcx-opm
  labels:
    app: dubbo-admin
spec:
  replicas: 1
  selector:
    matchLabels:
      app: dubbo-admin
  template:
    metadata:
      labels:
        app: dubbo-admin
    spec:
      containers:
        - name: dubbo-admin
          image: apache/dubbo-admin:latest
          imagePullPolicy: IfNotPresent
          ports:
            - containerPort: 38080
              name: http-port
            - containerPort: 8080
              name: tcp-port
          env:
            - name: "admin.registry.address"
              value: "nacos://nacos-service.bcx-opm.svc.cluster.local:8848"
            - name: "admin.config-center"
              value: "nacos://nacos-service.bcx-opm.svc.cluster.local:8848"
            - name: "admin.metadata-report.address"
              value: "nacos://nacos-service.bcx-opm.svc.cluster.local:8848"
---
apiVersion: v1
kind: Service
metadata:
  name: dubbo-admin-service
  namespace: bcx-opm
  labels:
    app: dubbo-admin
spec:
  type: ClusterIP
  ports:
    - port: 38080
      name: http-port
      targetPort: 38080
    - port: 8080
      name: tcp-port
      targetPort: 8080
  selector:
    app: dubbo-admin