Commit Graph

103 Commits

Author SHA1 Message Date
Alexandre Alves 72440c3597
add e2e test (#10728) 2024-04-02 09:58:02 +01:00
Sorin 89fecf80d7
9810/follow-up with fixes. (#10638)
* fix: moves AddCustomDialog outside NameNsDescription
---------

Signed-off-by: scures <scurescu@suse.com>
2024-03-20 08:17:45 +01:00
scures 27889b0dbf
feat: cluster abbreviation to 3 chars, shows customisation on cluster creation 2024-03-11 14:43:28 +01:00
momesgin ccb88e871f
Fix default values not being set when a new pool is added in edit mode (#10477)
* fix displaying false vsphere errors

* rename variables

* fix default values not being set when a new pool is added in edit mode

* minor refactor

---------

Co-authored-by: Mo Mesgin <mmesgin@Mos-M2-MacBook-Pro.local>
2024-02-20 15:10:15 -08:00
Alexandre Alves ed31439ac1
add option of 'none' for Container Network select in Basics tab of RKE2 provisioning (#10385)
* add option of 'none' for Container Network select in Basics tab of RKE2 provisioning + add e2e test to check that option is available and can be selected

* add correct logic to include none as a CNI option

* address pr comments

* fix small bug with missing optional chaining

* add banner to Basics component when CNI option selected is 'none' to warn user about the need of additional configuration

* update e2e to test banner

* fix issue

---------

Co-authored-by: Alexandre Alves <aalves@Alexandres-MacBook-Pro.local>
2024-02-15 09:09:46 +00:00
Phillip Rak a79ca8f6ae
Merge pull request #10440 from rak-phillip/bugfix/10426-cloud-provider
Revert "Aws In-tree support (#9643)"
2024-02-13 09:51:22 -07:00
momesgin 049e8bc15e
Fix registry host not being synced with its secret (#10397)
* fix registry host not being synced with its secret

* lint

* refactor landing on Create Custom page

* refactor creating cluster name in e2e test

* pass index to selectors

* reuse clickTabWithSelector

* lint

* refactor registries e2e po

* lint

---------

Co-authored-by: Mo Mesgin <mmesgin@Mos-M2-MacBook-Pro.local>
2024-02-13 08:44:27 -08:00
Phillip Rak 1b107ecb3a Revert "Aws In-tree support (#9643)"
This reverts changes made by  Aws In-tree support (#9643). While testing, it appears that the intent of this PR (to handle upgrade cases and display a banner) can never be triggered.

fixes #10426
2024-02-13 08:45:34 -07:00
Cody Jackson 34dbf6db9a Make rke2 clusters respect the machingConfig `addCloudCredential` property
https://github.com/rancher/dashboard/issues/7023
2024-02-06 10:26:20 -07:00
Neil MacDougall d154e53bac
Cilium bandwidth manager support (#10320)
* Add support for Bandwidth Manager config for Cilium

Fixes: #10049.

SURE-7195.

I have tested it when enabled Bandwidth Manager.

$ kubectl -n kube-system get cm cilium-config -o json | jq '.data."enable-bandwidth-manager"'
"true"

$ kubectl -n kube-system delete pod cilium-xxxxx

$ kubectl -n kube-system exec ds/cilium -c cilium-agent -- cilium status | grep BandwidthManager
BandwidthManager:                                   EDT with BPF [CUBIC] [ens5]

I have tested it when disabled Bandwidth Manager.

$ kubectl -n kube-system get cm cilium-config -o json | jq '.data."enable-bandwidth-manager"'
null

$ kubectl -n kube-system delete pod cilium-xxxxx

$ kubectl -n kube-system exec ds/cilium -c cilium-agent -- cilium status | grep BandwidthManager
BandwidthManager:        Disabled

Signed-off-by: Masashi Honma <masashi.honma@gmail.com>

* Add bandwidth manager support for Cilium

---------

Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
Co-authored-by: Masashi Honma <masashi.honma@gmail.com>
2024-01-23 20:54:01 +00:00
Neil MacDougall d60d5c44a5
Fix incorrect spec structure for cilium ipv6 configuration (#10304) 2024-01-22 09:12:15 +00:00
Francesco Torchia 27dc8cba94
Add null checks for Clusters agentConfig property
Signed-off-by: Francesco Torchia <francesco.torchia@suse.com>
2024-01-18 17:48:33 +01:00
Francesco Torchia ebd2834bd6
Merge pull request #10073 from torchiaf/4350-validate-harvester-cluster-yaml
Validate Harvester clusters
2024-01-17 10:27:34 +01:00
momesgin d77e90c818
Merge pull request #10251 from momesgin/10250-close-error-banner
fixed passing fvUnreportedValidationErrors to CruResource
2024-01-11 16:57:43 -08:00
Nancy 4cca5faf81
AKS provisioning extension (#9669)
Adds a built-in AKS provisioning extension to replace the embedded ember pages, as well as modifications to the provisioning UI to support other non-rke2 provisioning extensions
2024-01-11 07:52:45 -08:00
Mo Mesgin c847377469 fixed passing fvUnreportedValidationErrors to CruResource 2024-01-10 15:10:15 -08:00
Francesco Torchia e0934d89c0
Remove name validation from MachinePoolValidation
Signed-off-by: Francesco Torchia <francesco.torchia@suse.com>
2024-01-05 15:06:51 +01:00
Francesco Torchia f65c4ce2c9
Implement Machine Pool Yaml Validation
Signed-off-by: Francesco Torchia <francesco.torchia@suse.com>
2024-01-05 15:06:26 +01:00
Evgeniya Vashkevich 4aba0acfec
Fixed comments on PR #9735 (#10160)
* Fixed comments on PR #9735
2023-12-21 09:57:57 -08:00
Evgeniya Vashkevich 209a471473
Separated remaining tabs into separate components in rke2 file (#9735) 2023-12-07 13:21:31 -08:00
Evgeniya Vashkevich 92d810399a
[FEAT] Removed all mentions of Pod Security Policies (#9962) 2023-11-01 11:02:43 -07:00
Richard Cox 211222c0cf Updates to how we handle Machine Configurations on edit of Cluster YAML
- This change basically reverts https://github.com/rancher/dashboard/pull/9678
  and instead shows a warning
- That PR spawned the issue https://github.com/rancher/dashboard/issues/9724
- That issue created some interest
- Efforts to fix that issue described in https://github.com/rancher/dashboard/issues/9724#issuecomment-1738959640
- For 2.8.0 we're going back to how we were pre-2.8.0 and fix post-2.8.0
2023-09-28 15:07:55 +01:00
Nancy b424489c60
update rke2 node drain default value (#9273)
* update rke2 node drain default value

* set machine pool drain before delete to true by default; do not set upgrade strategy drain before delete to true
2023-09-27 16:31:24 -07:00
Evgeniya Vashkevich 74e6d9d214
Restored missing function in rke2.vue (#9766) 2023-09-26 11:20:51 -07:00
Phillip Rak 963d3813b1
Merge pull request #9737 from rak-phillip/feature/9699-vsphere-validation
Relay error  messages when errors are detected in the vSphere form
2023-09-20 13:09:09 -07:00
Phillip Rak e0697ed824 Relay vSphere configuration errors to root form
Signed-off-by: Phillip Rak <rak.phillip@gmail.com>
2023-09-19 18:07:25 -07:00
Phillip Rak 497d1e7b22
Merge pull request #9678 from rak-phillip/bugfix/9559-edit-yaml
Allow hooks to be omitted from application
2023-09-18 08:22:04 -07:00
Phillip Rak 83e68f0fd1 Allow hooks to be omitted from application
There are certain scenarios where we want to apply hooks, but it might not make sense to apply all of them. For instance, we have `_beforeSaveHooks` hooks that we want to apply when the "Edit as YAML" button is clicked on a form, but it doesn't make sense to apply the `save-machine-pools` hook at this point; we are only changing the mode of editing so we should not be saving changes at this point. However, we still would want to apply the `set-registry-config` hook.

Co-authored-by: Richard Cox <richard-cox@users.noreply.github.com>
Signed-off-by: Phillip Rak <rak.phillip@gmail.com>
2023-09-15 08:02:55 -07:00
Evgeniya Vashkevich 9b1c6105eb
Fixed case in Basics.vue and rke2.vue (#9691) 2023-09-12 16:49:07 -07:00
Evgeniya Vashkevich 9a30eae294
Split parts of rke2.vue into separate pages (#9566)
Separated Basics and MemberManagement tabs into separate components.
2023-09-12 12:47:51 -07:00
Neil MacDougall b97e9e0868
Aws In-tree support (#9643)
* Aws In-tree support

* remove 1.27 testing code

---------

Co-authored-by: Nancy Butler <42977925+mantis-toboggan-md@users.noreply.github.com>
2023-09-06 09:18:40 +01:00
Richard Cox acf94d518e Ensure we always fetch rke2 cluster addon charts
Overview
- Addons are helm charts installed into the provisioned cluster
- Addons to install are determined by kube version and cloud provider
- Addons have values/config that can be provided when provisioning

Bug
- Previously we were looking for the helm chart associated with the addon in the chart cache
- The cached charts are specific to the kube version of the host. Is the chart is invalid due to kube version of host, it's not supplied to us thus not in cache
- If a user wants to install a valid chart in the provisioned cluster which was invalid for the local cluster, we would fail to find the chart

Fix
- In all worlds, regardless of cache, we would fetch the full chart (which includes the readme and importantly default values)
- Fix is to ensure we fetch these given the original set of addon names, rather than addons which appear in the local cache (which we don't use anyway)
2023-09-01 15:35:09 +01:00
momesgin 32b5a4f315
support array type for cni values in yaml (#9486)
Co-authored-by: Mo Mesgin <mmesgin@Mos-M2-MacBook-Pro.local>
2023-08-30 14:39:03 -07:00
Qingyang Nong 3f6abf15c3
HARVESTER: Fix failed to pass guest cluster name into Harvester cloud provider (#9381) 2023-07-20 14:13:12 -07:00
Giuseppe Leo 11f7cfe9f1
[RKE2] Cluster unable to provision after switching back to Back to Form from Edit as YAML (#9264)
* Cleanup code

* Prevent to JSON clone agent config if undefined

* Add clean-tooltip directive to jest configuration

* Remove agent cleanup from the before hook

* Split fetch methods in parts

* Move condition to parent

* Add tests for agent configuration

* SKip test till resolved extra setup

* Updated code comment based on changes
2023-07-13 19:52:49 +02: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
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
wujun e6f0fa5805
fix object overwrite & rerender (#8809)
* fix object overwrite & rerender

* add comment to rke2 syncMachineConfigWithLatest

---------

Co-authored-by: Nancy Butler <42977925+mantis-toboggan-md@users.noreply.github.com>
2023-06-01 16:37:46 -07:00
Neil MacDougall 3db04f1e9a
Changes to support custom node driver UI extensions (#8735)
* Changes to support custom node driver UI extensions

* Fix bad merge

* Fix merge

* Fix bad merge

* Revert changes that are more impactful for now

* Add mock for $plugin

* Fix lint issue

* Address PR feedback

* Fix bad rebase

* Fix merge issues

* Removed unused import

* Fix merge issue

* Add back in missing validation for roles

* Fix unit test
2023-05-25 15:37:16 +01:00
Giuseppe Leo 0eeafa3251
Automation: Create tests to ensure presence of pool machines requirements on RKE2 cluster creation (#8882)
* Group up default configuration for RKE2 tests

* Prevent error in case of no machine pool

* Add machine pools tests
2023-05-22 19:18:07 +02:00
Qingyang Nong 66fe935b79
HARVESTER: Cloud provider should set none when the Harvester cloud provider is disabled (#8811) 2023-05-22 09:45:41 -07:00
Phillip Rak ade3c9f4e7 Replace all instances of `v-tooltip` with `v-clean-tooltip`
Signed-off-by: Phillip Rak <rak.phillip@gmail.com>
2023-05-18 15:39:14 -07:00
Alexandre Alves c876a2ecf6
Agent configuration RKE2 (#8643)
* porting Neils poc work

* add all namespaces to pod affinity ui + add banners to for windows warning and no defaults for limits area + set namespaces as input as default for agent configuration + add node selector to agent configuration

* update banner copy in affinity section for windows + add visual separator between node and pod affinity

* added weight input for node affinity - preferred + made weight input for pod affinity appear only for preferred + changed MatchExpressions component to cover matchFields and matchExpressions  in node affinityupdate banner copy in affinity section for windows + add visual separator between node and pod affinity

* fix lint errors

* working on e2e tests for agent configuration on rke2

* e2e tests work in progress

* working on e2e tests

* fix issue with Tolerations component where data wasnt being propagated because some inputs were missing a connection with the update method

* finish missing bits of e2e tests + fix height of inputs + revert back default affinity fetch

* disable no arbitrary waits in cypress

* fix broken e2e and unit tests

* fix e2e tests again

* fix lint issue

* set timeout for intercepting request to 10 seconds

* update path for default setting in agent configuration

* fix issue in dark mode in group panel + update strings to match rke1 interface + remove label from namespace input on pod affinity + clean up agent config data on save and restore it if it fails + change order of ui blocks in agent config interface

* address low hanging fruit PR comments

* remove console log

* move agent config po to components folder

* remove select.po in favour of labeledselect.po + fix data-testid in arrayList component and also its unit tests + make unit-input po leverage the use of LabeledInputPo + fix title assertion

* address final comments on e2e tests

* fix issues with PodAffinity component + update e2e test payload check

* final PR fixes

* addressing PR comments

* remove log

* reverting changes to ClusterManagerCreateRke2CustomPagePo as it was impacting other tests + add a method to go to custom cluster creation page

* e2e test updates

* updating banners copy

---------

Co-authored-by: Alexandre Alves <aalves@Alexandres-MacBook-Pro.local>
Co-authored-by: Alexandre Alves <aalves@Alexandres-MBP.lan>
2023-05-11 12:00:22 +01: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
richa 72debba793
Added code to supporte truncation (#8691) 2023-04-20 08:34:06 +02:00
richa b161d67d7e
Added check box for truncate Hostnames (#8397)
* Added check box for truncate Hostnames

* Fixed lint

* Added instanceNameLimit param to machine pool

* Fixed lint and removed test code

* Fixed truncate Hostnames as per new updates

* Fixed lint

* truncate banner fix

* Clean code

* Added new object to cluster

* Changes following review

* Fix interpolation style

* Removed un-needed code

---------

Co-authored-by: Neil MacDougall <nmacdougall@suse.com>
2023-04-18 12:50:02 +02:00
Giuseppe Leo bf37ce0a60
RKE2 cluster create/edit screen allows saving invalid configuration (#8608)
* Move hardcoded wording to i18n

* Replace repeated string values for CSS classes used in logic with constants values

* Prevent to create clusters without required node pools

* Prevent view to break if no Machine Pool is present

* Replace computed property with method

* Prevent to require nodes if no machine pool is not set
2023-04-12 15:54:16 +02:00
Neil MacDougall 528d7d94cc
[2.7] Forward port #8482 (#8484) 2023-03-24 21:35:18 +00:00
Qingyang Nong 11cfbf2f33
HARVESTER: Revert PR https://github.com/rancher/dashboard/pull/8080 (#8504) 2023-03-23 13:38:47 -07:00
Nancy bda1a5dc43
fix sort order of rke2/k3s kubernetes version list (#8462) 2023-03-23 11:39:11 -07:00