Skip to content

Commit df1c915

Browse files
committed
OCM-13019 | feat: Describe Cluster changes for hcpsharedvpc
1 parent 6cf97df commit df1c915

File tree

1 file changed

+23
-7
lines changed

1 file changed

+23
-7
lines changed

cmd/describe/cluster/cmd.go

Lines changed: 23 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -447,13 +447,29 @@ func run(cmd *cobra.Command, argv []string) {
447447
cluster.AWS().STS().OIDCEndpointURL(), managementType)
448448
}
449449
if cluster.AWS().PrivateHostedZoneID() != "" {
450-
str = fmt.Sprintf("%s"+"Private Hosted Zone:\n", str)
451-
str = fmt.Sprintf("%s"+
452-
" - ID: %s\n", str,
453-
cluster.AWS().PrivateHostedZoneID())
454-
str = fmt.Sprintf("%s"+
455-
" - Role ARN: %s\n", str,
456-
cluster.AWS().PrivateHostedZoneRoleARN())
450+
if cluster.Hypershift().Enabled() {
451+
str = fmt.Sprintf("%s"+"Shared VPC Config:\n", str)
452+
str = fmt.Sprintf("%s"+
453+
" - Ingress Private HZ ID: %s\n", str,
454+
cluster.AWS().PrivateHostedZoneID())
455+
str = fmt.Sprintf("%s"+
456+
" - Internal Comms. HZ ID: %s\n", str,
457+
cluster.AWS().HcpInternalCommunicationHostedZoneId())
458+
str = fmt.Sprintf("%s"+
459+
" - Route53 Role ARN: %s\n", str,
460+
cluster.AWS().PrivateHostedZoneRoleARN())
461+
str = fmt.Sprintf("%s"+
462+
" - VPC Endpoint Role ARN: %s\n", str,
463+
cluster.AWS().VpcEndpointRoleArn())
464+
} else {
465+
str = fmt.Sprintf("%s"+"Private Hosted Zone:\n", str)
466+
str = fmt.Sprintf("%s"+
467+
" - ID: %s\n", str,
468+
cluster.AWS().PrivateHostedZoneID())
469+
str = fmt.Sprintf("%s"+
470+
" - Role ARN: %s\n", str,
471+
cluster.AWS().PrivateHostedZoneRoleARN())
472+
}
457473
}
458474
if !isHypershift {
459475
if scheduledUpgrade != nil {

0 commit comments

Comments
 (0)