1
0
mirror of https://github.com/rancher/steve.git synced 2025-04-27 11:00:48 +00:00
Commit Graph

488 Commits

Author SHA1 Message Date
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
Michael Bolot
06584d207d
Merge pull request #55 from MbolotSuse/access-mem-fix
Adding logic to limit number of cached schemas
2022-09-28 15:43:12 -05:00
Michael Bolot
b449b93643 Adding tests
Adds tests for:
- Cache clearing functionality
- Very basic schema generation
2022-08-26 09:28:21 -05:00
Michael Bolot
115eb31f57 Adding logic to limit number of cached schemas
Adds logic to ensure that only one schema/access set
is cached for each user. This should improve memory
consumption
2022-08-26 09:27:57 -05:00
Caleb Bron
647cba2be7
Merge pull request #56 from MbolotSuse/auth
Adding user authentication failed context value
2022-08-05 13:00:26 -07:00
Michael Bolot
7b5a48f871 Adding user authentication failed context value 2022-08-04 20:39:40 -05:00
Kinara Shah
dbf9ef88ce
Merge pull request #54 from kinarashah/124 2022-06-28 16:54:27 -07:00
Kinara Shah
3c8925cc12 wait for svc account secret to be populated with token 2022-06-28 16:25:00 -07:00
Kinara Shah
3d379c3dd8
Merge pull request #53 from jiaqiluo/support-1-24 2022-06-24 16:16:20 -07:00
Jiaqi Luo
485ebe48a9 generate a service account token to make it work in 1.24 2022-06-24 15:47:22 -07:00
Kinara Shah
d26d34631a
Merge pull request #50 from ebauman/v1.24.0 2022-06-24 15:44:43 -07:00
Colleen Murphy
22b03d364d
Merge pull request #49 from cmurphy/watch-logging-head
Make watches debuggable
2022-06-13 17:18:54 -07:00
Colleen Murphy
11fe86ab7e Make watch timeout configurable
By default, a watch times out after 30 minutes. For debugging purposes,
it's convenient if this can be decreased. Add an environment variable
CATTLE_WATCH_TIMEOUT_SECONDS to enable setting the timeout in seconds.
2022-06-13 16:01:55 -07:00
Colleen Murphy
ada5b33d98 Return websocket error and add logging for watches
Add debug logs and send websocket messages when the watch is closed
unexpectedly.

In addition to being helpful for debugging, the dashboard specifically
looks for a `resource.error` event containing the string "too old" in
order to trigger the watch to be resynced with a refreshed revision
number.  Without this error returned, the dashboard will only see
`resource.stop` events and never change its behavior, continuing to try
to restart the watch with an incorrect resource version.
2022-06-13 15:54:40 -07:00
Eamon Bauman
3ccc837e84 webhook setup requires rest.Config now 2022-05-25 18:49:28 -05:00
Eamon Bauman
9aa80d900e missed a few packages 2022-05-25 18:49:16 -05:00
Eamon Bauman
570fe24632 v1.24.0 2022-05-25 18:34:56 -05:00
Caleb Bron
53511a06ff
Merge pull request #44 from rancher/enable_fossa
enable fossa scanning
2022-05-02 17:40:32 -07:00
Colleen Murphy
b23977e7f1
Merge pull request #46 from cmurphy/filter-fields
Add field filtering for resources
2022-04-15 11:41:29 -07: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
Sheilagh Morlan
b34760dad5
Merge pull request #45 from rancher/dependencies-bumps
Dependencies bumps
2022-04-06 08:04:13 -07:00
Guilherme Macedo
87f7f70d0d
Dependencies bumps
Signed-off-by: Guilherme Macedo <guilherme.macedo@suse.com>
2022-04-05 17:15:14 +02:00
Nelson Roberts
974c0a7f91
enable fossa scanning
request: https://github.com/rancherlabs/eio/issues/772
2022-03-31 14:32:46 -07:00
Sergey Nasovich
283b01b970
Merge pull request #41 from jakefhyde/fix-relationship-closed-channel 2022-03-03 18:41:26 -05:00
Jake Hyde
6bb3915906 Prevent write on closed channel 2022-03-02 19:19:02 -05:00
Ricardo Weir
a91d90251f
Merge pull request #38 from rmweir/add-metrics
Add metrics
2022-02-18 10:13:07 -07:00
Ricardo Weir
e9472ecc34 Add metrics 2022-02-14 17:39:37 -07:00
Darren Shepherd
376e30bba7
Merge pull request #37 from aiwantaozi/fix-404
Fixed errors in obtaining object relationships
2022-01-26 10:05:19 -07:00
michelia
42c575a009 Fixed errors in obtaining object relationships
Issue: https://github.com/harvester/harvester/issues/1857
2022-01-26 19:31:03 +08:00
Darren Shepherd
e7119828b8 Update wrangler 2022-01-07 14:31:29 -07:00
Darren Shepherd
9d72af0469
Merge pull request #33 from CraigMChen/feature/k8s1.16-
feat: support k8s version less than 1.16
2022-01-07 13:37:03 -07:00
Sergey Nasovich
7fe97fb76f
Merge pull request #35 from thedadams/bump-remote-dialer-f3837f8d649a 2022-01-04 14:49:38 -05:00
Donnie Adams
5ababa3824 Bump remotedialer to add pause/resume functionality 2022-01-04 12:45:17 -07:00
CMC
fea67065db
feat: support k8s version less than 1.16 2021-11-25 16:16:20 +08:00
Dan Ramich
7224dc2101
Merge pull request #30 from dramich/vendor1
Vendor update for APIserver
2021-09-22 13:55:10 -06:00
Dan Ramich
793ace1aa1 Vendor update for APIserver 2021-09-22 13:40:45 -06:00
Caleb Bron
ae8b162608
Merge pull request #29 from ryansann/m-role-revision-index-fix
Fix role revision index for rolebindings that bind to clusterroles
2021-09-15 10:15:17 -07:00
Ryan Sanna
fe125f80f3 fix role revision index for rolebindings that bind to clusterroles 2021-09-14 15:36:51 -07:00
Darren Shepherd
8ecda307ee Update vendor 2021-08-18 17:17:52 -07:00
Darren Shepherd
e70fca2a42 Fix restart of steve aggregation 2021-08-16 22:05:50 -07: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
d9512c366d Add ability to disallow methods per a schema attribute 2021-08-13 11:37:57 -07:00
Darren Shepherd
e9222c6ccf Update vendor 2021-08-10 16:09:39 -07:00
Darren Shepherd
4a34cec914 Add server version to websocket pings 2021-08-10 16:09:19 -07:00
Darren Shepherd
b219ba5d7c Don't cache the user's schema cache key 2021-08-10 14:02:22 -07:00
Darren Shepherd
a2354a9ed9 Update vendor 2021-08-10 11:04:45 -07:00
Darren Shepherd
426330efa2 Ensure that watches use the latest schemas 2021-08-10 11:03:59 -07:00
Darren Shepherd
0414d4acf5 If the user doesn't specify a resourceVersion default to "" not latest 2021-08-10 10:43:34 -07:00
Darren Shepherd
9f5d802708 Cleanup schema change reporting 2021-08-09 16:47:09 -07:00