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

51 Коммитов

Автор SHA1 Сообщение Дата
Amber Brown f1fbd0feb2
Try and get the NewMonitor/Frontend/etc mess under control (#3690)
* make a db wrapper

* add the other fields

* mechanical changes

* instantiate

* remove clustermanager code

* implement in portal too
2024-07-18 08:25:32 +10:00
Amber Brown 81f22cb8c8
Clean up some duplicated code in cmd/ (#3648)
* move some repeated code into pkg/util/service/

* cleanups in cmd/aro

* update_ocp_versions does not need AEAD

* cache the authorisers rather than recreating them

* env mock updates

* move stuff around from review
2024-07-17 16:29:39 +10:00
Anshul Verma b8ed0da73f added scope to be of the database rather than the whole cosmosdb account 2024-06-11 22:24:46 +05:30
Anshul Verma ce4e04bd6e corrected the new database client methods for components. 2024-06-11 22:24:46 +05:30
Anshul Verma 8928e025b2 createUpdateTriggers were taking time. Reduced poll fequency time 2024-06-11 22:24:45 +05:30
Anshul Verma 6a6dc9a9c2 Previously missed changing triggers logic for monitor, added it 2024-06-11 22:24:45 +05:30
Anshul Verma ca06e6de0f fixed usgov scope thing, also changed few things. 2024-06-11 22:24:45 +05:30
Anshul Verma 49f572ae6e removed generate issues 2024-06-11 22:24:45 +05:30
Maitiú Ó Ciaráin 07672dde9c
Switch to using the secondary key (#3427)
* Switch to using the secondary key

* Documentation update

* Log the name of the key used

* Pass log arg through

* Fix import ordering

* Shorten line
2024-03-21 11:28:58 -04: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
Amber Brown b4e8930830
Make env know what the service component its running is (#3254)
* make env know what the service component its running is

* regen mocks
2024-01-17 15:17:14 +11:00
Nont e7f514086d
Migrate documentdb client from sdk track 1 to track 2 client (#3255)
* Create documentdb track 2 client and mockgen

* Replace track 1 documentdb with track 2

* Refactor per comments

* Delete unused client

* Fix generated env mocks
2023-11-17 15:34:17 -05:00
nont 9c30a16b1c Plug NSG monitoring to mon.WorkOne 2023-10-27 09:51:40 -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
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 4d264806a2 pkg/env: Port to azidentity 2023-04-11 16:32:49 -04: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
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
Amber Brown d9e63cceb8
[M4/M5/M6] Read Hive kubeconfig from AKS live (#2325) 2022-08-23 17:09:53 +02:00
Ulrich Schlueter d6722882e9
Monitor Hive ClusterDeployment conditions (#2175)
Co-authored-by: Ulrich Schlueter <uschlueter@redhat.com>
2022-07-27 11:21:45 +01:00
Ulrich Schlueter 5bb1018ad4
Add an option to send metrics via UDP instead of Unix Domain Sockets (#2074) 2022-05-31 11:08:55 +01:00
Jim Minter 9b3c4383a4 add encryption.multi 2021-09-10 11:26:20 -04:00
Jim Minter 6aecbe085a add GetBase64Secrets 2021-09-10 11:26:20 -04:00
Jim Minter fcc0db8cf0 forward Go prometheus metrics to MDM 2021-08-19 10:36:45 -04:00
Jim Minter 7dde80a432 remove NewMSIAuthorizer call from pkg/database 2021-05-11 11:48:19 -04:00
Jim Minter dc1c23f046 generalise rpauthorizer to msiauthorizer 2021-05-11 11:48:19 -04:00
Jim Minter 31fbebea89
update NewDatabaseClient to new go-cosmosdb API 2021-04-26 13:56:49 -05:00
Jim Minter 81229ae196
for clarity, rename IsDevelopmentMode -> IsLocalDevelopmentMode 2021-04-23 10:25:46 -05:00
Jim Minter 10554999eb
remove pkg/util/deployment and revert to isDevelopment bool 2021-04-08 09:12:13 -05:00
Jim Minter d68fda1888
noop fixup imports 2021-03-02 13:17:01 -06:00
Jim Minter a452396af6
move *KeyVaultSuffix to env 2021-02-09 08:52:28 -06:00
Jim Minter 5cf4ea12cd
remove unused error return 2021-01-04 09:13:40 -06:00
Jim Minter 7a14788cea
renames:
cipher -> aead
  encrypt/decrypt -> seal/open
  aeadCipher -> xChaCha20Poly1305
2020-12-14 11:18:57 -06:00
Jim Minter 17d4f2d663
remove key vault autodiscovery 2020-11-19 07:54:22 -06:00
Jim Minter c2888e0dab
remove service keyvault from env.Core 2020-11-19 07:54:22 -06:00
Jim Minter e80ffcffbf
remove env.GetBase64Secret from pkg/util/encryption 2020-11-19 07:53:25 -06:00
Jim Minter 975819e1e8
upgrade-related code fixes 2020-11-06 11:35:58 -06:00
Jim Minter 5f5713ec7a
remove database.Database 2020-10-08 09:41:18 -05:00
Jim Minter 8cf6c9dbe7
internalise uuid into database clients 2020-10-08 09:41:18 -05:00
Jim Minter 2503d1f09c
remove pkg/env from pkg/monitor 2020-10-08 09:41:17 -05:00
Jim Minter b663e73cb2
pull out deployment.Mode 2020-09-25 09:21:23 -05:00
Amber Brown 09b8718f01 Add definitions to Type for interface, remove RP_MODE checks, and regenerate mocks 2020-08-07 15:18:04 +10:00
Mikalai Radchuk e201718d90
Adds pagination to API 2020-04-07 19:07:19 -05:00
Jim Minter 572577df94
add missing environment variable validation 2020-03-04 20:27:04 -06:00
Jim Minter 195b5f55a4
pull tracing metrics up so that clusterm does not register them 2020-03-03 15:18:39 -06:00
Jim Minter cbd4d04083
split service and cluster monitoring 2020-02-25 18:51:14 -06:00
Jim Minter 7f39d125e1
make statsd backend asynchronous 2020-02-24 20:26:41 -06:00
Jim Minter edd02eacbe encryption fixups:
* pass cipher into database.NewDatabase, rather than bool
* unexport as much as possible
* remove backwards-compatibility and "read without key" options for now, adds too much complexity
2020-02-10 07:50:26 +00:00
Mangirdas Judeikis 468621f73c add encrypt pkg 2020-02-07 09:37:41 +00:00
Mangirdas Judeikis d36f0e72c6 add cosmosdb metrics 2020-01-25 09:05:37 +00:00