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
Merged

Conversation

HZ89
Copy link
Contributor

@HZ89 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 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 added kind/feature Categorizes issue or PR as related to a new feature. sig/backend Categorizes an issue or PR as relevant to sig-backend. labels 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
@wilhelmguo wilhelmguo merged commit eeaaf11 into Qihoo360:master Jan 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Categorizes issue or PR as related to a new feature. sig/backend Categorizes an issue or PR as relevant to sig-backend.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants