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

440 Коммитов

Автор SHA1 Сообщение Дата
Rajdeep Singh Chauhan 90fde763c3 ARO-4373 update mgmtstorage sdk to 2019-06-01 for disabling allowSharedKeyAccess 2024-06-30 20:38:28 -04:00
Tony Schneider 458b1a4805 fix e2e test 2024-06-17 13:20:43 -05:00
Tony Schneider 9f5b045f3f skip Geneva Logging test if rp is in development mode 2024-06-17 13:20:42 -05:00
Tony Schneider 5974f9fec0 Exclude "Geneva Logging" test 2024-06-17 13:20:42 -05:00
Kipp Morris 31c72522fe
MIWI API endpoints (#3608)
* Add Cosmos DB container for PlatformWorkloadIdentityRoleSets

* Revert change to AKS k8s version - committed by mistake

* Fix bug in converter

When I first wrote the converter, I thought Go would treat the the slice
we `make` few lines above these changes as a slice full of zero-value
structs, but it actually treats it as an empty slice, which led to
out-of-bound issues when I first tried to use this converter to work on
the API endpoints.

* Add the PlatformWorkloadIdentityRoleSetConverter to the API register

* Implement the change feed for role sets in the easiest, most naive way

* Implement the external API endpoint for listing role sets

* Fix a small oversight from earlier on

* Add unit tests for the list endpoint

* Add unit tests for changefeed changes

* Uncomment the static validator

* Fix more slice out of bounds bugs in the converters...

* Add converter and static validator to the admin API register

* Add list and put endpoints

* Fix name of function to match convention

* Fix bug in static validator

I originally wrote the code the way I did so that we could aggregate
errors so that we could provide a better UX in cases where there are
multiple similar errors in the request content. I found while writing
unit tests that aggregating the errors in this way and not wrapping them
in a CloudError causes the RP to return an internal server error instead
of a 400 bad request.

Is there a way we can aggregate the errors and still wrap them in a
CloudError? I'm not sure of the formatting requirements for the text of
CloudErrors.

* Add unit tests for new API endpoints

* Fix typo

* Appease the linter

* Appease the linter

* Add TODO comment re: the number of parameters

* Update static validator to return multiple validation issues at the same time where applicable for better UX

* Add a simple utility function to make semver comparisons of OpenShift minor version more readable

* Log error before returning 500 to user

* Log errors before returning 500 to user

* Improve naming of unit test cases

* Add additional unit test cases
2024-06-06 10:15:44 -04:00
Maitiú Ó Ciaráin 780ee50eb4
s/With*Hook/WithPost*Hook (#3549) 2024-05-07 17:54:42 +02:00
Amber Brown 433da1ea1f clienthelper updates for testing 2024-04-23 13:49:24 +10:00
Maitiú Ó Ciaráin e5339b26b2
Add the GinkgoHelper (#3452) 2024-03-12 17:46:42 +01:00
Maitiú Ó Ciaráin 0eea1ec133
Consolidate e2e logic (#3392)
Consolidate e2e logic
2024-03-12 08:56:18 +01:00
Amber Brown e86100c9ae
Add clienthelper, a replacement for dynamichelper (#3345) 2024-03-12 12:44:53 +11:00
Amber Brown ed94c28346
Update to Go 1.20 (#3429)
* Go 1.20 changes

* go 1.20 does not need the seed randomised by default

* go generate
2024-03-05 18:18:36 +11:00
Tanmay Satam 172741b9e6 Add explicit step to wait for resolv.conf job completion 2024-03-04 12:05:46 -05:00
Tanmay Satam 7a501ebca5 Do not run Azure Host Servicing test in non-development environments 2024-02-22 13:05:49 -05:00
Amber Brown f0611becb1 fix linting errors that become noisier in go 1.20 2024-02-20 13:56:18 +11:00
Maitiú Ó Ciaráin b359efd540
Wrap K8s client in E2E with retry logic (#3366) 2024-02-07 15:28:37 -05:00
Srinivas Atmakuri 6e8e4e1870
HiveNamespace to use docID/clusterID for new Installs (#2992)
HiveNamespace currently uses aro-<uuid>, this change is an effort
to unify UUIDs accross cluster doc instead of having multiple,
by pointing HiveNamespace to docID so this can be leveraged later.

More Details: https://redhat-internal.slack.com/archives/C02ULBRS68M/p1686806655273309
2024-02-05 12:45:28 +11:00
Kipp Morris d11a633a2e
Add E2E test for host servicing (#3334) 2024-01-31 10:52:20 -05:00
Kipp Morris 087e40929a
Hopefully fix E2E flake related to deletion of a test Service (#3336)
* Wrap Delete call in Eventually to hopefully prevent flakes where Service deletion fails

* Simplify logic and properly handle the case where the Service is not
found during the delete call

* After deleting the Service, confirm that it's gone
2024-01-31 10:52:00 -05:00
Matthew Barnes 809041fe2e
Move default openshift version (#3094)
* api: Avoid referencing DefaultInstallStream in tests

* frontend: Avoid referencing DefaultInstallStream

The frontend's OpenShiftVersions change feed handler will record
the current default version for the rest of the frontend to use.

* monitor: Remove latestGaMinorVersion metric

The RP no longer has this information internally, so the metric
is no longer relevant.

* update_ocp_versions: Read versions from an environment variable

Read OpenShift versions and pull specs from an OPENSHIFT_VERSIONS
environment variable containing a JSON object. This data includes
the default OpenShift version for new installs that don't specify
a version.

This moves us toward eliminating hard-coded OpenShift versions in
pkg/util/version/const.go.

* cache_fallback_discovery_client_test.go: Hard-code version

I'm not sure what to do with this test.  Install stream data has
moved to RP-Config, so if the test is worth keeping then I guess
the oldest supported version will have to be hard-coded and kept
up-to-date.  But it probably won't be.

* version: Remove DefaultInstallStreams

DefaultInstallStream will remain for now, but it's ONLY for use by
local development mode until we can come up with a better solution.

---------

Co-authored-by: Matthew Barnes <mbarnes@fedorapeople.org>
2024-01-18 13:20:03 -07:00
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