Commit Graph

184 Commits

Author SHA1 Message Date
Bastian Hofmann a9f153cac6 Fix: Open shell from workload pages may pick wrong pod
If a cluster contains two workloads (e.g. deployments) with the same spec.selector, the button to open a container shell from the workload page or list always picks the first pod that matches this selector without taking namespaces into account.

Fixes https://github.com/rancher/rancher/issues/36344 and https://github.com/rancher/rancher/issues/38506

Signed-off-by: Bastian Hofmann <bashofmann@gmail.com>
2022-09-23 16:13:26 +02:00
Jordon Leach 5497ee1323
Fix cpu/memory usage calc for eks nodes from norman (#6915) 2022-09-22 08:45:23 -04:00
Richard Cox 9ff599144d Fix the url used to fetch the embedded harvester plugin
- supports legacy harvester cluster use case where it does not have it's own plugin
2022-09-20 12:29:41 +01:00
wujun c413322de5 fix pkgName 2022-09-18 14:36:38 +08:00
Jordon Leach 172bb2b0b9
Add warning banner for zero desired nodes in eks (#6850)
* Add warning banner for eks desired node groups

* Fix desired node group warning to filter for all node groups
2022-09-14 13:37:26 -04:00
Jordon Leach d2d7f12e9c
Add check for 403 to project creation action (#6877) 2022-09-14 08:12:56 -04:00
Richard Cox 7ecfe879c0 Merge remote-tracking branch 'upstream/master' into test-pluginize-rc-2 2022-09-09 13:19:15 +01:00
Richard Cox ad950c9d70 Fixes following review
- Don't use `harverster/findAll` in harvester machine config
- Fixed access for `SETTING.UI_DASHBOARD_HARVESTER_LEGACY_PLUGIN`
2022-09-09 11:34:14 +01:00
Richard Cox 6692fdda5f Fixes for plugin embedded in dashboard
- also additional logging
2022-09-08 15:56:13 +01:00
Richard Cox 384e6314b6 Remove /:product route from harvester plugin
- this will never be used, as we'll always need a cluster in the route to fetch the plugin from
- additionally 2 people have hit errors where this caused /home to fail
2022-09-08 13:32:20 +01:00
Richard Cox c3f64ef97f Updates to harv plugin location
- wire in setting for legacy clusters using a remote plugin
- add an override for all
2022-09-07 14:34:37 +01:00
wujun 100acf614d
Fixed error namespace router (#6809) 2022-09-06 18:28:09 -07:00
Richard Cox 5572b05380 Merge remote-tracking branch 'upstream/master' into test-pluginize-rc-2 2022-09-06 16:50:50 +01:00
Richard Cox d02b614a5c Allow plugins to supply their own fall back model loader
- if a plugin doesn't override/have a model we fall back on model-loader-require
- by default this is blank (to avoid importing all shell models for all plugins)
- for harvester it's so closely tied by both standard resources and resources in
  management/rancher stores  that it's hard to manually supply all that we
  should just load them anyway
2022-09-06 16:45:32 +01:00
Richard Cox 1b0344d93b Update dynamic plugin loader 2022-09-05 17:13:25 +01:00
Shavindra 35c51c7f47
Improve workload screens - #6455 (#6632)
* Make container tabs horizontal.

* Update cronjobs, DaemonSets, Jobs, StatefulSets to use same Workload component.

* Fix 6755 - Wrong sidecar config edit not shown in UI.

* Set Persistent Volume claim capacity as required.
2022-09-02 18:12:31 +02:00
Richard Cox 7cc904b28c tidying up some more 2022-09-01 19:54:16 +01:00
Richard Cox 092b4d6c79 tidying up a tad 2022-09-01 19:29:23 +01:00
Richard Cox 601dd0ff22 Merge remote-tracking branch 'upstream/master' into test-pluginize-rc-2 2022-09-01 19:15:07 +01:00
Richard Cox 43d338fac2
Harvester Plugin (#6729)
* routing maybe

* remove nested edit views

* harvester custom routes

* fix loading imported dev cluster

* move harvester-manager hci.cluster type out of harvester pkg

* fixes for build-pkg

* fix harvester custom dialogs

* fix harvester pkg routing

* generateDynamicTypeImport hyphenated dirs

rename cloud_credential and machine_config back to cloud-credential and machine-config

* Appease linting

* Fix epinio pkg build
- Includes fixes for some dashboard component references

* Revert "Receiver credential secrets are deleted when secret is set to none"

This reverts commit 836460e2998959bcda0b14a9f6511f248980b7b5.

* Fix plugin modal cancel button in dark mode

* Ensure correct components loaded when a new version of a plugin is loaded
- The route matcher was never updated with new route-->component values
- This was due to `this.router.options.routes` not containing the result of `router.add`
- See https://github.com/vuejs/vue-router/issues/2280

* Revert "Revert "Receiver credential secrets are deleted when secret is set to none""

This reverts commit e524bb3d40ea7adfe35c38ec7870560625965d25.

* fix harvester manager->harvester routing

* rename dialogs

* move harvester-manager files out of harvester pkg

* Revert "remove nested edit views"

This reverts commit e835835943d63e74c50942884fec3706f8703047.

* plugin validators dynamic import - not working

* fix merge conflict

* fix harvester members

* fix conflict

* custom validators

* harvester table formatters

* members routing

* import path fixes

* harvester mutli load

* Port across tweaks made during dynamic plugin work
- harvester plugin can be bundled with the dashboard until dynamic work has been completed
- Nav directly to virt cluster dashboard instead of via /harvester-c-cluster
- Fix missing bottom border on virt cluster list, hide actions (as they're never populated)

* move config/settings and config/harvester-map

fix hci setting custom components

* fix harvester setting import path

* Move over SerialConsole and Novnc, remove harvester.notifications
- These components were so 1-1 with harvester in the end i moved them over
- Also removed the like-for-like generic.notification `harvester.notification` strings

* Remove isSingleVirtualCluster, most of isMultiVirtualCluster

* Fix two nav issues
- harv cluster members --> prefs --> click on-screen back
- dashboard --> prefs --> click on-screen back

Both of these would be better fixed by an incoming change to the default layout (don't show old content before switching page)

* Fix reload of project/namespace page

* Split out project namespace into it's own component (1 or 2)

* Split out project namespace into it's own component (2 or 2)

* use product hideSystemResources opt instead of isVirtual/product===virtual

* fix missing prop in header

* Move FilterLabel and CloudInitType to harv pkg + two other references

* Move Harvester Upgrade components to harv pkg
- Needs a review with Neil regarding generics

* rebase build+load not working

* fix harvester route in authenticated

* Experimental Changes

* Fix merge conflicts

* WIP Fix routing
- includes project/namespace and namespace pages

* Tidying up

* Move harvester core store to plugin, remove harvester code from authenticated flow
- harvester store is a steve store that now lives in the plugin
- harvester `loadVirtual` replaced with a shortened `loadCluster` in it's own store
- Also fix xterm css import

* Fix three routing related bugs
- Fix project/namespace create/edit/cancel/done flows
- Update harvester's loadCluster to better match loadCluster
- Make edit namespace page project resource agnostic

* Build fixes

* Fix create namespace button and other tweaks

* fix two issues with nav out of imported harvester cluster

* Fix alignment of action menu button
- Used in many places
  - all generic table action menus
  - global settings --> settings
  - rke1 cluster detail page machine pool group actions
  - project/namespace list project group actions
  - resource detail page action menu

* Revert changes to app and pkg creators
- This should fix `check-plugins-build` gate
- It does hide the underlying issue, but that won't have been brought in by this PR?

Co-authored-by: Nancy Butler <42977925+mantis-toboggan-md@users.noreply.github.com>
2022-09-01 08:57:05 -07:00
Richard Cox 1a680cf15f Fix load, added some TODOs 2022-09-01 15:44:45 +01:00
Richard Cox b3f13843dd Merge remote-tracking branch 'origin/harvester-plugin-rebased' into test-pluginize-rc-2 2022-09-01 13:57:18 +01:00
Jordon Leach dc2b98c4ed
Null chaining for currentCluster (#6782) 2022-09-01 08:14:54 -04:00
Richard Cox 8dde5bf3f2 Merge remote-tracking branch 'upstream/master' into harvester-plugin-rebased 2022-09-01 11:00:39 +01:00
Jordon Leach c0b225fef1
Restore builtin role actions - disable rules for builtin roles (#6776) 2022-08-31 08:10:23 -04:00
Richard Cox a7e07a540e Fix three routing related bugs
- Fix project/namespace create/edit/cancel/done flows
- Update harvester's loadCluster to better match loadCluster
- Make edit namespace page project resource agnostic
2022-08-25 16:57:04 +01:00
Richard Cox 4b1e0b427f Tidying up 2022-08-24 18:16:34 +01:00
Richard Cox 506edbb5a4 WIP Fix routing
- includes project/namespace and namespace pages
2022-08-24 14:57:21 +01:00
Neil MacDougall 06ef0fad78
Fix for 'Descriptio' field for Rancher roles not editable or 'viewable' (#6676) 2022-08-23 09:07:03 +01:00
Neil MacDougall 42a98b0adc
Show if there is an updated RKE Template available for a cluster (#6671)
* Add notification if update to an RKE template is available

* Add template name and upgrade info to cluster detail page
2022-08-22 15:58:09 +01:00
Richard Cox aed0a0b73d
Merge pull request #6642 from richard-cox/fix-local-nodes
Ensure local cluster kube node's can determine their cluster id
2022-08-22 10:49:11 +01:00
Richard Cox da6467d751 Fix reload of project/namespace page 2022-08-19 12:31:14 -07:00
Richard Cox 78cb3ae645 Port across tweaks made during dynamic plugin work
- harvester plugin can be bundled with the dashboard until dynamic work has been completed
- Nav directly to virt cluster dashboard instead of via /harvester-c-cluster
- Fix missing bottom border on virt cluster list, hide actions (as they're never populated)
2022-08-19 12:30:47 -07:00
Nancy Butler 770bc21e50 members routing 2022-08-19 12:29:52 -07:00
Nancy Butler 91effe56f5 rename dialogs 2022-08-19 12:22:13 -07:00
Richard Cox 257e579c6a Fix epinio pkg build
- Includes fixes for some dashboard component references
2022-08-19 12:21:24 -07:00
Nancy Butler e18bf6598e fixes for build-pkg 2022-08-19 12:21:24 -07:00
Nancy Butler a88ea801c9 routing maybe 2022-08-19 12:18:48 -07:00
Richard Cox ebea574766 Fix plugins 2022-08-19 09:46:40 +01:00
Neil MacDougall 5465b7d72c
Fix service shows pods from other namespaces (#6685) 2022-08-19 09:46:17 +01:00
Neil MacDougall e1c62c56aa
Add feedback that kube config has been copied to clipboard (#6693) 2022-08-19 09:46:03 +01:00
Richard Cox fc8395b67f Ensure local cluster kube node's can determine their cluster id
- We determine the cluster id via the node's `self` link
- Normally this is something like `k8s/clusters/c-m-274kcrc4/v1/nodes/nodeid`
  However for the local cluster this is only v1/nodes/nodeid`
- This meant that for local cluster nodes it's norman and mgmt nodes were unavailable
- From what i can this only affected it's ability to
  - determine it's role (though this had a working fallback)
  - determine if some actions were shown (and also execute them)
2022-08-19 09:46:00 +01:00
Catherine Luse c933a9ac73
Merge pull request #6529 from catherineluse/project-permission
Remove unneeded API call to get projects from local cluster
2022-08-03 08:08:49 -07:00
Catherine Luse 53d72ac54a Refactor namespace caching and filtering 2022-08-03 03:21:57 -07:00
pajuga 060de9f8b5 pnap cloud provider implementation 2022-08-02 01:03:42 +00:00
Catherine Luse 6f2d62824c Remove unneeded API call to get projects from local cluster 2022-07-27 14:53:56 -07:00
wujun 7f7bea94a7 HARVESTER: delete displayName RFC1123 validations 2022-07-27 16:15:57 +08:00
wujun 216cbd64c1 HARVESTER: validate image displayName 2022-07-26 22:58:48 +08:00
wujun 3a98d63a19 HARVESTER: fix image clone miss label 2022-07-26 22:58:42 +08:00
Catherine Luse c907821868
Merge pull request #6468 from catherineluse/rbac-namespaces
Hide auto-created RBAC namespaces
2022-07-25 11:07:10 -07:00
Catherine Luse 9f3fe043de Throw error if PSP template action error status is not 409 2022-07-25 08:54:50 -07:00
Catherine Luse c311b041af
Merge pull request #6416 from catherineluse/project-creation-error
Retry project creation after 409 error
2022-07-25 08:24:43 -07:00
Catherine Luse ce368ae686 Hide auto-created RBAC namespaces 2022-07-23 16:09:48 -07:00
Nancy 6759fe5d95
Merge pull request #6461 from mantis-toboggan-md/bugfix-namedisplay-error
fix roletemplatebinding models
2022-07-22 16:12:12 -07:00
Catherine Luse 84112efb05 Retry project creation after 409 error 2022-07-22 15:15:05 -07:00
Neil MacDougall dc1ccc3c6d
Performance: Cache pods by namespace (#6388)
* Performance: Cache pods by namespace

* Fix lint issues

* Address PR feedback
2022-07-22 22:53:28 +01:00
Nancy Butler 7500239360 fix roletemplatebinding models 2022-07-22 09:38:27 -07:00
Catherine Luse 1be9916aa7
Merge pull request #6396 from catherineluse/clusters
Only label imported clusters as imported
2022-07-21 15:42:36 -07:00
Jordon Leach a20902ab93
Edit actions for builtin roletemplates and global roles (#6429)
* Edit actions for builtin roletemplates and global roles

* PR changes
2022-07-21 13:42:30 -04:00
Sean-McQ 007dfe66cf
Merge pull request #6420 from Sean-McQ/fix/prometheusrule/form-validation/5820
Add in form validation to prometheus rule. Fix model validation error.
2022-07-21 13:42:15 -04:00
Sean 257f0a9de4 Add in form validation to prometheus rule. Fix model validation error. 2022-07-21 08:28:39 -04:00
Nancy 7618bb5fb8
Merge pull request #6398 from n313893254/pr
HARVESTER: Fixes v1.0.3 issues
2022-07-20 13:19:03 -07:00
Neil MacDougall 8f7dcef5d5
Ensure that we show empty machine pools (#6425)
* Ensure that we show empty machine pools

* Fix two bugs
- empty pool message would show twice in a single pool when there were two empty pools (missing id meant fake machines were all grouped together)
- ensure detail page for rke1 clusters show

Co-authored-by: Richard Cox <richard.cox@suse.com>
2022-07-20 18:32:47 +01:00
Neil MacDougall 8907c6a1d3
Project delete namespaces (#6279)
* custom promptremove component for project and namespace remove

* Fix lin t

* Two tweaks
- Align
  - createnamespace button with ns age column
  - project action button with ns action button column
- Require confirmation to delete a project to match deleting a namespace

* Address PR feedback

Co-authored-by: Neill Somerville <neill.somerville@gmail.com>
Co-authored-by: Richard Cox <richard.cox@suse.com>
2022-07-20 16:16:52 +01:00
Richard Cox 15a84b5776
Merge pull request #6397 from n313893254/cluster
HARVESTER: Fix Harvester clusters have no actions
2022-07-19 17:09:32 +01:00
n313893254 09b873fbd1 HARVESTER: Fix Harvester clusters have no actions 2022-07-19 20:16:33 +08:00
Bastian Hofmann d09778be40
Add ingressClassName field to ingress form and ingress list (#6340)
* Add ingressClassName field to ingress form and ingress list

Addresses https://github.com/rancher/dashboard/issues/6339

* Move ingressClass to details section on ingress detail page

Signed-off-by: Bastian Hofmann <bashofmann@gmail.com>
2022-07-19 10:57:06 +01:00
n313893254 5d3d781406 HARVESTER: Cluster member and cluster owner see inconsistent statistics
(cherry picked from commit f6e2b8f6a8db0a458e64a6d5ed97a8542fe11997)
2022-07-19 15:46:03 +08:00
Catherine Luse 9427509f1a Only label imported clusters as imported 2022-07-18 21:00:56 -07:00
Jordon Leach 8a09180184
Add registration tab to imported aks or eks clusters (#6226)
* Add registration tab to imported aks or eks clusters

* Add ready state check for eks and aks registration tabs
2022-07-18 11:09:21 -04:00
Alexandre Alves 92c81e6d14
provide interface to edit node name (custom name) for RKE1 nodes (#6367)
* provide interface to edit node name for RKE1 nodes

* prevent cluster member to go to edit because they don't have the correct permissions

* Switch to using standard done routing
- to support normal cancel/submit routing there's a number of 'done' style props/methods
- normally these are straight forward, in this case though we go back to the detail location of a different resource
- this should have worked already for cancel (doneOverride) but there was a regression
- to get this working for submit the `done()` was added which works with the components doneLocationOverride
- there's some tech debt in master atm, model doneOverride should be renamed. component doneLocationOverride should move to the model.
  Addressing this though would be troublesome though

Co-authored-by: Alexandre Alves <aalves@Alexandres-MBP.lan>
Co-authored-by: Richard Cox <richard.cox@suse.com>
2022-07-15 18:50:46 +01:00
wujun ce8b92f048 HARVESTER: fix poweroff vm state 2022-07-15 09:16:08 -07:00
wujun c79e7d5792 HARVESTER: vm state enhancement 2022-07-15 09:15:53 -07:00
Nancy Butler 84dfff0ea8 websocket disconnect growl
websocket reconnect close growl

rm redundant websocket console error
2022-07-15 09:15:52 -07:00
Richard Cox 540581436b Revert "Display node IPs in cluster management list view. (#6320)"
This reverts commit aec4949b4f.
2022-07-15 10:15:38 +01:00
Catherine Luse 53674c0f9d
Merge pull request #6365 from catherineluse/namespaces
Project/namespace list updates when project is added or removed
2022-07-14 07:22:13 -07:00
Richard Cox 22e4d3479f WIP build process changes & comment tidy up 2022-07-14 14:00:55 +01:00
Shavindra aec4949b4f
Display node IPs in cluster management list view. (#6320) 2022-07-14 10:40:01 +01:00
Catherine Luse 506b587f9b Project/namespace list updates when project is added or removed 2022-07-13 17:57:00 -07:00
Richard Cox f6e9658eed Fix reload of project/namespace page 2022-07-13 18:32:31 +01:00
Richard Cox 3beacf3ff1 Changes required to support switching between harv clusters - Totally remove old plugins before starting to load a new one - Forget routes associated with removed plugins (to confirm with replaced 2022-07-13 18:32:26 +01:00
Richard Cox d451c96fe4 Harvester cluster list fixes - Don't force subrows in harv cluster list - this fixes the bottom border for rows without status's - There's no actions, so hide checkbox and action columns - Also removes some harvester specific code in non-harvester world 2022-07-13 18:31:07 +01:00
Richard Cox 412f93bf53 Fix case where the plugin is built in - also fixed some linting 2022-07-13 18:30:49 +01:00
Richard Cox a819cf28f4 Fixed routing issue See description in default layout - If the cluster changes hide page content until we've reach the new page location - This resolves issues where the old page's content were showing (and in harv case throwing errors) when the cluster is changed and we haven't reached the new page yet Also - Fixed some error messages in home page given `Header` requirements - Fixed bad routes (like junk resource) when viewing plugin pages 2022-07-13 18:30:44 +01:00
Richard Cox 3e3568e1ca Fix refresh in strange cases. Redirect correctly 2022-07-13 18:30:39 +01:00
Richard Cox 298af542a5 Updates required to prove out loaded from external harvester - Start of failover / new tab 2022-07-13 18:30:35 +01:00
Richard Cox fe2cf50677 Multiple fixes - bring back click to go to cluster (covers case where cluster A pkg is loaded when going to cluster B pkg) - fix refresh - improve routing for cluster and virt cluster managers - improve loading of virt cluster list - add code to determine pkg version and url 2022-07-13 18:30:32 +01:00
Richard Cox 48b93be60a Allow plugin managers to claim routes that are associated with plugins yet to be loaded 2022-07-13 18:30:28 +01:00
Richard Cox 8377fbc69d Click on harvester link to load plugin (currently skipped) - Also update harvester package info (and fix plugin metadata) 2022-07-13 18:30:15 +01:00
Neil MacDougall 5bca2ca529
Fix cluster pod count on home page (#6358) 2022-07-13 17:34:11 +01:00
Nancy Butler 4a8a11a12c members routing 2022-07-12 18:40:17 -07:00
Nancy Butler 10c1accdc0 rename dialogs 2022-07-12 10:59:34 -07:00
Richard Cox bee5f86c2c Fix epinio pkg build
- Includes fixes for some dashboard component references
2022-07-12 10:59:34 -07:00
Nancy Butler 9f37ab0e77 fixes for build-pkg 2022-07-12 10:59:33 -07:00
Nancy Butler 4dfeb7c291 routing maybe 2022-07-12 10:59:32 -07:00
Neil MacDougall 886238dea0
Errors are not displaying when standard user attempts to create a project with non-default Pod Security Policy (#6278) 2022-07-08 17:40:20 +01:00
Neil MacDougall a73003018e
Fix snapshot location for rke1 clusters being empty (#6303)
* Fix snapshot location for rke1 clusters being empty

* Fix lint issues
2022-07-08 17:39:10 +01:00
yuzeng 327a9d2c20 Harvester: Fix missing liveMigrate 2022-07-08 18:34:50 +08:00
n313893254 127cf264e3 HARVESTER: Fix edit host system labels 2022-07-08 18:34:50 +08:00
wujun 4ed001967a HARVESTER: fix clone issue 2022-07-08 18:34:50 +08:00