Commit Graph

27 Commits

Author SHA1 Message Date
Nancy e64e3da1f8
Fix editing rke2/k3s clusters in 'pending' state (#12694)
* fix cluster isImported check to account for clusters in the process of provisioning

* remove tests
2024-12-02 08:31:02 -08:00
Nancy 6f52e59b07
Fix editing local rke1 and eks clusters (#12583)
* rework isImported and provisionerDisplay cluster properties

* refactor cluster unti tests to account for isImport property refactor

* update CLI e2e test to expect successful download
2024-11-12 14:11:00 -08:00
Siva Kanakala 321b03ad1e update unit tests 2024-08-22 13:03:38 +05:30
Richard Cox 1cc92acf8a Multiple changes
- Add unit test to cover basic functionality and `load` mallarky
- Fix issue where another SteveModal property was nuked
- Improve `private` use
2024-06-07 14:43:19 +01:00
Alexandre Alves 9b811c58ab
Replace Fleet Cluster `Nodes Ready` column (#11041)
* replace nodeInfo with bundleInfo in fleet cluster model + update fleet cluster table to display bundles ready instead of nodes ready

* address pr comments
2024-05-27 09:39:21 +01:00
Nancy 557d0280fb
EKS Provisioning (#10581)
* eks initial

* k8s options

* eks node group component

* add config and networking components

* fix default region on initial load

* use .sync modifier in network tab

* launch templates

* node group styling

* spot instances/launch template instance type

* fix selectcredential footer when not showing the rest of the form

* cluster name description and options

* iam listRoles

* subnets

* k8s version dropdown custom

* logging tab

* agent deployment customization, labels and annotations

* working default values

* fix edit eks/aks

* instance types dropdown improvements and spot instance type filtering

* validation;

localization

* todos

* tests

* move diffUpstreamSpec

* clean up

* improve launch template loading appearance

* fix kms key fetch

* fix custom role radio

* fix failing nodegroup test

* fix lint

* fix typescript errors in crueks

* nodegroup ts

* cache ec2 instance types

* cache instance types in vuex

* nodegroup ts

* ts errors in eks networking

* eks config ts errors

* tweak nodegroup input sizing

* reset nodegroup default values if the launch template is cleared

* add tooltips and userdata file upload button to node groups

* add networking tooltips; make credential dropdown half width when not showing credential form controls

* fix rancher managed launch template detection

* fix networking tooltip

* show when a node group has a rancher-managed launch template

* fix error filtering for ec2 iam roles

* add system labels and annotations for norman clusters

* lint

* lint

* fix labels and annotations getters in norman cluster model

* added tests for norman cluster system labels and annotations

* fix some eks typescript and hide cluster name when no credential

* fix userdata sublabel link

* fix networking info banner translation typo

* node group size labels and tags should be editable
2024-04-26 09:06:48 -07:00
Giuseppe Leo 793f7c6023
Initial migration of Vue3 for compatible fixes (#10858)
* Correct file naming and small TS issues

Correct TS related issues

* Manual replacement of :is on standard HTML tags

* Add missing required in the code dependencies

* Correct SCSS import

* Correct test file naming

* Correct typo in markup

* Use alias for types import
2024-04-23 20:16:46 +02:00
Richard Cox b464d15ee0
Integrate new schemaDefinitions endpoint (#10141)
* resource edit AS yaml

* fix cruresource (yaml from form)
- lazy load the schemaDefinitions when needed, avoids sync all to createYaml before we have an async chance to fetch schemaDefinitions

* Fix questions
- there are only four places we use questions, none of which use schema, this is just to be safe

* cluster scan, plugins/fieldsForDriver, defaultFor, validationErrors

* pathExistsInSchema
- used to optionally show conditions tab/list in resource detail view
- logs of things in ingress list/edit

* createPopulated / defaultFor
defaultFor requires resourceFields, it's only used by createPopulated in one place to support machine configs without components

* wip

* WIP MONITORING.SPOOFED
- these aren't spoofed types, but secondary schemas
- testing fix blocked, primary schema's have resourceFields

* Move steve specific (resourceField) code to steve models
- create models for steve schemas and apply to cluster and management stores
- move resoureField based validationto steve model
- move pathExistsInSchema to steve store getter
- don't fetch schemaDefinitions on start up when saving prefs (not needed and blocking)

* comments / improvements

* (untested) refactoring

* Fix alertmanager definitions, add retry definition fetch

* Fix pathExistsInSchema for path length > 2

* Fix questions that accept schemas
- tested by adding Questions to random page and the node schema

* Fix to saving configmap part 1
- the save works but doesn't show data. the yaml is the same as before. debug info added

* Validation by resourceFields is a norman specific thing, so make it such

* small refactor

* Tidying up

* Remove rebase junk

* fix linting and unit tests

* fix unit tests

* fix linting from fix for test....

* Tidying up, fix alertmanagerconfig

* Remove unit test todos

* add unit tests for resource fields

* sdssdf

* Add unit tests for pathExistsInSchema

* JS --> TS

* Store schemas in local singleton cache to avoid hitting store

* fix minor changes from review

* cruresource changes following review
- improvement - remove spurious canDiff
- createResourceYaml - pass in resource to use instead of calc in code

* WIP changes to parseType

* Fix generic cloud credential and node driver forms

* handle missing reactivity given schema definitions not in store

* fix and add unit tests for `parseType`

* Fix create-yaml test

* Changes following review
- improved comments
- SchemaDefinitionCache is now per store (and is reset as such)
- typeRef now uses parseType

* Fix dep loop by moving route based helps in auth out to utils file

* fix unit tests

* Changes following review
2024-02-28 17:08:35 +00:00
Alexandre Alves 74e543c524
show registration tab only on hosted providers with private endpoint/network (#10319)
* change condition to show registration tab only on hosted providers with private endpoint/network + adds unit tests

* address pr comments

---------

Co-authored-by: Alexandre Alves <aalves@Alexandres-MacBook-Pro.local>
2024-02-05 10:08:40 +00:00
Richard Cox aa2653b81b
Merge pull request #10318 from ly5156/secret-resource-type
fix(steve/actions): fix missing type attribute of secret resource
2024-02-02 10:34:46 +00:00
Alexandre Alves 21327c54c0
Update logic of 'hasError' in 'provisioning.cattle.io.cluster' model (#10366)
* update logic of hasError in prov cluster model

* working on unit tests

* fix code logic and finish unit tests

* fix lint issue

* address pr comments

---------

Co-authored-by: Alexandre Alves <aalves@Alexandres-MacBook-Pro.local>
2024-02-02 09:27:06 +00:00
LiuYan 1458fffad4 test(resource-utils): add unit test for cleanForDownload method 2024-02-02 09:03:08 +08:00
Alexandre Alves b4d463b04c
add CSI suffix to all non-builtin storageClass provisioners (#10348)
* add CSI suffix to all non-builtin storageClass provisioners

* improve unit test

* fix issue with storybook build a spec.ts files

* update main.js to exclude

* revert changes to storybook config + rewrite unit test

---------

Co-authored-by: Alexandre Alves <aalves@Alexandres-MacBook-Pro.local>
2024-01-31 17:16:15 +00:00
Alexandre Alves 21bd9b28c3
System namespaces curation (#10258)
* update logic to decide if a namespace is a system one + improve curated list of system namespaces

* fix and extend unit tests for isSystem namespace model prop

---------

Co-authored-by: Alexandre Alves <aalves@Alexandres-MacBook-Pro.local>
2024-01-22 09:58:38 +00:00
Richard Cox aaba6b38a7 Include metadata clusterName, deletionPeriodSeconds and generateName properties in steve objects 2024-01-02 10:49:35 +00:00
Richard Cox cc9136b633 Fix unit tests (move mocks into utils folder) 2024-01-02 09:49:52 +00:00
Richard Cox aa6461802d improve unit tests, ensure super.cleanForSave's run correctly 2023-12-20 16:56:59 +00:00
Richard Cox afa5feb3b4 fix workload test 2023-12-20 16:01:39 +00:00
cnotv 939e3e3aac Add tests for workload save 2023-12-18 10:38:34 +01:00
momesgin 807e2dc96c
scaling down to zero restrictions for RKE1 (#10017)
* disable scale down to zero

* scaling down to zero restrictions for RKE1

* removed extra optional chaining

* removed wrong condition for minus button

* added unit tests

* combined rke1 and rke2 scale down modals + more tests + minor refactor

* delete unused file ScaleRke1NodeDownDialog.vue

* moved logic from created to data + used nameDisplay for both rke1 and rke2

---------

Co-authored-by: Mo Mesgin <mmesgin@Mos-M2-MacBook-Pro.local>
2023-12-14 10:08:34 -08:00
Evgeniya Vashkevich 25618ad4a0
[INT] Replaced vue-clipboard2 library with clipboard-polyfill (#10072)
* [INT] Replaced vue-clipboard2 library with clipboard-polyfill
2023-11-30 16:31:35 -08:00
Evgeniya Vashkevich 6d4f75afaf
Fixed RKE cluster being shown as Imported (#9868) 2023-11-01 13:02:37 -07:00
Richard Cox 48d0807181 Revert "App upgrade notification shown for incorrect app (#9806)"
This reverts commit eec4a46fdb.
2023-10-20 15:13:52 +01:00
Giuseppe Leo eec4a46fdb
App upgrade notification shown for incorrect app (#9806)
* Heavy code cleanup: move function to utils, config and types to their own file

* Add fallback and tests for version comparison not retrieving values

* Fix refactoring

* Add partial case of array filterBy

* Replace multiple functions handling the same case with single getter; add covering tests

* Add no parameter case to be correctly handled

* Add case with different chart values, e.g. Epinio issue case

* Prevent issues if retrieved version is undefined; Add unit tests for upgrade cases

* Filter out charts if lack parameters
2023-10-10 11:14:24 +02:00
Sean-McQ 70ad28eb3d
node to management node controller remaps status into internalNodeStatus (#9760)
Code that handles this on the backend: 9129a7b049/pkg/controllers/managementuser/nodesyncer/nodessyncer.go (L750)
2023-09-27 08:15:02 -04: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 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