From 79d007f3839133eaed066331ae14a8272a1f7a48 Mon Sep 17 00:00:00 2001 From: Miguel Soriano Date: Wed, 4 Dec 2024 16:58:15 +0100 Subject: [PATCH] feat: remove explicit properties enabling specific cs provisioner steps Now the steps are enabled by default, and the properties that enable/disable some of them have been renamed --- config/config.msft.yaml | 2 +- config/public-cloud-msft-int.json | 2 +- dev-infrastructure/docs/development-setup.md | 6 ----- internal/ocm/mock.go | 2 +- internal/ocm/ocm.go | 23 +------------------- 5 files changed, 4 insertions(+), 31 deletions(-) diff --git a/config/config.msft.yaml b/config/config.msft.yaml index a3c23838c..2b96431a5 100644 --- a/config/config.msft.yaml +++ b/config/config.msft.yaml @@ -132,7 +132,7 @@ clouds: maestro: imageTag: bc2f131579c6ffc664c15f48c50a9936f1b4a7ce clusterService: - imageTag: ecd15ad + imageTag: 9f7fef3 imageRepo: app-sre/uhc-clusters-service hypershiftOperator: imageTag: 9aca808 diff --git a/config/public-cloud-msft-int.json b/config/public-cloud-msft-int.json index 08bfb9c7a..9442ad136 100644 --- a/config/public-cloud-msft-int.json +++ b/config/public-cloud-msft-int.json @@ -11,7 +11,7 @@ "clusterService": { "acrRG": "global-shared-resources", "imageRepo": "app-sre/uhc-clusters-service", - "imageTag": "ecd15ad", + "imageTag": "9f7fef3", "postgres": { "deploy": true, "minTLSVersion": "TLSV1.2", diff --git a/dev-infrastructure/docs/development-setup.md b/dev-infrastructure/docs/development-setup.md index 73543e09b..3b7a94d24 100644 --- a/dev-infrastructure/docs/development-setup.md +++ b/dev-infrastructure/docs/development-setup.md @@ -393,12 +393,6 @@ Then register it with the Maestro Server "subnet_resource_id": "$SUBNETRESOURCEID", "network_security_group_resource_id":"$NSG" }, - "properties": { - "provisioner_hostedcluster_step_enabled": "true", - "provisioner_managedcluster_step_enabled": "true", - "np_provisioner_provision_enabled": "true", - "np_provisioner_deprovision_enabled": "true" - }, "version": { "id": "openshift-v4.17.0" } diff --git a/internal/ocm/mock.go b/internal/ocm/mock.go index 2081d2517..fc8a690df 100644 --- a/internal/ocm/mock.go +++ b/internal/ocm/mock.go @@ -42,7 +42,7 @@ func NewMockClusterServiceClient() MockClusterServiceClient { func (mcsc *MockClusterServiceClient) GetConn() *sdk.Connection { panic("GetConn not implemented") } func (csc *MockClusterServiceClient) AddProperties(builder *cmv1.ClusterBuilder) *cmv1.ClusterBuilder { - additionalProperties := getDefaultAdditionalProperities() + additionalProperties := map[string]string{} return builder.Properties(additionalProperties) } diff --git a/internal/ocm/ocm.go b/internal/ocm/ocm.go index 6c5dc2fea..3d0929484 100644 --- a/internal/ocm/ocm.go +++ b/internal/ocm/ocm.go @@ -24,27 +24,6 @@ type ClusterServiceClientSpec interface { DeleteCSNodePool(ctx context.Context, internalID InternalID) error } -// Get the default set of properties for the Cluster Service -func getDefaultAdditionalProperities() map[string]string { - // additionalProperties should be empty in production, it is configurable for development to pin to specific - // provision shards or instruct CS to skip the full provisioning/deprovisioning flow. - additionalProperties := map[string]string{ - // Enable the ARO HCP provisioner during development. For now, if not set a cluster will not progress past the - // installing state in CS. - "provisioner_hostedcluster_step_enabled": "true", - // Enable the provisioning of ACM's ManagedCluster CR associated to the ARO-HCP - // cluster during ARO-HCP Cluster provisioning. For now, if not set a cluster will not progress past the - // installing state in CS. - "provisioner_managedcluster_step_enabled": "true", - - // Enable the provisioning and deprovisioning of ARO-HCP Node Pools. For now, if not set the provisioning - // and deprovisioning of day 2 ARO-HCP Node Pools will not be performed on the Management Cluster. - "np_provisioner_provision_enabled": "true", - "np_provisioner_deprovision_enabled": "true", - } - return additionalProperties -} - type ClusterServiceClient struct { // Conn is an ocm-sdk-go connection to Cluster Service Conn *sdk.Connection @@ -66,7 +45,7 @@ func (csc *ClusterServiceClient) GetConn() *sdk.Connection { return csc.Conn } // AddProperties injects the some addtional properties into the CSCluster Object. func (csc *ClusterServiceClient) AddProperties(builder *cmv1.ClusterBuilder) *cmv1.ClusterBuilder { - additionalProperties := getDefaultAdditionalProperities() + additionalProperties := map[string]string{} if csc.ProvisionShardID != nil { additionalProperties["provision_shard_id"] = *csc.ProvisionShardID }