apiVersion: apisix.apache.org/v2
kind: ApisixRoute
metadata:
  name: pchub-route
  namespace: pchub
spec:
  http:
    - name: pchub-route
      match:
        hosts:
          - pch.pingcap.net
        paths:
          - /*
      backends:
        - serviceName: pchub-service
          servicePort: 80
          weight: 10
      plugins:
        - name: redirect
          enable: true
          config:
            http_to_https: true
        - name: ip-restriction
          enable: true
          config:
            whitelist:
              - 1.203.96.0/29
              - 117.134.13.184/29
              - 103.85.175.128/29
              - 211.95.24.8/29
              - 101.207.139.187/32
              - 183.129.144.200/29
              - 183.6.107.178/32
              - 119.136.31.176/32
              - 117.50.84.111/32
              - 120.92.122.221/32
              - 120.92.20.132/32
              - 106.75.116.22/32
              - 118.194.230.143/32
              - 120.92.100.187/32
              - 152.104.28.129/32
              - 120.92.102.252/32
              - 63.70.2.110/32
              - 106.75.52.157/32
              - 128.1.49.135/32
              - 120.92.55.209/32
              - 120.92.55.116/32
              - 120.92.72.28/32
              - 104.250.50.40/32
              - 20.63.218.57/32
              - 128.1.49.85/32
              - 118.194.230.143/32
              - 58.94.102.181/32
              - 120.92.20.16/32
              - 120.92.20.26/32
              - 104.250.53.237/32
