Граф коммитов

471 Коммитов

Автор SHA1 Сообщение Дата
azoppiserpa 40e7987ef8
Fixing magic strings on operator flags (#3327)
* replacing usages of magic strings with flags from the subpackage

* removing the //todo comment regarding the magic strings

* replacing magic strings with operator constants

* move DefaultOperatorFlags to operator package, inject when needed
2024-01-04 15:59:24 +11:00
Kipp Morris de1b399b6c
`az aro update` CredentialsRequest hotfix (#3325)
* If the CredentialsRequest isn't found, retry until timeout instead of immediately erroring out

* `ensureCredentialsRequest` upon every `az aro update`

* Add an E2E test for the `az aro update` scenario where the ARO
operator's CredentialsRequest has been deleted
2023-12-14 15:49:19 -05:00
Tony Schneider 9b92b4f79b
Admin action to delete a cluster managed resource (#3286)
* add ResourceDeleteAndWait to azureactions

* add delete resource admin action and frontend routing

* add helper functions for lb config manipulation

* refactor azure actions
- moves resource delete code to seperate file
- adds loadbalancer client to handle deleting FrontendIPConfiguration
- updates ResourceDeleteAndWait to handle deleting FrontendIPConfigurations
- adds DeleteByIDAndWait to features/resources client

* add e2e tests

* fix imports and add license headers

* cleanup / fix lint

* add command example to doc

* rename to "managed" resource id

* change query param to camel case

* use var group instead

* return error as adminReply already wraps in CloudError

* fix missed camelCase of query param

* use regex to match frontend ip configurations

* remove focus

* add deny list to prevent deleting PLS and Storage

* fix mixed import

* use fake pls name to prevent accidently deleting e2e cluster pls

* fix test

* add PE to deny list
2023-11-29 17:09:56 -05:00
Kipp Morris 9a9edacf6b
Update ARO operator Azure auth scheme to use a DefaultAzureCredential (#3274)
* Update the cluster authorizer to use a DefaultAzureCredential

* Update the ARO operator to set and use DefaultAzureCredential via env vars

* Add a CredentialsRequest to the ARO operator deployment

* Restart the ARO operator upon `az aro update`

* Removed now unused AzCredentials function

* Changed ARO operator deployment wait time during `az aro update` from
  20 minutes -> 5 minutes

* Refactor CliWithApply to generalize to different object types

* Updated Restart in pkg/util/kubernetes to use server-side apply
* Updated Restart in pkg/operator/deploy to only return an error after
  at least attempting to restart all of the deployments passed in

* E2E test for ARO operator master deployment's restart upon cluster update

* Wait for the ARO operator's CredentialsRequest to be reconciled before
restarting
2023-11-28 10:45:00 -05:00
Tanmay Satam 06f78b75ce
Watch MachineSets for worker subnet changes instead of Machines (#3280)
https://issues.redhat.com/browse/ARO-4632
2023-11-21 10:24:25 +11:00
Matthew Barnes d0c6db7df4
e2e: Spew ODataError details before panicing (#3265)
Co-authored-by: Matthew Barnes <mbarnes@fedorapeople.org>
2023-11-09 12:04:57 -05:00
Amber Brown e278fd6891
Add some more golangci-lint linters and fix the issues they find (#3234) 2023-11-08 10:45:17 +11:00
Kipp Morris f042c8144d
Fix e2e test for azurefile-csi storage class that uses ARO-managed storage account on OCP 4.11 (#3226)
* Fix PVC name in PVC status check
* Limit test scope and verify that test works if FIPS is disabled
* Mark test pending again, leave comment about it, and revert debugging
stuff
2023-11-01 16:44:48 -04:00
Nont effcd0beab Fix make generate 2023-10-27 09:51:40 -04:00
Nont c6285803fa Make all monitors into go routines 2023-10-27 09:51:40 -04:00
Matthew Barnes 3273b70b33
BUG: Fix golang client PUT for GA (#3204)
* swagger: Use struct tags to specify read-only fields

* immutable: Handle `swagger:"readOnly"` tag during validation

The left-hand operand (v) should omit read-only struct fields;
i.e. the field should always be the zero-value for its type.

* api: Add ExternalNoReadOnly method to OpenShiftClusterConverter

ExternalNoReadOnly removes all read-only fields from the external
representation. This is necessary when patching a cluster document;
read-only fields must be omitted from the external representation
in order to pass static validation.

* e2e: Exercise using PUT to update managed outbound IPs

---------

Co-authored-by: Matthew Barnes <mbarnes@fedorapeople.org>
2023-10-24 16:10:48 -06:00
Tanmay Satam 365413c357
Add routing to admin portal (#3164)
* Add React Router library

* Use React Router for search params

The existing functionality using this appears to be non-functional, but its behavior
is preserved.

* Use cluster resourceID in route for details modal

* Use URL routing to handle Cluster Details navigation

* Route all admin portal frontend subroutes to index.html

* Add handling to portal login redirect to preserve original path

* Update E2E tests for new admin portal routing

* Replace OverviewComponent with new implementation

- Use FluentUI DetailsList for contents
- Always display all properties, even if value is not present
- Modify E2E test to check each individual property

* Build frontend artifacts
2023-10-18 16:43:38 -04:00
Tony Schneider 92ca0e4c1f
Add e2e tests for multiple ips per loadbalancer (#3183)
* add azureclient for 2023-07-01-preview
* add UpdateAndWait to oc azure client
* add e2e test for managed outbound IPs
2023-10-17 11:25:34 -06:00
Christoph Blecker 9ef2e0bc0c
Add eventually timeout when we use contexts 2023-10-14 14:52:39 -07:00
Christoph Blecker e3b1ebb71d
Add additional debugging lines 2023-10-14 13:01:25 -07:00
Christoph Blecker 61b9c39a78
run tests serially 2023-10-14 00:22:09 -07:00
Christoph Blecker a94a600cb6
Parallelize namespace names across tests 2023-10-13 21:44:40 -07:00
Christoph Blecker d36544a881
allow for parallel statefulsets to be created 2023-10-13 21:26:55 -07:00
Christoph Blecker a4323ba42d
Fix e2e tests - Add explicit timeouts 2023-10-13 16:48:10 -07:00
kimorris27 29726e7775 Fix - avoid letting context override default timeout used by Eventually 2023-10-13 17:09:54 -05:00
kimorris27 a3bb3f5a12 Fix - avoid duplicate resource and label names in StatefulSets 2023-10-13 17:01:57 -05:00
kimorris27 bb23e4ec96 Fix - arm.ParseArmResourceId is meant for child resources and not resource groups, so use stringutils.LastTokenByte instead 2023-10-13 13:40:26 -05:00
kimorris27 6595ed0013 Fix - don't try to add service endpoint if it's already there 2023-10-13 11:25:12 -05:00
kimorris27 ce81e7da30 Add e2e test for azurefile-csi storageclass 2023-10-12 16:57:37 -04:00
Ben Vesel b123a45f25
Fix WorkerProfilesStatus PUCM Bug (#3184) 2023-09-21 16:14:07 -04:00
Brendan Bergen 04b84a2b8d
Refactor pkg name (#3178) 2023-09-19 16:54:04 -04:00
Amber Brown b21cc048e5
Get to the bottom of the e2e admin portal failure (#3168)
* save screenshots more consistently, update to be more BDD

* save the html too

* fix?

* I think there's a race condition here -- use eventually to work around it

* Update admin_portal.go
2023-09-19 16:53:28 -04:00
Nont 4a3ecf59f9
Fix NSG e2e error (#3057)
Co-authored-by: Amber Brown <ambrown@redhat.com>
2023-09-14 16:11:52 +02:00
Hilliary Lipsig 33cbf09add
Update adminapi_cluster_getlogs.go
Use internal image.
2023-09-12 17:33:31 -07:00
Hilliary Lipsig 4b891d0278
Update adminapi_cluster_getlogs.go
Update the image in the pod definition to use a publicly available image. Hopefully fixing the seemingly broken test.
2023-09-12 14:51:54 -07:00
Miguel Abad Perez b1db19462c
Bumping up MUO to v0.1.952 (#3149)
Co-authored-by: Amber Brown <ambrown@redhat.com>
2023-09-12 09:29:57 +02:00
Amit Arora 28d48702b5
Added the Actions Icons on Cluster Detail Page (#3051)
* Added the Actions Icons on Cluster Detail Page

* Added Action Icon Button on Cluster Detail Page

* Added Action Icon Button on Cluster Detail Page
2023-09-11 12:38:27 +05:30
Amit Arora 91a03574d6
add refresh button for different resources (#3111) 2023-09-05 12:28:07 +05:30
Christoph Blecker c2cf5566f4
Fix string to int conversion 2023-09-03 18:29:27 -07:00
Lisa Ranjbar Miller b7ba1cc158
ARO-3112: Set DisableOutbound SNAT to true on Load Balancers (#3069) 2023-08-28 07:51:49 -06:00
Amber Brown cc6cd1e0b8
Move pkg/api dependencies on util/subnet to api/util/subnet (#3070) 2023-08-03 16:41:32 +10:00
Amber Brown 27b1ec195d
Run the admin portal e2e in podman (#2968) 2023-06-23 11:39:55 +10:00
Tanmay Satam a8012e5510
Add status conditions to operator MachineSet controller (#2899)
* Add status conditions to operator MachineSet controller
* Use base ARO GetCluster method for retrieving cluster resource in derived controllers
* Add helper functions for status
* Refactor operator controller conditions tests to use shared default conditions
2023-06-06 10:04:02 -06:00
Taylor Phelps 0c7b9bf5a0
ARO-3054 - Set OpenShift Version during Cluster Creation (#2926)
* updated cluster creation to use version

* added if statement on env variable

* reverted due to redundant code

* updated Create call with OSVersion

* attempt to resolve conflicts

---------

Co-authored-by: v-taphelps <v-taphelps@microsoft.com>
2023-06-06 14:58:47 +02:00
Daniel Holmes 386753af33
Remove reliance on hiveclient set which in-turn relies on openshift installer (#2806)
* chore(hive): Replace hive clientset with controller-runtime client

* chore(hive): Replace clientset with controller-runtime

* chore(vendor): Tidy dependencies up

* chore(hive): Remove vendored clientset
2023-06-02 12:21:09 +10:00
carvalhe 5b974dfb5e
Preflight validation (#2823)
*  Preflight validation first iteration

Co-authored-by: BCarvalheira <bcarvalheira@microsoft.com>
2023-06-01 15:25:03 -04:00
Aldo Fuster Turpin a3b9613323
Refactor/env vars access (#2693)
Limits the dependency between packages to make the code more readable
2023-06-01 14:10:36 +02:00
Ben Vesel 51b1919c4e
Merge pull request #2904 from Azure/regional-checkaccess-rollout
Add an env variable as a rollout flag for CheckAccess
2023-05-31 09:07:45 -04:00
nont ed8b7070af Use LiveConfig for the flag 2023-05-25 14:18:08 -07:00
Jeff Yuan 5dc6dc1434 skip e2e tests when it is not enabled, plus restore default flags value 2023-05-23 16:19:24 +12:00
Jeff Yuan d34b0842e1 added e2e tests 2023-05-22 18:10:34 +12:00
Spencer Amann 0688f26b92 simplifies subnet reconcile annotation check to avoid flaky timestamps 2023-05-17 12:08:26 -04:00
Yehor Naumenko 654ad44ea4
Capture subnet reconciliations (#2782) 2023-05-15 12:40:23 +02:00
Tanmay Satam 99438801b5
Clean up dnsmasq machineconfig when machineconfigpool is deleted (#2476)
* Clean up dnsmasq machineconfig when machineconfigpool is deleted
* Update unit and E2E tests
2023-05-04 15:53:30 -06:00
Tanmay Satam d1600a0313
Spike - Cluster Operator Errors (#2703)
* ARO Cluster Operator Status derives the Cluster Operator's Available/Progressing/Degraded conditions from the state of its controllers
* Implements controller status conditions on the node operator controller
2023-04-27 12:32:30 -06:00
Matthew Barnes 176a7c9fbe azureclient: Add scope members to AROEnvironment
Scope strings should mostly go away once the RP code is fully
migrated to the newer TokenCredential-based Azure SDK, but this
was requested by multiple peer-reviewers.
2023-04-11 16:32:49 -04:00
Matthew Barnes db99c064e2 test/e2e: Port to azidentity 2023-04-11 16:32:49 -04:00
Martin Bukatovič 9a85163533 compare cluster versions via Lt function 2023-04-11 15:05:24 -04:00
Martin Bukatovič 52c2404595 fix e2e tests when running against 4.12 clusters 2023-04-11 15:05:24 -04:00
Aldo Fuster Turpin fb5683dfb3
create test functions for error comparison (#2614)
refactor: create functions for error comparison in test files
2023-04-06 14:15:15 +02:00
Jeremy Facchetti 5c5a96fc40
enrichers redesign (#2402)
redesigned enrichers for better understandability
2023-04-05 15:30:24 +02:00
Roland Kunkel 761a23f667 remove mhc test timeout 2023-04-04 15:35:51 +02:00
Roland Kunkel 45b022ce94 add e2e test to check if MHC gets recreated on deletion 2023-03-27 16:55:42 +02:00
Christoph Blecker fe31f43ed2
Merge pull request #2709 from nwnt/add_checkaccess
Add checkaccess Client
2023-03-15 11:33:09 -07:00
Tony Schneider 4d1e66b7a3
determine default storage class from cluster version (#2739) 2023-02-23 14:51:13 +01:00
Spencer Amann 0d50f4148a refactor to consolidate error handling 2023-02-14 15:25:26 -05:00
Spencer Amann cd1329ab47 directly injects hive.ClusterManager to the frontend
adds basic e2e test for new admin api
2023-02-14 15:21:54 -05:00
Christoph Blecker ed88de5d60
Add e2e test to confirm systemData 2023-02-14 07:43:58 -08:00
Nont d20eadb68c Move http mock from Applens to util
So this can be reused by other clients depending on
azure-sdk-for-go.
2023-02-13 17:14:17 -08:00
Christoph Blecker 7b23019cc2
Merge pull request #2696 from cblecker/fix-e2e-clients
Move all e2e tests to use latest API version
2023-02-13 12:22:03 -08:00
Carlo Wisse ad9e41d0a2
Make Admin Portal V2 Default (#2531) 2023-02-13 10:15:43 +10:00
Spencer Amann b5b6dfdb62
Merge pull request #2466 from AldoFusterTurpin/fix/race-conditions
Fix race conditions in Test functions
2023-02-10 10:51:37 -05:00
Christoph Blecker 8b70145ee1
Remove versioned client from disk encryption test 2023-02-08 15:08:49 -08:00
Christoph Blecker 5d5878df9a
Move all e2e tests to use latest API version 2023-02-08 13:29:56 -08:00
Ankur Singh 06f7b8bc57
[Admin Portal]: Add resource ID param in the URL (#2640) 2023-02-08 09:20:46 +10:00
Christoph Blecker 64a3390355
Merge pull request #2661 from cblecker/validation
Add validation and unrestricted endpoint for kubernetes objects
2023-02-02 08:25:55 -08:00
Spencer Amann 3929d6e7a5 fix formatting issue 2023-02-01 15:51:45 -05:00
Christoph Blecker a47d1d3453
Add validation and unrestricted endpoint for kubernetes objects
Use dynamic client to resolve GVRs

use /unrestricted instead of /force
2023-02-01 08:06:01 -08:00
Karan Magdani 7415c1280f
only run hive test in local development mode (#2672) 2023-01-31 16:57:11 +01:00
Petr Kotas 5239172dd9
Update the list of AKS denied regions (#2669)
* Update the list of AKS denied regions

Regions without AKS cluster.

Signed-off-by: Petr Kotas <pkotas@redhat.com>

* Update test/e2e/aks.go

Co-authored-by: Ben Vesel <10840174+bennerv@users.noreply.github.com>

---------

Signed-off-by: Petr Kotas <pkotas@redhat.com>
Co-authored-by: Ben Vesel <10840174+bennerv@users.noreply.github.com>
2023-01-31 14:24:20 +01:00
Petr Kotas d8a3bb8f66
Hide hive config behind localdev flag (#2670)
Signed-off-by: Petr Kotas <pkotas@redhat.com>
2023-01-31 12:51:13 +01:00
Amber Brown 127b0565f1
Migrate E2E to 1ES pool (#2638)
This doesn't include portal tests, those will follow.
2023-01-31 10:10:05 +11:00
Petr Kotas 22e3c0afa0
Hide Hive behind localdev check (#2665)
The Hive tests are not runable in prod environment.

Signed-off-by: Petr Kotas <pkotas@redhat.com>

Signed-off-by: Petr Kotas <pkotas@redhat.com>
2023-01-27 15:09:38 +01:00
Aldo Fuster Turpin 74a523f809 add MUO reconciliation E2E test 2023-01-24 09:10:52 +01:00
Kipp Morris 26f2ab1473
e2e test for Hive-managed ARO clusters (#2631)
* e2e test for Hive-managed ARO clusters

* Added license

* Added checks for ControlPlaneConfig overrides

* Added clusterResourceID, adminAPICluster, and skipIfNotHiveManagedCluster()

* Removed var only used in one place

* Removed package-level admin cluster var
2023-01-20 13:21:07 -05:00
Jeremy Facchetti 3541f51588
simplified aad session timeout and got rid of gob (#2611) 2023-01-18 17:54:39 +01:00
Yehor Naumenko c19247339b
Test hive CreateNamespace in e2e (#2433) 2023-01-18 11:45:46 +01:00
Amber Brown 2876a8e64c
Revert "Database tests are placed in tests/database." (#2629)
This reverts commit 39326bca8c.
2023-01-12 16:40:19 +11:00
Tanmay Satam c4ed4a2090 e2e: redeployvm use deterministic suffix for uptime pod name 2022-12-19 15:46:11 -05:00
Tanmay Satam 306bcd0f91 Update adminapi_redeployvm e2e test to use unique name for each uptime pod 2022-12-19 14:08:18 -05:00
Steven Fairchild 39326bca8c Database tests are placed in tests/database.
httptest is used to send http responses.
Add Mock for databaseaccounts.
Add DatabaseClient, MasterKeyClient interfaces to allow for mock testing.
Add unit tests for subscriptions.
Add billing unit tests.
Add default http.Client to database.go, update references to use DatabaseClient interface. This will keep from importing "net/http" in every package calling it and allow easy changing within database if needed."
Add unit tests for clustermanager in database package
Add asyncoperations unit tests.
Add monitor tests.
Add gateway unit tests.
Add openshiftversions tests.
Add portal tests.
Add openshiftclusters tests.

Tests for billing and subscriptions are placed in test/database to reuse
fake testing code due without import cycling.
2022-12-16 13:03:07 -05:00
Jeremy Facchetti 2ef1d6e6db corrected message as it is used elsewhere too
changes to that message weren't needed
2022-12-12 13:44:09 +01:00
Petr Kotas fe4d0f05eb Disable AKS test as it is not working every where
Signed-off-by: Petr Kotas <pkotas@redhat.com>
2022-12-02 12:12:14 -05:00
Petr Kotas 35f52e1531
Fix AKS shard number and add equalfold
AKS shards start with 1
EqualFold is required because not all regions use lowercase

Signed-off-by: Petr Kotas <pkotas@redhat.com>
2022-12-01 16:27:42 +01:00
Christoph Blecker 5e72bbf319
Merge pull request #2542 from m1kola/e2e_eventually
Migrates rest of the E2Es to use `Eventually` instead of `wait.Poll*`
2022-11-25 11:46:31 -08:00
Petr Kotas c36d0d37fc
Skips AKS tests for defined regions without AKS
Signed-off-by: Petr Kotas <pkotas@redhat.com>
2022-11-24 14:38:30 +01:00
Christoph Blecker 9867fc6249
Merge pull request #2358 from petrkotas/add-aks-kubeconfig-test
Add e2e test for hive kubeconfig
2022-11-23 14:40:00 -08:00
Ellis Johnson eafca5aa99
Fix admin portal go embed (#2541)
* Fixed admin portal v2 navigation and e2e admin portal flakes

Check for docker before running e2e tests

* Assuming docker has failed until proven succeeded

* Made changes based on review feedback
2022-11-16 11:02:17 -08:00
Mikalai Radchuk 0738296121 Moves cluster basic E2E tests to use `Eventually` 2022-11-15 15:48:56 +00:00
Mikalai Radchuk 6d88036c88 Moves kube object actions E2E to use `Eventually` 2022-11-15 14:52:41 +00:00
Mikalai Radchuk 4c7947694c Moves VM redeploy action E2E to use `Eventually` 2022-11-15 14:42:41 +00:00
Mikalai Radchuk c7d3059c0c Moves admin update action E2E to use `Eventually` 2022-11-15 14:14:07 +00:00
Mikalai Radchuk ebf9936a39 Moves get logs action E2E to use `Eventually` 2022-11-15 14:14:07 +00:00
Mikalai Radchuk bbf2c493b4 Moves ARO operator tests to use `Eventually`
This helps with troubleshooting of E2Es as it makes easier
to understand what assertion within the wait code failed.
2022-11-15 13:34:43 +01:00
Petr Kotas d7fa108338
Add e2e test for huve kubeconfig
Signed-off-by: Petr Kotas <pkotas@redhat.com>
2022-11-15 10:55:55 +01:00