apiVersion: v1
kind: Service
metadata:
  name: cctp-mobile-business
  namespace: cctp
spec:
  ports:
    - protocol: TCP
      port: 80
      targetPort: 80
  selector:
    k8s-app: cctp-mobile-business
  type: ClusterIP

---
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: ingress-cctp-mobile-business
  namespace: cctp
  annotations:
    kubernetes.io/ingress.class: nginx
spec:
  rules:
    - host: mobile-business.cctp.dev.northking.net
      http:
        paths:
          - path: /
            backend:
              serviceName: cctp-mobile-business
              servicePort: 80

---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: cctp-mobile-business
  namespace: cctp
  labels:
    k8s-app: cctp-mobile-business
spec:
  replicas: 1
  selector:
    matchLabels:
      k8s-app: cctp-mobile-business
  template:
    metadata:
      labels:
        k8s-app: cctp-mobile-business
    spec:
      dnsConfig:
        options:
          - name: ndots
            value: '3'
      containers:
        - name: cctp-mobile-business
          image: 'harbor.k8s.dev.northking.net/gzrdc/cctp-mobile-business:3.0-SNAPSHOT'
          imagePullPolicy: Always
          env:
            - name: APP_PROFILE
              value: dev
            - name: SERVER_PORT
              value: "80"
            - name: NACOS_NAMESPACE
              value: dev
            - name: NACOS_CLIENT_HOST
              value: mobile-business.cctp.dev.northking.net
            - name: NACOS_CLIENT_PORT
              value: "80"
            - name: NACOS_SERVER_URL
              value: nacos-headless.cctp.svc.cluster.local:8848
          ports:
            - containerPort: 80
              protocol: TCP
      imagePullSecrets:
        - name: harbor-k8s-dev-secret
