Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: add fetch ingress list and ingress detail from k8s cluster api to backend #169

Merged
merged 9 commits into from Jan 3, 2019

Conversation

Projects
None yet
4 participants
@HZ89
Copy link
Collaborator

HZ89 commented Dec 20, 2018

What type of PR is this?

/kind feature

What this PR does / why we need it:
api add:

/api/v1//kubernetes/apps/:appId/ingresses/namespaces/:namespace/clusters/:cluster
/api/v1//kubernetes/apps/:appId/ingresses/:ingress/detail/namespaces/:namespace/clusters/:cluster

test result:

curl --location --request GET "http://127.0.0.1:8080/api/v1//kubernetes/apps/0/ingresses/namespaces/default/clusters/minikube"
{
  "data": {
    "pageNo": 1,
    "pageSize": 10,
    "totalPage": 1,
    "totalCount": 1,
    "list": [
      {
        "objectMeta": {
          "name": "my-nginx",
          "namespace": "default",
          "annotations": {
            "kubectl.kubernetes.io/last-applied-configuration": "{\"apiVersion\":\"extensions/v1beta1\",\"kind\":\"Ingress\",\"metadata\":{\"annotations\":{\"kubernetes.io/ingress.class\":\"traefik\",\"traefik.frontend.rule.type\":\"PathPrefixStrip\"},\"name\":\"my-nginx\",\"namespace\":\"default\"},\"spec\":{\"rules\":[{\"host\":\"my-nginx.exapmle.com\",\"http\":{\"paths\":[{\"backend\":{\"serviceName\":\"my-nginx\",\"servicePort\":80},\"path\":\"/\"}]}}]}}\n",
            "kubernetes.io/ingress.class": "traefik",
            "traefik.frontend.rule.type": "PathPrefixStrip"
          },
          "creationTimestamp": "2018-12-20T10:30:58Z"
        },
        "typeMeta": {
          "kind": "ingress"
        },
        "endpoints": []
      }
    ]
  }
}
curl --location --request GET "http://127.0.0.1:8080/api/v1//kubernetes/apps/0/ingresses/my-nginx/detail/namespaces/default/clusters/minikube"
{
  "data": {
    "objectMeta": {
      "name": "my-nginx",
      "namespace": "default",
      "annotations": {
        "kubectl.kubernetes.io/last-applied-configuration": "{\"apiVersion\":\"extensions/v1beta1\",\"kind\":\"Ingress\",\"metadata\":{\"annotations\":{\"kubernetes.io/ingress.class\":\"traefik\",\"traefik.frontend.rule.type\":\"PathPrefixStrip\"},\"name\":\"my-nginx\",\"namespace\":\"default\"},\"spec\":{\"rules\":[{\"host\":\"my-nginx.exapmle.com\",\"http\":{\"paths\":[{\"backend\":{\"serviceName\":\"my-nginx\",\"servicePort\":80},\"path\":\"/\"}]}}]}}\n",
        "kubernetes.io/ingress.class": "traefik",
        "traefik.frontend.rule.type": "PathPrefixStrip"
      },
      "creationTimestamp": "2018-12-20T10:30:58Z"
    },
    "typeMeta": {
      "kind": "ingress"
    },
    "endpoints": []
  }
}

@HZ89 HZ89 force-pushed the HZ89:k8s-ingress-api branch from 403dca3 to 6707972 Dec 21, 2018

@HZ89 HZ89 changed the title add api support fetch ingress list and ingress detail from k8s cluster backend: add api support fetch ingress list and ingress detail from k8s cluster Dec 21, 2018

@wilhelmguo wilhelmguo requested review from chengyumeng and wilhelmguo Dec 21, 2018

@HZ89 HZ89 changed the title backend: add api support fetch ingress list and ingress detail from k8s cluster Feature: add fetch ingress list and ingress detail from k8s cluster api to backend Dec 21, 2018

@HZ89 HZ89 force-pushed the HZ89:k8s-ingress-api branch from 6707972 to c7f4bac Dec 21, 2018

@HZ89 HZ89 force-pushed the HZ89:k8s-ingress-api branch 4 times, most recently from 41bb6d7 to 39465b3 Dec 21, 2018

@HZ89 HZ89 force-pushed the HZ89:k8s-ingress-api branch from 8e26324 to 2997ce9 Jan 3, 2019

@wilhelmguo wilhelmguo merged commit eeaaf11 into Qihoo360:master Jan 3, 2019

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.