Commit Graph

317 Commits

Author SHA1 Message Date
Bastian Hofmann 3c955e6f52
Improve OPA Gatekeeper constraint detail page (#8586)
This adds the following functionality to the violations list on the OPA Gatekeeper constraint detail page:

* Add a namespace column to the violations
* Make the violations list searchable
* Allow to download the violations as a CSV, similar to CIS scanner violations

Signed-off-by: Bastian Hofmann <mail@bastianhofmann.de>
2023-04-27 09:27:37 +01:00
Richard Cox 0bba39e62c
Merge pull request #8158 from richard-cox/pods-in-workload-list
Include oprhaned `POD`s in Workload list
2023-04-21 13:59:38 +01:00
Shavindra 54e084f8fd
Fix clusterrolebindings (#8330)
* Fix ClusterRoleBindings listing.
* Update cluster members list view.
* Fix RBAC project users.
* Add role-binding icon.
2023-04-14 09:47:45 +01:00
Shavindra 6f8e6282ff
Disable Fleet workspace change for RKE2 clusters. (#8479)
* Disable Fleet workspace change for RKE2 clusters.
2023-03-27 08:37:13 +01:00
Alexandre Alves 9b23c52674
add check to resourceMethods prop so that UI doesnt fail when clusterTemplatesSchema is empty (#8414)
Co-authored-by: Alexandre Alves <aalves@Alexandres-MacBook-Pro.local>
2023-03-14 09:01:28 +00:00
Alexandre Alves c44fa6088c
statefulsets pods list bug (#8268)
* change condition to check if buttons for scale up/scale down deployment are enabled

* revert changes

* fix error handling

* address PR comments

* fix incorrect pods list issue on statefulsets detail view

* address PR comments

---------

Co-authored-by: Alexandre Alves <aalves@Alexandres-MBP.lan>
Co-authored-by: Alexandre Alves <aalves@Alexandres-MacBook-Pro.local>
2023-03-10 15:32:03 +00:00
Neil MacDougall 2859ad0214
Fix OPA Gatekeeper constraint inconsistencies (#7979) 2023-03-09 21:24:36 +00:00
Neil MacDougall e231e09c5a
Fix mismatching tab name when ssh'ing into a node (#7914) 2023-03-08 22:08:16 +00:00
Richard Cox e3e72aef90 Fix edit of PSACT description
- Use `SteveDescriptionModel` as base of PodSecurityAdmissionTemplate model
- Provide a generic mechanism for model save to tweak the object that's saved
- In SteveDescriptionModel ensure the object that's saved has the correct description
  - Save worked for other users of class ... as they saved via norman rather than steve

Tweaks
- Removed duplicate PSACT definition
- Fixed width of PSACT table name / description columns
2023-03-08 13:29:57 +00:00
Giuseppe Leo f081940a41
Add a warning alert when migrating to 1.25 if they have PSPs. (#8246)
* Prevent to display PSP related banners if no PSP active

* Add custom API request for PSP

* Prevent PSP check on cluster creation

* Add PSPS type

* Correc PSP deprecation message on upgrade, to mention automatic removal

* Correct banner loading and exclude generic message

* Prevent check of PSP if the cluster is reconciling

* Remove deprecated logic about PSP templates check

* Restrict invalid PSP check only on k8s upgrade
2023-02-28 17:55:48 +01:00
LiuYan 22d15cfae9
fix(constraints.gatekeeper.sh.constraint): fix resourceVersion not updated issue (#8285) 2023-02-28 10:50:41 +00:00
Qingyang Nong 680fa15ec4
HARVESTER: Fix Harvester add member error (#8252) 2023-02-24 10:09:14 +00:00
Qingyang Nong 7bea57604c
HARVESTER: Fix Harvester v1.1.1 cluster members page is unavailable (#8244) 2023-02-23 10:58:03 -07:00
Shavindra e12939115e
Allow basic fleet user to manage fleet without cluster permissions. (#7446)
* Allow basic fleet user to manage fleet without cluster permissions.

* Handle no workspaces.

* Add Fleet bundle namespace mapping - fleet.cattle.io.bundlenamespacemapping

* Add git repo restrictions.

* Handle auth errors for checkSchemasForFindAllHash.

* Fix workspace switcher and handle fleetworkspaces 401 issues.

* Update workspace switcher.

* Fix Gitrepo restriction creation from the Workspace create

* Disable workspace creation
* Fix workspace loading after creation

* Fix Bundle creation error.

* Remove redudant FLEET.TOKEN request.
2023-02-23 14:15:32 +00:00
Richard Cox 95fdf80dcb
Merge pull request #8224 from richard-cox/stale-management-resources
Fix stale management cluster resources
2023-02-23 11:58:24 +00:00
Shavindra d7e5dc50c4
[2.7.2] Handle nodeGroups undefined for imported EKS cluster (#8196)
* Handle nodeGroups undefined for manually imported RKE cluster.

* Forward part changes from #8222

---------

Co-authored-by: Neil MacDougall <nmacdougall@suse.com>
2023-02-22 15:41:12 +00:00
Richard Cox 90ccf3f7e1 Fix issue where editing number of machine pools can cause dev white page errors 2023-02-21 16:59:58 +00:00
Giuseppe Leo 78d32471d1
When creating a PSACT value as YAML, you are not redirected back to the Pod Security Admissions tab (#8190)
* Add location redirection to the model configuration

* Add routing method to the CruResource editor containing Yaml editor as well
2023-02-20 10:36:41 +01:00
Qingyang Nong b547ba97a4
HARVESTER: Fix kubernetesVersionExtension is '' on the create Harvester storage class page (#8169)
* HARVESTER: Fix kubernetesVersionExtension is ''

* fix typo in kubernetesVersionExtension regex

---------

Co-authored-by: Nancy Butler <42977925+mantis-toboggan-md@users.noreply.github.com>
2023-02-15 14:15:49 -07:00
Shavindra 7d657c58ba
Show node labels on cluster node list view. (#7312)
* Show node labels on cluster node list view.
* Display min number by default.
2023-02-14 16:23:47 +00:00
Richard Cox 6b242c17e8 Include oprhaned PODs in Workload list
- Fixes https://github.com/rancher/dashboard/issues/7506
- Show pods that aren't owned by another workload in the workload list
- Allow the user to create PODS from the workload list
2023-02-13 17:06:48 +00:00
Qingyang Nong 83d0f8dd9c
HARVESTER: Fix Cannot edit Harvester namespace (#8127) 2023-02-10 11:11:03 -07:00
Alexandre Alves 0e33fd4c13
getting elemental changes on cluster provisioning back to rancher dashboard (#7543)
* getting elemental changes on cluster provisioning back to rancher dashboard

* code cleanup

* apiversion created from machineCconfig schema attributes

* add machine-config loader to load it from an extension

* fix issue where elemental cluster details could not be displayed + minor changes and fixes

* fix bug where elemental infrastructureRef.name for elemental start with nc- and therefore was generating a fake machine when it shouldnt + cleanup prov cluster model

* prevent code change

* getting k8s file back up to master state to avoid complex merge conflicts

* getting k8s file back up to master state to avoid complex merge conflicts

* applying changes to cluster.x-k8s.io.machinedeployment

* Address PR feedback

---------

Co-authored-by: Alexandre Alves <aalves@Alexandres-MBP.lan>
Co-authored-by: Alexandre Alves <aalves@Alexandres-MacBook-Pro.local>
Co-authored-by: Neil MacDougall <nmacdougall@suse.com>
2023-01-27 16:12:47 +00:00
Giuseppe Leo 0768d82f16
PSA minor changes (#8022)
* Add missing and correct i18n PSA labels

* Correct description size by removing helper

* Add title to Namespace list tooltip if any PSA

* Allow to disable use of checkbox for PSA form

* Change timeout for growl to 5s on Pod warning due PSA

* Add type label for PSA

* Move PSA menu under Advanced

* Replace toggling system label with extending the value within the same

* Emit initial PSA form values con creation if no checkboxes due lack of interactions
2023-01-25 14:02:26 +01:00
Giuseppe Leo 942c0442b9
Feature/6633 min password again (#7930)
* Change key for min password due inconsistency with the server value

* Allow to edit env var in settings model

* Allow to pass simple validators in the global settings editor

* Add validation for integer values on global settings password

* Add integer validation

* Add simple validators tests

* Allow integer validation to allow strings from inputs

* Simplify function and extend naming for settings rules

* Add further validations for the min password setting

* Replace logic with regular expression
2023-01-23 17:56:55 +01:00
Giuseppe Leo a571677fde
Feature/7875 workload edit warning (#7918)
* Allow to process the response of the request from the resource method

* Parse header response on Pod creation and display warning if any
2023-01-20 17:07:06 +01:00
Giuseppe Leo 8497f587d7
Add PSA custom resource in Cluster Manager (#7678)
* Add PSA resource model, edit, list, types, config, utils and navigation

* Remove controls sorting from config file in PSA form due unnecessary added logic

* Add missing type to exemptions

* Remove component specific grid alignment styling

* Add meaningful values on PSA form tests

* Add prefix for the namespace PSA form

* Correct PSA form test

* Revert RKE cluster erroneous changes

* Rename all the PSA form values to match specification and avoid issues

* Create function to convert array to dictionary

* Add types and replace function with utility in PSA form

* Trim exemptions values for PSA form

* Correct util test and function

* Enable YAML editor for PSA resource
2023-01-20 16:26:43 +01:00
Qingyang Nong 884af1635d
HARVESTER: Storage Tiering support of the Harvester CSI Driver (#7869) 2023-01-19 12:53:47 -07:00
richa eeb8fa1d86
Added scale down promt confirmation on RKE clusters (#7926)
* Added scale down promt confirmation on RKE clusters

* Removed extra test code

* Modify toggleScaleDownModal function

* Added promt to RKE cluster
2023-01-19 13:34:16 +01:00
Catherine Luse dcc4a73e49 Allow more retries to finish project creation 2023-01-13 18:04:32 -07:00
Sean-McQ ca1b810c7b
Moves sockets into the advanced worker (#7760)
* Moves sockets into the advanced worker

* worker can die peacefully now, making switching between cluster work.

* Make waitFor generic, wire in to waitForTestFn

* General Changes
- Fixes for switching cluster
  - includes using common getPerformanceSetting
  - avoid new code to unsub before socket disconnect
- handle `watch` `stop` requests
- lots of TODO's (questions, work, checks, test, etc)
- use common

* Switch socket fixes
- isAdvancedWorker should only be true for cluster store
- advancedWorker to be wired in

* Fix socket id for cluster workers
- sockets use an incremented local var for id
- when we nuke the socket file within the worker this resets, so they all ahve id of 1
- work around this by applying the unix time

* Fix handling of new partical counts response
- seen in dex cluster explorer dashboard
- count cards would be removed when partial counts response received

* Make resourceWatcher the sole location for watch state
- getters canWatch, watchStarted now are worked around (they look at state in the UI thread)
  - we now don't call resource.stop or restart.start in subscription
- tidied up `forgetType`
- moved clearFromQueue from steve mutations into subscription mutations (better location)
- added and removed some TODOs
- fixed watch (stop handler should be higher up, include force watch handling)

* pushes the csrf value into worker and adds it to fetch request headers.

* refactors batchChanges to address ref concerns and be more performant

* Maintain schema reference whilst updating
- This change mutates input in a function, which is bad...
- but ensures the reference isn't broken, which is needed to maintain similar functionality as before

* Fix waitForTestFn
- Seen when creating or viewing clusters

* On unwatch ensure any pending watch requests are removed from the queue
- the probably would have been a problem if the worker wasn't nuked
- however as the codes there lets make it safe

Also added `trace` feature in advanced worker, will probably bring out to other places as well

* Fix navigation from cluster manager world to any cluster
- Ensure that we handle the case where the advanced worker was created but the resource watcher wasn't
- ... but fix case where this was happening (aka ensure that a blank cluster context is ignored)

* Tidy some TODOs

* Add perf settings page
- This will help test normal flow (when advanced worker is disabled)
- Note - setting is now in a bag. This may help us better support further settings (enable client side pagination, etc)
  ```
  advancedWorker: { enabled: false },
  ```

* FIX - Nav from cluster dashboard --> specific event --> cluster dashboard and events not re-subbed
- Ensure we block default handling of resource.start (keep state in resource watcher)

* Tidying up some TODOs

* Adds in a cache and uses it to validate SCHEMA messages before batching.

* Forgot to actually save CSRF to the resourceWatcher when instantiated.

* an empty resource in a batchChange to signal remove

* Move addSchemaIndexFields to and created removeSchemaIndexFields in new file
- this avoids bringing class files into the worker

* Fix disconnect/reconnect
- Remove `syncWatch` (do the watch/unwatch straight away)
- Test/Fix re-sub on reconnect
- Test/Fix growls on disconnect

* Tidying up some TODO's
- including clean of workerQueue on resource.stop (this is SUPER defensive)

* batchChanges will now handle aliases

* Fix pods list - WIP
- ensure podsByNamespace is updated on batchChange

TODO
- the final update to the pod is ignored
- removing a namespace cleans the cache correctly
- disabling advanced worker still works

* Fix pods list - fixes
- ensure podsByNamespace is updated on batchChange

Tested / Fixed
- the final update to the pod is ignored
- removing a namespace cleans the cache correctly
- disabling advanced worker still works

* Tidying TODOs

* Remove default same-origin header
- https://developer.mozilla.org/en-US/docs/Web/API/Request/credentials

* Fixed TODO description

* Refactor subscribe, make it clear which vuex feature relates to what

* Lots of Fixes
- batchChanges fixes
  - fix index is 0 issues (!/!!index)
  - only `set` if we have to
  - ensure we set the correct index after pushing to list
  - ensure map is updated after reducing list size with limit
- podsByNamespace fixes
  - ensure when ew replace... we don't use the same referenced object
- general service resource fixes
  - ensure service's pods list stays up to date with store

* Multiple improvements/fixes
- resourceCache - store the hash instead of the whole object. This means longer load time be reduces memory footprint
- resourceWatcher
  - don't re-sub on socket reconnect if watcher is in error
  - don't sub if watcher is in error
  - don't unwatch for 'failed to find schema' and 'too old' errors
    - this clears the error, we won't to keep it to ensure we don't watch
- Remove #5997 comments, follow on work #7917

* toggle debug, remap alias types, cleaned up comments and console

* Unit tests for batchChanges
Much more scope for some crazy content

* Logging tweaks
- disable logging by default
- initWorker comes in too late to affect initial trace, so just rely on the `debug` to toggle at runtime

Co-authored-by: Richard Cox <richard.cox@suse.com>
2023-01-13 16:03:00 -05:00
Qingyang Nong 17f784ccf0
HARVESTER: Add hideNamespaceLocation for product config (#7702) 2023-01-13 08:42:23 -07:00
Neil MacDougall 4ccb724b53
Fix description not working for user resources (#7885) 2023-01-13 13:09:33 +00:00
Francesco Torchia 441722ab8c
Events tab
- define header
- set "Last Seen" column as default sort

Signed-off-by: Francesco Torchia <francesco.torchia@suse.com>
2023-01-12 16:53:42 +01:00
Richard Cox d72e78be10
Merge pull request #6569 from PNAP/master
pnap machine driver implementation
2023-01-12 10:10:02 +00:00
richa b89bcb595f
Prompt node pool (#7772)
* Added prompt in machinedeployment

* Save users promptConfirmation in cookies

* Changed pormpt size

* Added comments to the code, replace mounted function with create

* Fixed review comments

* Removed cookies added scale pool promt variable in prefs file

* Corrected pref variable name format and update comments

* Added confirmation prompt option in pref page
2023-01-11 15:51:47 +01:00
Nancy Butler 53774ce38c move harvester-mgr stuff 2023-01-09 10:48:42 -07:00
Giuseppe Leo 3e31e9f138
Add support for Pod Security Admission in the Namespace resource (#7619)
* Create models, config and utils for PSA

* Create PSA tab form view

* Create custom labels for Namespace

* Add icon option for Namespace detail view

* Add icon for Namespace list

* Add PSA tab for Namespace edit view

* Add i18n for all the PSA parts

* Separate PSA labels between mode and versions

* Filter DetailTop Namespace labels from PSA versions

* Correct unit test

* Correct Namespace tooltips for details, to be created after fetching the resources

* Remove unnecessary model

* Add todo for PSA implementation

* Add TODO for tests with checkbox and select

* Correct namespace list link with model method

* Add TODO

* Move i18n key for PSA

* Align Namespace detail view chips icon to the top

* Restore labels and annotation to the Namespace view

* Merge LabelsPSA features to existing Labels component

* Move all the PSA logic from the view to the model

* Tweaks following review

DetailTop
- Remove PSA specific code from generic component

ResourceDetail
- Remove PSA specific code from generic component
- Remove plumbing for descriptions and icons from parent component to DetailTop

Labels&Annotations component
- Default `show system labels` to off
- Ensure size of `Labels` and `Annotations` titles are the same
- Improve padding
- Remove PSA specific code from generic component
- Removed un-needed margin-bottom

Project/Namespace List
- Improve padlock icon alignment
- Improve spacing around PSA list in tooltip (this will pop up often)

PodSecurtyAdmission settings component
- Improved alignment on PSA checkbox

General Improvements
- Always show Labels&Annotations on Namespace config (view) page

* Changes following testing
- Fix display of show/hide system labels when there are no system labels
- Ensure PSA order shown in project/namespaces list PSA tooltip matches PSA controls in Namespace edit/config page
- Remove two usages of lodash
  - pickBy --> new common pickBy
  - values --> Object.values

* Fix unit tests

Co-authored-by: Richard Cox <richard.cox@suse.com>
2023-01-06 16:01:40 +01:00
huacheng 65c1428842 Fix rollback failure when deploying Deployment through yaml 2022-12-27 15:46:40 +08:00
Neil MacDougall 2dadea1690
Allow kubeconfig to be downloaded/copied when cluster is not ready (#7552) 2022-12-19 22:45:35 +00:00
Catherine Luse b41d734054
Merge pull request #6688 from bashofmann/logging-flow-match-namespaces
Add additional namespaces match field to logging ClusterFlow page
2022-12-16 18:19:58 -07:00
Nancy dd139d1f4f
add a project membership list view (#7437)
* add project roles to cluster member list view
2022-12-16 14:20:33 -07:00
wujun eb2fccdc86
show loading icon (#7715) 2022-12-16 12:18:31 -07:00
Francesco Torchia 2181f3fdd9
Merge pull request #7711 from torchiaf/fix/6899-2
duration field live refresh
2022-12-16 20:14:06 +01:00
Neil MacDougall 8bfd62dc1e
Fix global role description (#7738)
* Fix issue with project name not editable

* Fix global role description
2022-12-16 17:09:32 +00:00
Neil MacDougall d331ea8da0
Fix issue with project name not editable (#7735)
* Fix issue with project name not editable

* Fix lint
2022-12-16 17:09:16 +00:00
Francesco Torchia 6701ed11a3
Jobs view, Duration field live refresh
Signed-off-by: Francesco Torchia <francesco.torchia@suse.com>
2022-12-15 12:17:36 +01:00
Neil MacDougall e06dfb1d5a
Add explore button to cluster detail view (#7695)
* Move PSPs to advanced section

* Add explore button to cluster detail view
2022-12-15 10:14:13 +00:00
Catherine Luse 0011efd896
Merge pull request #7690 from catherineluse/ip
IP addresses render properly in Cluster Management
2022-12-13 12:23:03 -07:00
Alexandre Alves ca08c36bf6
fix pods usage in nodes to only account for running pods (#7685)
Co-authored-by: Alexandre Alves <aalves@Alexandres-MBP.lan>
2022-12-13 16:49:01 +00:00
Catherine Luse d422967891 IP addresses render properly in Cluster Management 2022-12-12 22:25:19 -07:00
Catherine Luse aaf65b60c6 Show both internal and external IPs in list of nodes 2022-12-07 09:53:50 -07:00
Nancy dbd6385799
storage class provisioner dropdown fixes (#7287)
* storage class provisioner dropdown tweaks

* use translation strings with fallback for csi driver display

* add csi driver translations, add driver dropdown to pv create

* add CSI label to csi driver display

* format upsupported plugin label correctly

* fix longhorn/harvester labels, ebs deprecation label
2022-12-06 14:03:44 -07:00
Nancy 002c984e0f
refactor promptModal component props (#7435)
* use modalData.componentProps to pass props to custom modal components

* linting errors
2022-12-06 09:41:17 -07:00
Nancy 6f8ade5765
set default container securityContext (#7539) 2022-11-30 14:15:55 -07:00
Francesco Torchia b3b8057eab
workloads rollback fix
Signed-off-by: Francesco Torchia <francesco.torchia@suse.com>
2022-11-28 18:26:52 +01:00
Neil MacDougall f0df19764f
Add node inactive warning indicator (#7548) 2022-11-28 09:15:15 +00:00
Nancy 8a0f8211bd
allow cloning roles; fix unlabeled multi-select style (#7258)
* allow cloning roles; fix unlabaled taggable select style

* fix role edit/view config style inconsistency
2022-11-22 08:29:47 -07:00
Bastian Hofmann f19624d5bf Add logging output forms for OpenSearch and Redis
Signed-off-by: Bastian Hofmann <bashofmann@gmail.com>
2022-11-21 12:34:27 +01:00
Bastian Hofmann 60ebcaff7f Add additional namespaces match field to logging ClusterFlow page
This also fixes a styling issue in the select fields on the Flow and ClusterFlow page

Fixes
2022-11-21 09:45:08 +01:00
Francesco Torchia 84dd46c9e1
ui:Job List, fix Duration field sorting
- fix sorting
- code refactoring

- Jobs view: fix duration field in case of Pod never starts

Signed-off-by: Francesco Torchia <francesco.torchia@suse.com>
2022-11-18 15:01:16 +01:00
Neil MacDougall a0a85dc5b3
Fix for cloning namespace in a project (#7271) 2022-11-18 10:02:38 +00:00
Phillip Rak a54c91d73d
Merge pull request #7475 from rak-phillip/chore/eslint-key-spacing
Update key-spacing eslint rule
2022-11-17 13:39:05 -07:00
Phillip Rak 3d410d0974 Apply linter auto-fixes
Signed-off-by: Phillip Rak <rak.phillip@gmail.com>
2022-11-16 18:38:20 -07:00
richa f0f21dd491
Fixed wrong certificate expires date issue (#7224) 2022-11-16 12:15:24 +01:00
Shavindra b8d83d5d3e
Fix UI not refreshing when cluster members are added or removed. (#7245)
* Fix UI not refreshing when cluster members are added or removed.
* Fix the undefined issue.
2022-11-15 17:25:19 +00:00
Jordon Leach afb24b8cc9
Add hosted k8s provider to provClusterId condition (#7443) 2022-11-14 15:14:16 -05:00
Richard Cox 8d2d0de292 Ensure HPA cannot be associated with workloads owned by others
- This ensures ReplicaSets with owners are hidden
- Fixes #2372
2022-11-08 16:29:56 +00:00
Catherine Luse 8e4049c793 Can use RKE1 cluster scoped registry for Helm chart installs 2022-10-20 15:30:05 +01:00
Alexandre Alves 48da4a3ed0
Remaining shell items for Elemental in 2.7.0 (#7168)
* add file changes needed for remaining shell files to enter 2.7.0

* add missing model prop canScaleUpPool

* manually merging the translations string to fix PR merging issue

* address PR comments

* fix issue with expression

Co-authored-by: Alexandre Alves <aalves@Alexandres-MacBook-Pro.local>
2022-10-18 11:31:37 +01:00
Richard Cox 68656a808a Fix helm install on local cluster (and make some things type safer)
- id of prov cluster different for local cluster (it's in a different fleet workspace)
2022-10-11 18:48:31 +01:00
Cody Jackson 02fb8f0648 Hide the windows command from k3s cluster
fixes rancher/dashboard#7126
2022-10-10 13:56:33 -07:00
Neil MacDougall f18082c20f
Plugin tweaks (#7095)
* Minor improvements

* Various fixes

* Fix developer load of plugins with '-' character in name

* IImprove installation detecttion and extensions naming

* Fix one more string

* Update placeholder icon

* Change pref string to Extensions

* Change icon and error handlers

* Error handling

* Fix lint

* Limit description length

* Ensure info panel readme info scrolls vertically for content

* Fix lint

* Fix bug where plugins don't load on fresh login or a login after logout

* Add chart compatbility filtering

* PR feedback

* Add check for access to ui plugin schema

* Update string following PR feedback

* Fix GitHub auth

* Fix lint

* Write in default system registry when we are installing the operator

* Fix issue where stuck installing on upgrade/rollback

* Fix bugs and tidy up plugin install/uninstall feedback in UI

* Only use system registry for Rancher images

* One more tweak to fix status on upgrade operation

* Fix extensions page reloading plugins

* Add message to reload the browser

* Fix reload notice for uninstall

* Change way we set defautl system registry
2022-10-10 17:13:24 +01:00
Shavindra 7fd3a742fe
Edit labels and annotations. (#7105)
* Edit labels and annotations.
2022-10-10 14:02:18 +02:00
Cody Jackson 06b6f358fb Disabling explorer links if the cluster is in an error state
rancher/dashboard#7036
2022-10-04 08:51:30 -07:00
Jordon Leach c41223692a
Add gke hosted provider to token creation (#7031) 2022-10-04 10:07:14 -04:00
Neil MacDougall 80eeacfb41
Plugins: Add UI to manage plugins (#6973)
* WIP: Working version

* Further refinement

* Working version

* Refactor to a product

* i18n

* Fix lint and tidy comments

* Empty-Commit

* Bump e2e

* Latest fixes, i18n

* Fix lint

* Fix lint issues

* Fix imports for standlone plugin build

* Only load plugins in dev

* Fix lint issue

* Fix template errors

* Fix operator setup

* Fix menu actions

* Address PR feedback

* Address PR feedback

* Add new preference for plugin developer

* Update icon support

* Add third-party and experimental banners to slide-in

* Add support for update/rollback of a plugin

* Address PR feedback - i18n

* i18n - one more string localised

* i18n - one more string localised

* Minor visual tidy ups

* Use banner for install warning

* Fix saefMode

* Fix lint

* Add some responsiveness to the cards page

* Fix lint

* Bump PR

* Add debug to list coverage reports
2022-10-04 13:16:54 +01:00
Jordon Leach b78e244c07
Add k3s clusters to cert rotation options (#7060) 2022-09-30 17:44:34 -04:00
Shavindra 447fe42cc4
Workload page updates (#7041)
Fixes #6800 - Workload storage mount point for volumes should be on containers
Fixes #7021 - Allow user to change the volume name
Fixes #7027 - Pod details page broken

These all works on 2.6.9 because PRs were merged after the branch separation. So this is applying the same changes to 2.7.0

For Release 2.6.9
#6800 -> release 2.6.9 PR fix #6886
#7021 -> release 2.6.9 PR fix #7022
#7027 -> release 2.6.9 PR fix #6952
2022-09-30 01:43:07 +02:00
Sean b5ab761e61 Metadata.name on workload types should allow "." character now 2022-09-28 23:01:24 -04:00
Phillip Rak ef8af1d734
Merge pull request #6981 from bashofmann/workload-openshell-matches-wrong-pod
Fix: Open shell from workload pages may pick wrong pod
2022-09-26 14:23:38 -07:00
wujun b477ab6b3e
fix harvester plugin url path (#6975) 2022-09-23 12:33:58 -07:00
Shavindra f4ce24754e
Check status.conditions exists before getting bundle lastUpdateTime (#6818)
* Check status.conditions exists before getting bundle lastUpdateTime - #6771 

* Check property existance when returning lastUpdateTime.

* Fix the conditions for row.status

* Fix status undefined.
2022-09-23 17:37:01 +01:00
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