Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add nodes outbound type and enable some of the provision steps by default in CS #961

Merged
merged 2 commits into from
Dec 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion config/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ clouds:
imageTag: bc2f131579c6ffc664c15f48c50a9936f1b4a7ce
# Cluster Service
clusterService:
imageTag: 6157c57
imageTag: 9f7fef3
imageRepo: app-sre/uhc-clusters-service
# Hypershift Operator
hypershiftOperator:
Expand Down
2 changes: 1 addition & 1 deletion config/public-cloud-cs-pr.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"clusterService": {
"acrRG": "global",
"imageRepo": "app-sre/uhc-clusters-service",
"imageTag": "6157c57",
"imageTag": "9f7fef3",
"postgres": {
"deploy": true,
"minTLSVersion": "TLSV1.2",
Expand Down
2 changes: 1 addition & 1 deletion config/public-cloud-dev.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"clusterService": {
"acrRG": "global",
"imageRepo": "app-sre/uhc-clusters-service",
"imageTag": "6157c57",
"imageTag": "9f7fef3",
"postgres": {
"deploy": true,
"minTLSVersion": "TLSV1.2",
Expand Down
2 changes: 1 addition & 1 deletion config/public-cloud-personal-dev.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"clusterService": {
"acrRG": "global",
"imageRepo": "app-sre/uhc-clusters-service",
"imageTag": "6157c57",
"imageTag": "9f7fef3",
"postgres": {
"deploy": false,
"minTLSVersion": "TLSV1.2",
Expand Down
6 changes: 0 additions & 6 deletions dev-infrastructure/docs/development-setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
Expand Down
2 changes: 1 addition & 1 deletion internal/ocm/mock.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

Expand Down
23 changes: 1 addition & 22 deletions internal/ocm/ocm.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
}
Expand Down
Loading