Commit Graph

65 Commits

Author SHA1 Message Date
niusmallnan
1dd514a7f8 K-EXPLORER: bump shell pod image v0.1.20 2023-07-11 11:32:59 +08:00
niusmallnan
0aa8846527 K-EXPLORER: Merge branch 'master' bf2e9655f5 into ke/v0.3 2023-07-11 11:29:51 +08:00
Colleen Murphy
84dedac146 Add projectsornamespaces query parameter
Add a new query parameter to filter resources by their namespace or
their namespace's project. This parameter is separate from the existing
`filter` parameter.

Filter by a comma-separated list of projects and/or namespaces with:

?projectsornamespaces=p1,n1,n2

The result can be negated with the ! operator:

?projectsornamespaces!=p1,n1,n2
2023-05-11 14:17:39 -07:00
niusmallnan
6906cf5ce8 K-EXPLORER: Merge branch 'master' 3d3cc77679 into ke/v0.3 2023-04-17 11:37:46 +08:00
Michael Bolot
9052c76e5f Tests for "Fixing view link for management crds" 2023-03-20 11:22:27 +08:00
Michael Bolot
7aa2be6f51 Fixing view link for management crds 2023-03-20 11:22:17 +08:00
niusmallnan
9e3b33d8b5 K-EXPLORER: bump rancher/shell 0.1.19 2023-03-20 11:21:39 +08:00
Colleen Murphy
9a386b205c Fix resource counts unit tests
Increase the timeout slightly to avoid the occasional premature timeout.
Fix error message typo.
2023-01-20 14:19:05 -08:00
Michael Bolot
956b7351aa
Initial implmentation of warning headers
Attempts to pass through warning headers which k8s returns.
Requires an update to rancher/apiserver.
2022-12-30 12:11:14 -05:00
Michael Bolot
8fdf67a444
Merge pull request #58 from MbolotSuse/count-diff
Changing count watch to only return changed counts
2022-12-14 10:15:18 -06:00
Michael Bolot
37ee7bf3bd
Merge pull request #67 from MbolotSuse/view-fix
Changing view links
2022-12-09 13:27:05 -06:00
Michael Bolot
fe51b08681 Tests for "Fixing view link for management crds" 2022-12-06 09:04:56 -06:00
Michael Bolot
b70a8d0548 Fixing view link for management crds 2022-12-06 09:04:31 -06:00
Kevin Joiner
72ab913c4c Updates Schemas watch logic.
Updated logic used to decide when and what schema events are sent
during a watch.
2022-10-27 22:12:39 -04:00
Michael Bolot
b73cc57b20 Adding validate phase to the CI
Adds a validate phase to the CI which runs a linter. Also fixes
linter issues discovered during the initial run
2022-10-14 15:21:17 -05:00
Michael Bolot
5cb45b9dcd Adding test for sending counts on diffs 2022-10-03 16:19:31 -05:00
Michael Bolot
2eb41a9db7 Only return changed counts, and send initial count
Three main changes:
- When a count changes, only send that count. This makes the
count socket significantly more usable
- The count buffer will now send a count right away. This allows
a message to launch wihtout an inital buffered wait period
- The count buffer now sends messages every 5 seconds instead of 1
2022-10-03 16:12:11 -05:00
niusmallnan
26e14afc0b K-EXPLORER: bump shell image v0.1.18 2022-08-19 17:28:37 +08:00
niusmallnan
d493afc3db K-EXPLORER: delete clusterrole when dashboard shell pod is deleted
refer to #cnrancher/pandaria/issues/2179
2022-08-09 09:11:45 +08:00
niusmallnan
ddca6fb48f K-EXPLORER: Merge rancher v2.6.5-rc8 base into ke/v0.2 2022-05-07 13:38:30 +08:00
Colleen Murphy
d4cfe78364 Add field filtering for resources
This change enables steve to work with three new query parameters:

"include": only include the named fields from the kubernetes object.
Subfields are denoted with ".". Subfields within arrays are ignored.
Multiple fields can be included by repeating the parameter. Example:

  GET /v1/configmaps?include=kind&include=apiVersion =>
  {
    "type": "collection",
    "links": {
      "self": "http://server/v1/configmaps"
    },
    "createTypes": {
      "configmap": "http://server/v1/configmaps"
    },
    "actions": {},
    "resourceType": "configmap",
    "revision": "327238",
    "data": [
      {
        "id": "c-m-w466b2vg/kube-root-ca.crt",
        "type": "configmap",
        "links": {
          "remove": "http://server/v1/configmaps/c-m-w466b2vg/kube-root-ca.crt",
          "self": "http://server/v1/configmaps/c-m-w466b2vg/kube-root-ca.crt",
          "update": "http://server/v1/configmaps/c-m-w466b2vg/kube-root-ca.crt",
          "view": "http://server/api/v1/namespaces/c-m-w466b2vg/configmaps/kube-root-ca.crt"
        },
        "apiVersion": "v1",
        "kind": "ConfigMap"
      },
    }
    ...
  }

"exclude": exclude the named fields from the kubernetes object.
Subfields are denoted with ".". Subfields within arrays are ignored.
Multiple fields can be excluded by repeating the parameter. Example:

  GET /v1/configmaps?exclude=data&exclude=metadata.managedFields =>
  {
  "type": "collection",
  "links": {
    "self": "http://server/v1/configmaps"
  },
  "createTypes": {
    "configmap": "http://server/v1/configmaps"
  },
  "actions": {},
  "resourceType": "configmap",
  "revision": "328086",
  "data": [
    {
      "id": "c-m-w466b2vg/kube-root-ca.crt",
      "type": "configmap",
      "links": {
        "remove": "http://server/v1/configmaps/c-m-w466b2vg/kube-root-ca.crt",
        "self": "http://server/v1/configmaps/c-m-w466b2vg/kube-root-ca.crt",
        "update": "http://server/v1/configmaps/c-m-w466b2vg/kube-root-ca.crt",
        "view": "http://server/api/v1/namespaces/c-m-w466b2vg/configmaps/kube-root-ca.crt"
      },
      "apiVersion": "v1",
      "kind": "ConfigMap",
      "metadata": {
        "creationTimestamp": "2022-04-11T22:05:27Z",
        "fields": [
          "kube-root-ca.crt",
          1,
          "25h"
        ],
        "name": "kube-root-ca.crt",
        "namespace": "c-m-w466b2vg",
        "relationships": null,
        "resourceVersion": "36948",
        "state": {
          "error": false,
          "message": "Resource is always ready",
          "name": "active",
          "transitioning": false
        },
        "uid": "1c497934-52cb-42ab-a613-dedfd5fb207b"
      }
    },
    ...
  }

"excludeValues": replace the values of an object with empty strings, leaving
the keys in place. Useful for showing a summary of an object with large
values, such as the data in a ConfigMap. Only works on fields that are
object. Multiple fields can have values excluded by repeating the
parameter. Example:

  GET /v1/configmaps?excludeValues=data =>
  {
    "type": "collection",
    ...
    "data": [
      {
        ...
        "data": {
          "ca.crt": ""
        },
        ...
      },
      ...
    ]
  }
2022-04-13 08:50:39 -07:00
Ricardo Weir
e9472ecc34 Add metrics 2022-02-14 17:39:37 -07:00
niusmallnan
28259927a9 K-EXPLORER: format cluster name with kube context 2022-02-09 16:34:02 +08:00
CMC
fea67065db
feat: support k8s version less than 1.16 2021-11-25 16:16:20 +08:00
niusmallnan
68b9d2e74a K-EXPLORER: Merge branch 'master' into ke/v0.2 2021-08-23 16:02:32 +08:00
Darren Shepherd
bcbcef36b3 Add blocked links for update and remove if method is disallowed 2021-08-16 15:41:36 -07:00
Darren Shepherd
4a34cec914 Add server version to websocket pings 2021-08-10 16:09:19 -07:00
Darren Shepherd
426330efa2 Ensure that watches use the latest schemas 2021-08-10 11:03:59 -07:00
Darren Shepherd
9f5d802708 Cleanup schema change reporting 2021-08-09 16:47:09 -07:00
niusmallnan
272322312a K-EXPLORER: Merge branch 'ke/v0.1' into ke/v0.2 2021-08-06 14:27:40 +08:00
Darren Shepherd
c6547ae887 Fix possible panic on race condition 2021-05-10 15:06:15 -07:00
niusmallnan
8c327e08ad K-EXPLORER: add shell link for local cluster 2021-04-15 10:53:35 +08:00
Darren Shepherd
c1ea7b9626 Register apply structs 2021-03-01 22:39:52 -07:00
Darren Shepherd
6b2a9678f1 Add userpreference 2021-03-01 22:26:26 -07:00
Darren Shepherd
df96a3bd4a Add fake cluster object and move apply action to core steve 2021-03-01 17:13:14 -07:00
Daishan
15808f524c Add self link 2021-01-06 10:50:59 -07:00
Darren Shepherd
a44863b331 Switch clustercache to index by gvk not gvr 2020-10-23 13:57:57 -07:00
Darren Shepherd
f86e19a301 Don't put an update link if update is not allowed 2020-09-29 10:47:59 -07:00
Darren Shepherd
09d79b238b Normalize conditions 2020-09-22 13:46:46 -07:00
Darren Shepherd
e106b9e16b Remove userpreferences from steve 2020-09-10 23:04:28 -07:00
Darren Shepherd
53e5a27ce7 Don't return revision in counts and only return error/transitions states 2020-08-27 21:28:37 -07:00
Darren Shepherd
a528c500cf Set pod status to state 2020-08-03 19:52:04 -07:00
Darren Shepherd
dcea1db3d7 Remove clusters and helm release resources 2020-07-29 21:47:58 -07:00
Darren Shepherd
10b1eac592 Fix concurrent map access panic 2020-07-21 08:26:08 -07:00
Darren Shepherd
e27f384795 Only send counts every second if there is a change 2020-07-20 09:21:03 -07:00
Darren Shepherd
969e1adfed Add podimpersonation package 2020-07-19 13:55:34 -07:00
Darren Shepherd
a9c39ef89b Support watching names and selector 2020-06-22 09:42:18 -07:00
Darren Shepherd
9571ce9890 Fix shell 2020-06-22 09:41:48 -07:00
Darren Shepherd
d796ed60a7 Show resource relationships 2020-06-22 08:49:49 -07:00
Darren Shepherd
d1a7dbb0b9 Shuffle around code and use rancher/apiserver 2020-06-11 21:51:19 -07:00