Commit Graph

250 Commits

Author SHA1 Message Date
Shavindra e721ce3fe8
Handle correctdrift for previously created repos. (#9578)
* Handle correctdrift for previously created repos.
* Fix edit and Clone textbox
2023-08-25 12:18:19 +02:00
momesgin 17f5bb58aa
filter RKE1 s3 snapshots (#9460)
Co-authored-by: Mo Mesgin <mmesgin@Mos-M2-MacBook-Pro.local>
2023-08-02 09:03:24 -07:00
Richard Cox c906b55b42
Merge pull request #9440 from richard-cox/safer-chart-install
Add additional error handling to install chart page
2023-08-02 14:03:42 +01:00
Richard Cox dee580bad9 Changes following review with Neil
- try to find both from / to prov cluster
Also
- wrap creation of value in catch (just in case)
- only calc provClusterId once

Tested local cluster, imported cluster, rke1, rke2
2023-07-31 15:40:32 +01:00
Neil MacDougall 02e6e84f41
When execing into a container, try linux and windows commands when we can't determine if the node is windows (#9241)
* When execing into a container, try linux and windows commands when we can't determine if the node is windows

* Fix lint

* Lint: Remove trailing white space

* Use error message rather than last error

* extra failover, caching last working os against pod, errors, tests

* add __mocks__ folders to eslint ignore patterns

* standard user test fix

* removed unnecessary try/catch logic

* Revert "removed unnecessary try/catch logic"

This reverts commit c263131927.

---------

Co-authored-by: Sean <sean.mchugh@suse.com>
2023-07-28 21:28:03 -04:00
momesgin bac35d3a58
Merge pull request #9436 from momesgin/8839-disable-s3-snapshot
Disable failed S3 snapshots
2023-07-27 08:18:35 -07:00
Richard Cox 6f32ed0df2
Merge pull request #9412 from WuJun2016/circular-dependency
fix circular dependency
2023-07-27 11:39:53 +01:00
Mo Mesgin 8f19b3d53a check successful status instead of not failed 2023-07-26 16:18:35 -07:00
momesgin 7896059c49
filter failed snapshots (#9390)
* filter failed snapshots

* fixed import

* added one more test case

---------

Co-authored-by: Mo Mesgin <mmesgin@Mos-M2-MacBook-Pro.local>
2023-07-26 10:28:53 -07:00
Shavindra e11a73d6be
Fix fleet cluster labels and annotations save via YAML view. (#9383)
* Fix fleet cluster labels and annotations save via YAML view.
2023-07-26 13:25:31 +02:00
wujun f4856ffccc fix circular dependency 2023-07-26 17:45:27 +08:00
Shavindra eeb2a48330
Filter the bundles by label repo-name. (#9408) 2023-07-25 20:30:24 +02:00
Richard Cox 8558065b08 Fix how custom cluster drivers identify themselves
- the dashboard uses the kontainerdriver id for things like images, text and also to provide embedded ember with a key
- this works fine when the id is the type of kontainerdriver
- this doesn't if the kontainerdriver is custom and has a random id
  - for these cases use the status.displayName to use as an id instead
2023-07-21 16:49:55 +01:00
Giuseppe Leo 0208645b0f
(SURE-5538) Persistent Volume is not having CSI driver as vol plugin which is current default for latest versions of AKS (#9386)
* Move persistent volume constants and configurations away from model

* Add fallback for drivers with name only

* Enable support for CSI volume

* Prevent errors if no name is provided for route in CRUResource method

* Update test to check plugin options and value

* Update i18n
2023-07-20 23:31:50 +02:00
Shavindra f9a954a263
#4683 - Add fleet gitrepo resource age per cluster. (#9299)
* Add fleet gitrepo resource age per cluster.
2023-07-20 14:24:20 +02:00
Evgeniya Vashkevich c00445d501
Added UI to enable Fleet self-healing (#9310)
* Added UI to enable Fleet self-healing

* removed unused data-testid
2023-07-13 10:31:50 -07:00
Neil MacDougall c9e1a19396
Extension support for custom provisioning (#9246)
* Extension support for custom provisioning

* FIx lint issues

* Discovery / Tweaks
- fix issue where namespacesOverride was lost
- tidy up PROVIDER
- try to handle missing provider=type url param (could be missing extension-params)
- added a few comments to comments to come back to

* Names and typings
- change param --> customParam to make it clearer it's not url params
- add labels-annotations to shell types

* Wire in provider detailTabs
- as per original readme this should be made generic (extension point working directly with ResourceTabs)

* Update IClusterProvisioner & docs

* Improvements / Changes to support proving out DO extension
- cluster hooks optional
- buff up save hook (and pass in cluster when calling apply fn)
- move normalizeName into generic place
- bring back async create machine config
- hack for do extension (map example provider to do provider)

* updates, add optional saveCluster, add missing kube file
- saveCluster complements hooks, doesn't skip handling of addons, etc
- ensure register hooks take the `this` context in all worlds

* Adding docs

* Updates
- location config based changes
  - change customParams to context
  - add query param
- add new extention point to add tabs to cluster create cluster config section
- fixed some typing
- fixed issue where cluster was not passed to before / after hooks (only important if 'this' changes

* Changes following review, fix `t` in plugins

* Fix linting

* Docs updates, pass through more edit/view things

* Conditionally show the namespace grouping in the cluster list
- means users can differentiate between clusters with same name in different namespaces
- useful when clusters created via extension provisioner where ns can be selected

* docs tweaks, actually include the provisioning page in docs

---------

Co-authored-by: Richard Cox <richard.cox@suse.com>
2023-07-11 22:17:57 +01:00
Richard Cox dbb96deb12 Revert "Add additional permission check for cluster and project member admin (#9100)"
This reverts commit 1c6fc770d9.
2023-06-23 16:23:11 +01:00
Giuseppe Leo 01eeb0548f
Add recommended lint rules globally (#8997)
* Update configuration

* Create default config for eslint

* Restore plugin:vue/recommended

* Add exceptions and overrides

* Correct manually remaining issues

* Adding further picked exceptions groupped up

* Fix or disable specific cases manually and singularly

* Add naming linting exception

* Remove unused variable in component

* Move rules to default

* Autocorrect rancher/components linting issues

* Configure VSCode to use multiple files, to display linting for rancher components

* Disable jest lint hook restriction for string list component

* Autofix
2023-06-23 17:02:55 +02:00
Sean-McQ 1c6fc770d9
Add additional permission check for cluster and project member admin (#9100)
* Add additional permission check for cluster and project member admin

* Fixes the projectMembership editor on the edit project page

* per-project filtering for managing project-members on cluster/project

* Fixed admin behavior, simplified PRTB mgmt check,

* Optimise code
- Exit from cluster part early if
  - we're not ready to calc it
  - we've already calc'd it
- Move back calc of per project current user permissions to original loop
- Exit from project part early if
  - existing checks
  - we've already approved the

---------

Co-authored-by: Richard Cox <richard.cox@suse.com>
2023-06-19 13:07:18 -04:00
wujun 717a2b2c14
HARVESTER: add bare-metal container and mcm support (#8754)
* HARVESTER: add bare-metal container and mcm support

* Harvester: Fix re-render old route component

* HARVESTER: fix services and hide repositories

* HARVESTER: add svg icon

* HARVESTER: add harvester version in explorer page

* HARVESTER: change openRancherManagerSupport => isRancherInHarvester

* HARVESTER: move method to models type

* HARVESTER: enhancement TopLevelMenu when use embedded rancher

* HARVESTER: polish harvester mode judgment

* HARVESTER: Add namespace resource quota help text

* HARVESTER: remove service filter

* HARVESTER: set harvester-baremetal-container-workload to false

* HARVESTER: fix svg & namespace component

---------

Co-authored-by: n313893254 <n313893254@126.com>
2023-06-15 13:28:08 -07:00
Qingyang Nong 7c5ead687f
HARVESTER: Update LB design (#9087) 2023-06-13 10:55:17 -07:00
Giuseppe Leo 1e5057460f
Automation: Cronjob Run Now does generate resources in Jobs Detail page (#9026)
* Fix import issues

* Add cron job tests

* Add redirection test
2023-06-05 11:34:34 +02:00
Giuseppe Leo 312529d463
Updated memory value for node with reserved instead of capacity (#9014) 2023-06-01 17:32:43 +02:00
Richard Cox e10351733c Cluster and Project Members page fixes, Add back `Role` column to ClusterRoleBindings list
- Cluster tab
  - Remove prompt - Improved type name (Cluster Member --> Cluster Membership removes confusion with Cluster Member role)
- Projects tab
  - Fixed delete of membership to group. This would just delete the first binding that didn't have a user and was of the correct role
  - Remove prompt - Added name for projectroletemplatebinding type
  - Use same padding on right of Add button as on the left of the table
- CRB List
  - Removed custom header definition so native schema headers are used (with role)
2023-05-25 12:20:18 +01:00
Qingyang Nong c0cdc2dbf3
HARVESTER: Cloud provider enhancement (#8935)
* HARVESTER: Cloud provider enhancement

* fix labels-annotations.js linting

* fix missing comma in labels.vue

* fix labels.vue missing bracket

---------

Co-authored-by: Nancy Butler <42977925+mantis-toboggan-md@users.noreply.github.com>
2023-05-22 16:49:19 -07:00
Neil MacDougall 9fc18dd7c7
Fix incorrect i18n string for CSI suffix (#8936) 2023-05-22 12:32:22 +01:00
Neil MacDougall 25757ad1f2
Fix issue where project owner does not have permission to update PSP template bindings for a project (#8693) 2023-05-17 11:20:00 +01:00
Giuseppe Leo 43ce4e079c
Create unit test example of existing class models (#7726)
* Add list of cases to be covered for the model tests

* Create test cases for Namespace

* Pass empty object when creating new Namespace

* Add test about projectId in Namespace

* Remove mock for CI

* Remove unnecessary code
2023-05-15 18:57:36 +02:00
Richard Cox a359b728bc
Merge pull request #8833 from n313893254/remove-network
HARVESTER: Make NetworkAttachmentDefinitions generic in explorer
2023-05-15 17:37:06 +01:00
n313893254 78c24f47b9 HARVESTER: Make NetworkAttachmentDefinitions generic in explorer 2023-05-11 19:54:25 +08:00
LiuYan f1e16f5e12 fix missing job/pod resources on CronJobs/Jobs detail page 2023-05-11 15:42:56 +08:00
Neil MacDougall 68f3ffbcaa
Hostname truncation: Update to sync with backend (#8790)
* Update tio sync with backend

* Added getter

* Fix lint
2023-05-05 10:05:16 +01:00
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