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

4365 Коммитов

Автор SHA1 Сообщение Дата
Sanjana Lawande 2bdff21a20 apply suggestions from code review 2024-10-15 15:18:24 -07:00
Sanjana Lawande 8b1e24a3e9 apply suggestions from code review 2024-10-15 15:15:36 -07:00
Sanjana Lawande 3388299fde apply suggestions from code review 2024-10-15 15:03:51 -07:00
Sanjana Lawande 53185d542b fix unit tests 2024-10-15 15:03:51 -07:00
Sanjana Lawande a397b76f60 add unit tests 2024-10-15 15:03:51 -07:00
Sanjana Lawande 676895f4ab correct convention for OIDC Issuer URLs 2024-10-15 15:03:51 -07:00
Jory Horeman 6109d70e74
adding DDS family sku support (#3712)
Co-authored-by: b-jhoreman <b-jhoreman@microsoft.com>
2024-10-15 16:34:53 -04:00
Andrew Denton 1de0f5cd74
Add aro operator deployment logging (#3800) 2024-10-14 13:41:38 -04:00
Andrew Denton 9684d43350
Check machine status and log details if it is not running (#3887)
* Check machine status and log details if it is not running

* Resolve comments from review
2024-10-14 13:40:25 -04:00
Ayato Tokubi 0e0667e176
fix subscription ID of clients (#3902) 2024-10-14 13:03:29 +02:00
Kipp Morris a1029af1d1
Restore federated identity credential client mocks that were inadvertently overwritten (#3899) 2024-10-11 09:31:41 -04:00
Rajdeep Chauhan 16834d8ddd
Fix Managed Identity Cluster creation dynamic validation flow (#3891)
* Fix Dynamic Validation Flow for Workload Identity

* fix the mock msi object id export

* Remove unwanted code

* update OIDC_STORAGE_ACCOUNT_NAME local env setup

* ARO-11049 resolve comments
2024-10-10 14:12:06 -04:00
Ayato Tokubi 69378fb634
SDK2: Replace SDK to new one in util/cluster (#3884)
* add subnets.List

* remove deprecated nsg & subnets client from util/cluster

* add routetable client

* remove deprecated route tables client from util/cluster

* add virtual network peerings client

* remove deprecated virtual network peerings from util/cluster

* remove the rest usage of mgmt network sdk

* remove unused sdk wrappers
2024-10-04 13:35:30 -04:00
Kipp Morris 1a51bf4f8b
Regenerate certain mocks using source mode instead of reflect mode to (#3886)
fix issues with `make generate` on MacOS
2024-10-04 10:29:41 -07:00
Kipp Morris 3ba0b23251
Hotfix - MSI RP endpoint env var (#3881)
* Add missing RP-Config param to RP deploy ARM template

* Plumb msiRpEndpoint ARM parameter through to RP environment variable

* Regenerate RP ARM template

* Remove duplicated MSI_RP_ENDPOINT envvar in RP env

* Add env var to aro-rp.service startup

* Regenerate RP ARM template

---------

Co-authored-by: Tanmay Satam <tsatam@redhat.com>
2024-10-04 10:39:28 -04:00
Ben Vesel a02490750f
Merge pull request #3877 from Azure/tsatam/ARO-4374-provide-boundsasigningkey-secret-to-hive-install
MIWI - Provide boundServiceAccountSigningKey secret to Hive Install
2024-10-04 09:32:22 -04:00
Tanmay Satam f83191f35c
Populate ClientID and ObjectID of cluster and platform workload identities (#3860)
* Add new clusterIdentityIDs manager function

* Add clusterIdentityIDs step to install for WI clusters

* Add new client wrapper for armmsi UserAssignedIdentitiesClient

* Add userAssignedIdentities client to cluster manager

* Add new platformWorkloadIdentityIDs manager function

* Add platformWorkloadIdentityIDs step to install for WI clusters

* Do not allow clusterIdentityIDs to be called for a CSP cluster

* Perform all clientID/objectID enrichment before dynamic validation

* Return UserAssignedIdentitiesClient implementation instead of interface in constructor

* Use cluster MSI credentials for userAssignedIdentities client

This requires moving client instantiation from the cluster manager constructor to the
initializeClusterMsiClients install step.

* Extract ExplicitIdentity access/handling in clustermsi to common function

* Preserve passed-in casing on cluster identity resource IDs

* Actually use extracted identity from getSingleExpectedIdentity

* Clarify purpose of getSingleExplicitIdentity function

Adds a comment and unit tests indicating its usage
2024-10-03 17:10:06 -04:00
Tanmay Satam 1365a79eb7 Update Hive Install process to put down boundSASigningKey secret if needed 2024-10-01 14:01:06 -04:00
Tanmay Satam be4a48a17e Add function to generate boundSASSigningKey Secret resource for Hive cluster deployment 2024-10-01 13:50:28 -04:00
Ayato Tokubi 84816de0e4
SDK2: Remove deprecated network sdk from e2e. (#3859)
* subnets
* remove deprecated security group usage from e2e setup
* remove deprecated interface sdk from e2e.
* remove deprecated loadbalancer sdk from e2e.
* remove deprecated virtual networks sdk from e2e.
* remove deprecated subnets sdk from e2e
2024-09-27 20:44:06 +02:00
Kipp Morris 7e77b101ce
Cluster MSI follow-up (#3864)
* Generate mocks for Azure clients added in cluster MSI PR

* Add other small changes in response to previous PR feedback:

- Get subscription ID from subscription doc instead of a platform MI
- Remove an unused mock controller
2024-09-26 16:35:08 -04:00
Hilliary Lipsig e985b50ffb
Merge pull request #3863 from Azure/kimorris27/ARO-4360-move-to-uber-mock-fork
Move to Uber mock/mockgen fork
2024-09-26 12:18:07 -07:00
Ben Vesel 7859644051
Remove podman network causing outbound latency (#3865) 2024-09-26 10:13:09 -04:00
kimorris27 7448b3db41 `make validate-go` to format stuff and make CI happy 2024-09-26 09:00:11 -05:00
kimorris27 d50158cd9c Properly generate mocks for two Azure cilents
Mocks for these interfaces were previously present, but if you remove them and make generate, they don't get replaced. I'm guessing that when they were added, the committer forgot to commit their changes to the generate.go files. This came to my attention as I was moving us over to the Uber fork because it caused errors while I was trying to get builds and unit tests working, so I codified the generation properly in this commit.
2024-09-26 09:00:11 -05:00
kimorris27 265d40155c Remove duplicated import of the Uber fork (leftover from the few minutes when we were using both repos at the same time 2024-09-26 09:00:11 -05: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
kimorris27 086f532624 Replace all references to the golang mock repo with references to the
Uber fork, then `go mod tidy` and `go mod vendor`

Note the change to `deps.go`
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
Ayato Tokubi e887b35655
[ARO-4665] SDK2: remove deprecated network SDK from purge.go (#3858)
* remove deprecated security group usage from purge

* remove deprecated private link services sdk from purge.go
2024-09-24 12:28:16 +10:00
Ayato Tokubi 35b2881aaa
Remove deprecated securityGroup client (#3853) 2024-09-20 18:26:16 +02:00
Ayato Tokubi b0518e7bb0
Update SDK to track2 in ensureGatewayCreate (#3616)
* use track2 sdk in ensureGatewayCreate
* delete unused fields in cluster
2024-09-20 17:42:00 +02:00
Jory Horeman 68bc93250c
Scaffolding for CI environment setup in Azure (#3838)
* adding CI dev template files and scripts
2024-09-19 09:42:39 -06:00
Alex Chvatal 1a2096dfc4
ARO-9382 prevent updating existing platform identities (#3786)
* prevent updating existing platform identities

This adds a check to v20240812preview static validation that raises an
error if either the name or resource ID of an existing platform identity

* allow changing operator identity order

This allows changing the order of platform identities while still
preventing the resource ID and operator name from being changed

* additional platform identity update validation

This prevents removal of a platform identity or changing the identity's
OperatorName and ResourceID at the same time

* detect duplicate operator names in platform workload identity profiles

* use a map instead of a slice
2024-09-18 09:48:34 -04:00
Alex Chvatal bd47ae7abf
ARO-4639 update the operator master deployment to support workload identity (#3776)
* update the operator master deployment to support workload identity

This causes the spec for the operator master deployment to mount the
service account token as a volume, and maps the path to the environment
variable expected by Azure to support workload identities

* remove unused ExpectError value from test struct

* mount the token secret as a directory, not a file
2024-09-18 08:38:02 -04:00
Steven Fairchild aebd2bb504
Remove dnf cronjob (#3840)
* Remove dnf update cron job

Automatic OS Updates are configured. Updating packages via a cron job is no longer required.

* Remove certs arg from verify_role, Add/Remove comments

Certificate generation has been broken up into a named function for each VMSS role. This means it's no longer necessary to provide the certs=true argumenet when checking VMSS roles.

Add a comment for why AZURE_CLOUD_NAME returns an error if unset.
Remove az cli login comment from pull_container_images, it is no longer relevant after the last refactor.
2024-09-17 12:12:21 -07:00
Rajdeep Chauhan 1e3f475416
ARO-4518 pass custom manifests(MIWI) to hive cluster deployment as secret (#3841)
* ARO-4518 pass custom manifests to hive cluster deployment as secret

* ARO-4518 add unit test cases
2024-09-17 10:30:45 -04:00
Hilliary Lipsig 48ff446de4
Merge pull request #3837 from Azure/lranjbar/ARO-9990-etchosts-mimo-m0
ARO-9990: Update etchosts controller to use ForceReconcilation flag
2024-09-16 17:18:58 -07:00
Tanmay Satam 73bc5f68f3
MI/WI - Generate secrets for platform identities (#3802)
* Add secret location to PlatformWorkloadIdentityRoleSet

* Add generatePlatformWorkloadIdentitySecrets function

* Add mutable:true validate:required struct tags to SecretLocation fields on admin api

* Add functions for other required WI resources

* Remove redundant UsesWorkloadIdentity check from generatePlatformWorkloadIdentitySecrets

* Fix coordinates for static CCO secret; move static coordinate strings to const values

* Return resources as map (w/ filename as key) instead of list

* Explicitly set TypeMeta on workload identity resources

This is needed in order to easily serialize these resources to YAML,
e.g. when setting them as string values in a Secret map for Hive to use
as an install manifest. Not setting these values will result in them being
omitted from the resulting JSON/YAML.
2024-09-13 10:03:45 -04:00
Tony Schneider 9584d669b6
generalize secret storage deployment and update shared rp documentation (#3828)
* generalize secret storage account deployment template
* update secret storage deployment step
2024-09-13 18:14:38 +10:00
Hilliary Lipsig 9564d81f94
Merge pull request #3835 from stevekuznetsov/skuznets/bump-enumer
.bingo: use a fork of enumer for compat
2024-09-12 15:57:49 -07:00
Amber Brown 4d538c1503
Bump admin portal dependencies for Sept 24 (#3833)
* bump "send"

* update semver portal deps

* build portal
2024-09-12 13:58:30 -04:00
Lisa Rashidi-Ranjbar 3762a791fe ARO-9990: Update etchosts controller to use ForceReconcilation flag 2024-09-12 09:49:10 -07:00
Steve Kuznetsov 2780c18ecd
*: update generated enumerations
Signed-off-by: Steve Kuznetsov <stekuznetsov@microsoft.com>
2024-09-11 06:56:15 -06:00
Hilliary Lipsig fa7af61f57
Merge pull request #3818 from Azure/lranjbar/ARO-10003-etchosts-managed-flag
ARO-10003: Add managed flag to etchosts controller
2024-09-10 16:33:39 -07: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
Lisa Rashidi-Ranjbar 89be0b2e96
ARO-10003: Add managed flag to etchosts controller 2024-09-10 11:19:01 -07:00
Amber Brown bd9af03917
Only perform machineconfig reconciliation during OpenShift upgrades (#3473) 2024-09-10 18:24:46 +10:00
Amber Brown 44bc3cc724
[MIMO] Move cluster certificate functionality to ClientHelper (#3736)
* move over TLS applying, as well as some clienthelper work
2024-09-05 15:44:46 +10:00
Amber Brown c554e98391
Drop some unneccessary dependencies by moving to `bingo` for tooling (#3719)
* Move to using bingo for tools
* go mod vendor
2024-09-05 15:29:19 +10:00