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

385 Коммитов

Автор SHA1 Сообщение Дата
bennerv 07c22dbdec Clean up unused contexts 2024-10-23 09:08:19 -04:00
Steven Fairchild f7404a1877
Hive version bump to resolve RHSA-2024:5535 (CVE-2023-6597) (#3893)
* Updated hive apis module to 986c5efa21

* Update hive cmd/mirror to use hive image tag 986c5efa21
2024-10-09 14:56:49 -04:00
Tanmay Satam 392302529c Bump baseline OCP release artifact mirroring version to 4.12 2024-10-03 09:52:03 -04:00
kimorris27 a06aa0a3d2 Use Go 1.21.13 instead of 1.21.11 (Uber mockgen needs >= 1.21.12) 2024-09-26 09:00:11 -05:00
Kipp Morris e3cec21b73
Lay groundwork for cluster MSI usage (#3757)
* Add a parameter for enabling Entra ID RBAC on key vaults
* Add an RP-level feature flag for determining whether to use the mock MSI RP
* Tweak the mock identity URL to play nicely with the mock MSI RP
* Add Azure SDK client wrappers for new clients (federated identity credentials control plane and key vault data plane)
* Vendor in new Azure SDK clients and update msi-dataplane

* Lay groundwork for use of cluster MSI...
- Initialize the MSI dataplane client, using the mock MSI RP/stub if
  appropriate
- Initialize key vault store client (for MSI certificates; functionality
  is implemented in MSI dataplane module)
- Create a cluster MSI certificate and store it in the key vault during
  cluster bootstrap
- Instantiate an Azure SDK FederatedIdentityCredential client using the
  cluster MSI certificate
- Delete the cluster MSI certificate as needed during cluster deletion

* Don't fail during cluster deletion if the cluster MSI certificate is
already gone from the key vault (or was potentially never created)

* Establish an RP-Config variable for the MSI RP endpoint

- Update doc comment for ensureClusterMsiCertificate
- Simplify conditional logic in MSI cert deletion

* Use pointer conversion functions that aren't deprecated

* Respond to PR comments (and fix some other things along the way)

- Move `clusterMsiResourceId` function to `OpenShiftCluster` type
- When persisting the MSI cert to KV, use the `NotAfter` returned by the MSI RP (for the stub, just use an arbitrary value)
- Move `getClientOptions` functionality to `AROEnvironment` type
- Move logic for determining cluster MSI key vault name to `pkg/env`
- Pull cloud name mapping stuff out to `AROEnvironment` type
- Update msi-dataplane module to include new changes and use `UserAssignedIdentities` type to get Azure credential in `pkg/cluster/clustermsi.go`
- Fix typo in https URL in comment in `pkg/cluster/delete.go`
- Implement suggestion to use `errors.As` instead of a type assertion in `pkg/cluster/delete.go`

* Update documentation with info about new feature flag

- Move new cluster MSI steps forward in bootstrap step order
- Move MSI dataplane client options stuff to pkg/env
- Explicitly check for a single cluster MSI in `ClusterMsiResourceId`
- Other small tweaks

* Vendor in msi-dataplane update that prevents a potential nil pointer dereference

* Add missing method to internal key vault client

* Make error messages more specific in ClusterMsiResourceId

* Add missing env vars to run-rp make target and uncomment dynamic validation bootstrap step

- In newly added Azure clients, return struct types instead of interface
  types
- Move cluster MSI certificate deletion to be after Azure resource
  deletion for safety just in case cx continues to use cluster that is
  in Failed/Deleting provisioning state

* Add new env vars for MIWI to env.example for clarity/completeness

* Turn check for nonzero number of user assigned identities into a utility function

* Use existing constant for key vault dns suffix
2024-09-24 08:14:56 -04:00
Rajdeep Chauhan 66f073f205
Dynamic validation for workload identity permissions and requirements (#3619)
* ARO-4376 Track2 authorization api addition for roledefinitions

* ARO-4376 add a stringutil funcs

* ARO-4376 use dbPlatformWorkloadIdentityRoleSets to get platform identity roles for cluster version

* ARO-4376 add dynamic validation for platformworkloadidentityprofile

* ARO-4376 resolve initial comments

* ARO-4376 refactor error messages and checkaccess action crosscheck

* ARO-4376 Add unit tests and comments resolution

* ARO-4376 add validation for upgradeableTo

* ARO-4376 Comment resoultion and additional unit tests

* ARO-4376 minor version comparison handling

* ARO-4376 update permission error messaging handling for MIWI

* ARO-4376 update constructors to return non-interface type

* ARO-4376 add unit tests for GroupsIntersect

* ARO-4376 update generate files to support bingo
2024-09-10 16:32:25 -04:00
Amber Brown bd9af03917
Only perform machineconfig reconciliation during OpenShift upgrades (#3473) 2024-09-10 18:24:46 +10:00
Brendan Bergen c2da97aa53
Correct testing/time issues in pkg/deploy (#3808)
- Percolate up the time to wait for LB healthcheck probes, test @ 0 sec
- Correct a context timeout test case, test @ 0 sec timeout
2024-09-04 11:26:50 -06:00
Maitiú Ó Ciaráin 2f651e7ef0
Merge pull request #3781 from Azure/lranjbar/ARO-9570-udr-etchosts-operator-patch
ARO-9570: Add a controller to the ARO operator to lay down etchosts
2024-08-28 14:43:19 +02:00
Lisa Rashidi-Ranjbar 7361eae36c ARO-9750: Add a controller to create the etchosts machineconfigs if they dont exist 2024-08-22 13:25:24 -07:00
Brendan Bergen 92a8bfcc15
Containerized portal as it runs in prod, locally (#3745)
- creates a new make target to run the Portal app containerized
- updates portal addresses to work with podman machine
- adds docs
2024-08-21 09:21:45 -06:00
Steven Fairchild d874268829
Update hive image to tag bdf9d08a06 (#3770)
hive:bdf9d08a06 uses github.com/openshift/hive git commit bdf9d08a060abf558ca60e014123bf9278f58b4b.
2024-08-14 08:21:03 -04:00
Rajdeep Chauhan a16e7e8799
ARO-4373 fix oidcstorageaccount var validation (#3743) 2024-07-31 13:01:39 -04:00
Nicolas Ontiveros ce31826325
Update Go to 1.21 (#3698)
* Update ci-go

* Update go toolset

* Update prepare shared rp dev

* Update prepare your dev

* More 1.21 updates

* more changes

* save work

* test

* tidy up

* Add license to typealker test
2024-07-18 17:35:06 +10:00
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
Amber Brown 31af734103
[ARO-5368] Try and log the VM info + console log on failure (#3629)
Dumps the VM info + console logs on failure so that we don't need to run the Geneva Action or have the control plane still around to get it. Also refactors frontend and geneva action to make use of the same code path.
2024-07-15 16:32:23 +10:00
Tanmay Satam 1b6e0e7584
Add controller to disable CPMS on ARO clusters (#3660)
* Update openshift/api to release-4.12

* Add machinev1 resources to scheme

* Add CPMSDeactivatorEnabled flag

* Add CPMS Deactivator operator controller

* Add controlplanemachinesets to system:aro-sre ClusterRole

* Use better naming convention for CPMS controller flag

* Change debug log messages to info

* Make CPMS controller exit early if clusterversion < 4.12

* Only setup CPMS controller on clusters with machinev1 API

This is necessary in order to Watch the CPMS resource - this operation will fail on
clusters that do not support the Machine V1 API (OCP <= 4.11), causing controller
setup to fail. Since these clusters do not have a CPMS resource to manage, we can
safely skip running this controller on those clusters.

* Fix CPMS controller name
2024-07-12 12:38:39 -06:00
cadenmarchese f2d528d6b9 rename existing var with incoming 2024-07-09 08:47:22 -04:00
cadenmarchese 18c632f33b remove code comments 2024-07-09 08:47:22 -04:00
cadenmarchese 7ca11f46df address comments 2024-07-09 08:47:22 -04:00
cadenmarchese e6f5d87402 unmarshal PlatformWorkloadIdentityRoleSetProperties instead 2024-07-09 08:47:22 -04:00
kimorris27 ab3d3ef810 Tweak script to read in a list of role sets from env var (as opposed to
just one role set)

Also removed a function I found to be unnecessary and tweaked some of
the documentation comments.
2024-07-09 08:47:22 -04:00
kimorris27 9f664c0075 Fix a few nits 2024-07-09 08:47:22 -04:00
cadenmarchese a51d0f3d3e new cmd to populate role sets in prod 2024-07-09 08:47:22 -04:00
Steven Fairchild a69a16029e Bump Hive Image to commit b1ac27b248159f179abf8c7e03e6ada5f17e86c0 - ARO-5063
Update default hive commit for config script
2024-07-08 13:11:43 -07:00
Rajdeep Singh Chauhan 42daa82815 ARO-4373 resolve comments and parameter fixes 2024-06-30 20:38:28 -04:00
Or Raz f384df3f24
Add ose-tools-rhel8 for 4.15 (#3649)
ose-tools image is used for troubleshooting scenarios in the wiki, as it comes with the oc client and a few handy tools for investigations.
2024-06-28 14:07:13 +02: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 7a568dbad1 removed all the references of dbtoken 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
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
Tanmay Satam 7f79db4220 Remove Geneva image mirroring from aro mirror 2024-06-06 09:11:52 -04:00
Steven Fairchild 08ebcf1631 Revender hive to commit d7ead609f495785360aeea7c318f28fe82f9bcbf 2024-06-06 08:55:00 -04:00
Steven Fairchild 24f43d8b6a
Revendor Hive Dependencies - ARO-5061 (#3578)
* Revender Hive Dependencies - ARO-5061

Revendering Hive Dependencies against hive commit git, commit 83aedb9f6e73f9668a3b96025c97052bfb1e5282, built at 2024-05-10T15:02:58Z

* Revender hive dependencies
2024-05-15 12:31:13 -04:00
Amber Brown bcc67cff1e
Sync go-toolset 1.20.12 (#3495) 2024-04-16 11:40:15 +10:00
Maitiú Ó Ciaráin 422e209045
Use the correct MDSD image (#3516) 2024-04-11 12:27:44 +02:00
Tanmay Satam 162164ea66
Update azure-cli coordinates in mirror (#3501) 2024-04-04 17:52:37 +02:00
Tanmay Satam fb41688ea3
MDM/MDSD/Fluentbit Image Bumps (#3493)
* Update mdm/mdsd/fluentbit coordinates to latest versions

* make generate
2024-04-04 10:55:09 +02:00
Miguel Abad Perez 5d6caf2d95
Return image mirroring errors to calling function (#3485) 2024-03-28 11:21:30 +01:00
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
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
Kipp Morris 8ee1b531ef
2024-08-12-preview API skeleton (#3419) 2024-02-29 12:37:28 -05:00
Steven Fairchild b628965f18 Mirror hive revender images
Fixes [ARO-5059](https://issues.redhat.com/browse/ARO-5059)
2024-02-12 14:59:41 -05:00
Jory Horeman 3abcd30e5b
2023-11-22 stable API (porting 07-01-preview api) (#3300)
* adding 2023-11-22 stable

---------

Co-authored-by: b-jhoreman <b-jhoreman@microsoft.com>
2024-01-18 14:15:38 -07: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