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

MULTIARCH-3882: Support PER solution for powervs platform via transit gateway #3277

Merged
merged 2 commits into from Feb 2, 2024

Conversation

dharaneeshvrd
Copy link
Member

More about PER: https://cloud.ibm.com/docs/power-iaas?topic=power-iaas-per

What this PR does / why we need it:

Which issue(s) this PR fixes (optional, use fixes #<issue_number>(, fixes #<issue_number>, ...) format, where issue_number might be a GitHub issue, or a Jira story:
Fixes #

Checklist

  • Subject and description added to both, commit and PR.
  • Relevant issues have been referenced.
  • This change includes docs.
  • This change includes unit tests.

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Dec 4, 2023
@openshift-ci-robot
Copy link

openshift-ci-robot commented Dec 4, 2023

@dharaneeshvrd: This pull request references MULTIARCH-3882 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.15.0" version, but no target version was set.

In response to this:

More about PER: https://cloud.ibm.com/docs/power-iaas?topic=power-iaas-per

What this PR does / why we need it:

Which issue(s) this PR fixes (optional, use fixes #<issue_number>(, fixes #<issue_number>, ...) format, where issue_number might be a GitHub issue, or a Jira story:
Fixes #

Checklist

  • Subject and description added to both, commit and PR.
  • Relevant issues have been referenced.
  • This change includes docs.
  • This change includes unit tests.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@openshift-ci openshift-ci bot added area/cli Indicates the PR includes changes for CLI area/documentation Indicates the PR includes changes for documentation area/testing Indicates the PR includes changes for e2e testing and removed do-not-merge/needs-area labels Dec 4, 2023
Copy link

netlify bot commented Dec 4, 2023

Deploy Preview for hypershift-docs ready!

Name Link
🔨 Latest commit e558df6
🔍 Latest deploy log https://app.netlify.com/sites/hypershift-docs/deploys/65bbaa2362108100083451ed
😎 Deploy Preview https://deploy-preview-3277--hypershift-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@dharaneeshvrd
Copy link
Member Author

/retest-required

@dharaneeshvrd
Copy link
Member Author

/cc @mkumatag

@openshift-ci openshift-ci bot requested a review from mkumatag December 5, 2023 04:55
@csrwng
Copy link
Contributor

csrwng commented Dec 11, 2023

Can you please separate the vendor file changes into a separate commit?

@dharaneeshvrd dharaneeshvrd force-pushed the add-transit-gw branch 2 times, most recently from 9fcb772 to 962131f Compare January 9, 2024 04:31
VPCSubnet string
Debug bool
RecreateSecrets bool
UsePER bool
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These fields are increasing, lets start adding comments for these fields to have better understanding

@@ -50,6 +51,9 @@ func NewCreateCommand(opts *core.CreateOptions) *cobra.Command {
cmd.Flags().Int32Var(&opts.PowerVSPlatform.Memory, "memory", opts.PowerVSPlatform.Memory, "Amount of memory allocated (in GB). Default is 32")
cmd.Flags().BoolVar(&opts.PowerVSPlatform.Debug, "debug", opts.PowerVSPlatform.Debug, "Enabling this will print PowerVS API Request & Response logs")
cmd.Flags().BoolVar(&opts.PowerVSPlatform.RecreateSecrets, "recreate-secrets", opts.PowerVSPlatform.RecreateSecrets, "Enabling this flag will recreate creds mentioned https://hypershift-docs.netlify.app/reference/api/#hypershift.openshift.io/v1alpha1.PowerVSPlatformSpec here. This is required when rerunning 'hypershift create cluster powervs' or 'hypershift create infra powervs' commands, since API key once created cannot be retrieved again. Please make sure that cluster name used is unique across different management clusters before using this flag")
cmd.Flags().BoolVar(&opts.PowerVSPlatform.UsePER, "use-per", opts.PowerVSPlatform.UsePER, "Enabling this flag will utilize PER solution via transit gateway instead of cloud connection to create a connection between PowerVS and VPC")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we change the name to power-edge-router

@@ -39,12 +40,16 @@ func NewDestroyCommand(opts *core.DestroyOptions) *cobra.Command {
cmd.Flags().StringVar(&opts.PowerVSPlatform.CloudInstanceID, "cloud-instance-id", "", "IBM Cloud PowerVS Service Instance ID. Use this flag to reuse an existing PowerVS Service Instance resource for cluster's infra")
cmd.Flags().StringVar(&opts.PowerVSPlatform.CloudConnection, "cloud-connection", "", "Cloud Connection in given zone. Use this flag to reuse an existing Cloud Connection resource for cluster's infra")
cmd.Flags().BoolVar(&opts.PowerVSPlatform.Debug, "debug", opts.PowerVSPlatform.Debug, "Enabling this will print PowerVS API Request & Response logs")
cmd.Flags().BoolVar(&opts.PowerVSPlatform.UsePER, "use-per", opts.PowerVSPlatform.UsePER, "Enabling this flag will utilize PER solution via transit gateway instead of cloud connection to create a connection between PowerVS and VPC")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same comment as above

@@ -218,12 +228,16 @@ func NewCreateCommand() *cobra.Command {
cmd.Flags().StringVar(&opts.OutputFile, "output-file", opts.OutputFile, "Path to file that will contain output information from infra resources (optional)")
cmd.Flags().BoolVar(&opts.Debug, "debug", opts.Debug, "Enabling this will print PowerVS API Request & Response logs")
cmd.Flags().BoolVar(&opts.RecreateSecrets, "recreate-secrets", opts.RecreateSecrets, "Enabling this flag will recreate creds mentioned https://hypershift-docs.netlify.app/reference/api/#hypershift.openshift.io/v1alpha1.PowerVSPlatformSpec here. This is required when rerunning 'hypershift create cluster powervs' or 'hypershift create infra powervs' commands, since API key once created cannot be retrieved again. Please make sure that cluster name used is unique across different management clusters before using this flag")
cmd.Flags().BoolVar(&opts.UsePER, "use-per", opts.UsePER, "Enabling this flag will utilize PER solution via transit gateway instead of cloud connection to create a connection between PowerVS and VPC")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same as above

Comment on lines 1500 to 1502
if transitGateway != nil {
infra.TransitGatewayID = *transitGateway.ID
infra.Stats.TransitGatewayState.Status = *transitGateway.Status
} else {
return fmt.Errorf("unable to setup transit gateway")
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if transitGateway != nil {
infra.TransitGatewayID = *transitGateway.ID
infra.Stats.TransitGatewayState.Status = *transitGateway.Status
} else {
return fmt.Errorf("unable to setup transit gateway")
}
if transitGateway == nil {
return fmt.Errorf("unable to setup transit gateway")
}
infra.TransitGatewayID = *transitGateway.ID
infra.Stats.TransitGatewayState.Status = *transitGateway.Status

if err != nil && err.Error() != transitGatewayNotFound(transitGatewayName).Error() {
return nil, fmt.Errorf("error validating existing transit gateway: %w", err)
}
if tg != nil && *tg.Status == "available" {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a scenario where tg is not nil and status is not in available state then what happens? Ideally even a create call also should fail as tg already exists, then how do we handle that scenario?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, when validateTransitGatewayByName returns transitGatewayNotFound error, tg would be nil, so before accessing *tg.status, need to validate it's not nil. If its nil, will proceed to create a new transit gatway. So we need a nil check here. We will not attempt the create if its already exists.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what if tg is not null(transit gateway exist) and state is not available?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah that's a possible case, now handled in validateTransitGatewayByName func itself, when tg exists and it is not in available state will return transitGatewayUnavailableError. Thanks for the catch

}
if tg != nil && *tg.Status == "available" {
log(options.InfraID).Info("Using existing transit gateway ...")
return tg, nil
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if available the does it mean that we also have connections as well? what if we just have the transit gateway but not the connections for vpc and powervs?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am validating the vpc and powervs connections are attached to this tg and their status is ok in validateTransitGatewayByName func. Then only I would return the tg obj. If tg is there and connections are not proper then I return transitGatewayConnectionError.

@@ -99,6 +103,9 @@ func NewDestroyCommand() *cobra.Command {
cmd.Flags().StringVar(&opts.CloudConnection, "cloud-connection", opts.CloudConnection, "IBM Cloud PowerVS Cloud Connection. Use this flag to reuse an existing Cloud Connection resource for cluster's infra")
cmd.Flags().StringVar(&opts.CloudInstanceID, "cloud-instance-id", opts.CloudInstanceID, "IBM PowerVS Cloud Instance ID. Use this flag to reuse an existing PowerVS Cloud Instance resource for cluster's infra")
cmd.Flags().BoolVar(&opts.Debug, "debug", opts.Debug, "Enabling this will result in debug logs will be printed")
cmd.Flags().BoolVar(&opts.UsePER, "use-per", opts.UsePER, "Enabling this flag will utilize PER solution via transit gateway instead of cloud connection to create a connection between PowerVS and VPC")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same as above

Copy link
Member Author

@dharaneeshvrd dharaneeshvrd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mkumatag
I have addressed your other comments too, please take a look!

if err != nil && err.Error() != transitGatewayNotFound(transitGatewayName).Error() {
return nil, fmt.Errorf("error validating existing transit gateway: %w", err)
}
if tg != nil && *tg.Status == "available" {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, when validateTransitGatewayByName returns transitGatewayNotFound error, tg would be nil, so before accessing *tg.status, need to validate it's not nil. If its nil, will proceed to create a new transit gatway. So we need a nil check here. We will not attempt the create if its already exists.

}
if tg != nil && *tg.Status == "available" {
log(options.InfraID).Info("Using existing transit gateway ...")
return tg, nil
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am validating the vpc and powervs connections are attached to this tg and their status is ok in validateTransitGatewayByName func. Then only I would return the tg obj. If tg is there and connections are not proper then I return transitGatewayConnectionError.

CloudConnection string
VPCRegion string
VPC string
VPCSubnet string
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see this VPCSubnet is missing, is this intentionally removed?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, its unused, so removed it.

@@ -39,12 +40,16 @@ func NewDestroyCommand(opts *core.DestroyOptions) *cobra.Command {
cmd.Flags().StringVar(&opts.PowerVSPlatform.CloudInstanceID, "cloud-instance-id", "", "IBM Cloud PowerVS Service Instance ID. Use this flag to reuse an existing PowerVS Service Instance resource for cluster's infra")
cmd.Flags().StringVar(&opts.PowerVSPlatform.CloudConnection, "cloud-connection", "", "Cloud Connection in given zone. Use this flag to reuse an existing Cloud Connection resource for cluster's infra")
cmd.Flags().BoolVar(&opts.PowerVSPlatform.Debug, "debug", opts.PowerVSPlatform.Debug, "Enabling this will print PowerVS API Request & Response logs")
cmd.Flags().BoolVar(&opts.PowerVSPlatform.UsePER, "use-power-edge-router", opts.PowerVSPlatform.UsePER, "Enabling this flag will denotes that Power Edge Router solution is used while creating the cluster")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
cmd.Flags().BoolVar(&opts.PowerVSPlatform.UsePER, "use-power-edge-router", opts.PowerVSPlatform.UsePER, "Enabling this flag will denotes that Power Edge Router solution is used while creating the cluster")
cmd.Flags().BoolVar(&opts.PowerVSPlatform.PER, "power-edge-router", opts.PowerVSPlatform.PER, "Enabling this flag will denotes that Power Edge Router solution is used while creating the cluster")

@@ -50,6 +51,9 @@ func NewCreateCommand(opts *core.CreateOptions) *cobra.Command {
cmd.Flags().Int32Var(&opts.PowerVSPlatform.Memory, "memory", opts.PowerVSPlatform.Memory, "Amount of memory allocated (in GB). Default is 32")
cmd.Flags().BoolVar(&opts.PowerVSPlatform.Debug, "debug", opts.PowerVSPlatform.Debug, "Enabling this will print PowerVS API Request & Response logs")
cmd.Flags().BoolVar(&opts.PowerVSPlatform.RecreateSecrets, "recreate-secrets", opts.PowerVSPlatform.RecreateSecrets, "Enabling this flag will recreate creds mentioned https://hypershift-docs.netlify.app/reference/api/#hypershift.openshift.io/v1alpha1.PowerVSPlatformSpec here. This is required when rerunning 'hypershift create cluster powervs' or 'hypershift create infra powervs' commands, since API key once created cannot be retrieved again. Please make sure that cluster name used is unique across different management clusters before using this flag")
cmd.Flags().BoolVar(&opts.PowerVSPlatform.UsePER, "use-power-edge-router", opts.PowerVSPlatform.UsePER, "Enabling this flag will utilize Power Edge Router solution via transit gateway instead of cloud connection to create a connection between PowerVS and VPC")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
cmd.Flags().BoolVar(&opts.PowerVSPlatform.UsePER, "use-power-edge-router", opts.PowerVSPlatform.UsePER, "Enabling this flag will utilize Power Edge Router solution via transit gateway instead of cloud connection to create a connection between PowerVS and VPC")
cmd.Flags().BoolVar(&opts.PowerVSPlatform.PER, "power-edge-router", opts.PowerVSPlatform.PER, "Enabling this flag will utilize Power Edge Router solution via transit gateway instead of cloud connection to create a connection between PowerVS and VPC")

@@ -218,12 +228,16 @@ func NewCreateCommand() *cobra.Command {
cmd.Flags().StringVar(&opts.OutputFile, "output-file", opts.OutputFile, "Path to file that will contain output information from infra resources (optional)")
cmd.Flags().BoolVar(&opts.Debug, "debug", opts.Debug, "Enabling this will print PowerVS API Request & Response logs")
cmd.Flags().BoolVar(&opts.RecreateSecrets, "recreate-secrets", opts.RecreateSecrets, "Enabling this flag will recreate creds mentioned https://hypershift-docs.netlify.app/reference/api/#hypershift.openshift.io/v1alpha1.PowerVSPlatformSpec here. This is required when rerunning 'hypershift create cluster powervs' or 'hypershift create infra powervs' commands, since API key once created cannot be retrieved again. Please make sure that cluster name used is unique across different management clusters before using this flag")
cmd.Flags().BoolVar(&opts.UsePER, "use-power-edge-router", opts.UsePER, "Enabling this flag will utilize Power Edge Router solution via transit gateway instead of cloud connection to create a connection between PowerVS and VPC")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
cmd.Flags().BoolVar(&opts.UsePER, "use-power-edge-router", opts.UsePER, "Enabling this flag will utilize Power Edge Router solution via transit gateway instead of cloud connection to create a connection between PowerVS and VPC")
cmd.Flags().BoolVar(&opts.PER, "power-edge-router", opts.PER, "Enabling this flag will utilize Power Edge Router solution via transit gateway instead of cloud connection to create a connection between PowerVS and VPC")

if err = infra.setupPowerVSCloudConnection(ctx, options, session, gtag); err != nil {
return fmt.Errorf("error setup powervs cloud connection: %w", err)
if options.UsePER {
if err = infra.setupTransitGateway(ctx, options, gtag); err != nil {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if err = infra.setupTransitGateway(ctx, options, gtag); err != nil {
if err := infra.setupTransitGateway(ctx, options, gtag); err != nil {

if err = infra.isCloudConnectionReady(ctx, options, session); err != nil {
return fmt.Errorf("cloud connection is not up: %w", err)
if !options.UsePER {
if err = infra.isCloudConnectionReady(ctx, options, session); err != nil {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if err = infra.isCloudConnectionReady(ctx, options, session); err != nil {
if err := infra.isCloudConnectionReady(ctx, options, session); err != nil {

infra.TransitGatewayID = *transitGateway.ID
infra.Stats.TransitGatewayState.Status = *transitGateway.Status

if err = attachTag(gtag, options.InfraID, transitGateway.Crn, fmt.Sprintf("%s-%s", infra.ID, transitGatewayNameSuffix)); err != nil {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if err = attachTag(gtag, options.InfraID, transitGateway.Crn, fmt.Sprintf("%s-%s", infra.ID, transitGatewayNameSuffix)); err != nil {
if err := attachTag(gtag, options.InfraID, transitGateway.Crn, fmt.Sprintf("%s-%s", infra.ID, transitGatewayNameSuffix)); err != nil {

if err != nil && err.Error() != transitGatewayNotFound(transitGatewayName).Error() {
return nil, fmt.Errorf("error validating existing transit gateway: %w", err)
}
if tg != nil && *tg.Status == "available" {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what if tg is not null(transit gateway exist) and state is not available?

@@ -99,6 +103,9 @@ func NewDestroyCommand() *cobra.Command {
cmd.Flags().StringVar(&opts.CloudConnection, "cloud-connection", opts.CloudConnection, "IBM Cloud PowerVS Cloud Connection. Use this flag to reuse an existing Cloud Connection resource for cluster's infra")
cmd.Flags().StringVar(&opts.CloudInstanceID, "cloud-instance-id", opts.CloudInstanceID, "IBM PowerVS Cloud Instance ID. Use this flag to reuse an existing PowerVS Cloud Instance resource for cluster's infra")
cmd.Flags().BoolVar(&opts.Debug, "debug", opts.Debug, "Enabling this will result in debug logs will be printed")
cmd.Flags().BoolVar(&opts.UsePER, "use-power-edge-router", opts.UsePER, "Enabling this flag will denotes that Power Edge Router solution is used while creating the cluster")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
cmd.Flags().BoolVar(&opts.UsePER, "use-power-edge-router", opts.UsePER, "Enabling this flag will denotes that Power Edge Router solution is used while creating the cluster")
cmd.Flags().BoolVar(&opts.PER, "power-edge-router", opts.PER, "Enabling this flag will denotes that Power Edge Router solution is used while creating the cluster")

return nil, transitGatewayNotFound(name)
}

if validateStatus {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can have early return here in case if validateStatus is set as false

@dharaneeshvrd dharaneeshvrd force-pushed the add-transit-gw branch 2 times, most recently from d490bad to f5bfb3b Compare January 19, 2024 09:45
@dharaneeshvrd
Copy link
Member Author

/retest-required

1 similar comment
@dharaneeshvrd
Copy link
Member Author

/retest-required

Copy link
Member

@mkumatag mkumatag left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Jan 19, 2024
@dharaneeshvrd
Copy link
Member Author

/retest-required

@openshift-ci openshift-ci bot removed the lgtm Indicates that a PR is ready to be merged. label Jan 22, 2024
@dharaneeshvrd
Copy link
Member Author

/retest-required

1 similar comment
@dharaneeshvrd
Copy link
Member Author

/retest-required

@mkumatag
Copy link
Member

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Jan 23, 2024
@openshift-ci openshift-ci bot removed the lgtm Indicates that a PR is ready to be merged. label Feb 1, 2024
@@ -99,6 +103,9 @@ func NewDestroyCommand() *cobra.Command {
cmd.Flags().StringVar(&opts.CloudConnection, "cloud-connection", opts.CloudConnection, "IBM Cloud PowerVS Cloud Connection. Use this flag to reuse an existing Cloud Connection resource for cluster's infra")
cmd.Flags().StringVar(&opts.CloudInstanceID, "cloud-instance-id", opts.CloudInstanceID, "IBM PowerVS Cloud Instance ID. Use this flag to reuse an existing PowerVS Cloud Instance resource for cluster's infra")
cmd.Flags().BoolVar(&opts.Debug, "debug", opts.Debug, "Enabling this will result in debug logs will be printed")
cmd.Flags().BoolVar(&opts.PER, "power-edge-router", opts.PER, "Enabling this flag will denotes that Power Edge Router solution is used while creating the cluster")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The description doesn't seem to make sense for the destroy command. Something like, "Enabling this flag ensures that the Power Edge router that was used to create the cluster is cleaned up."

@@ -99,6 +103,9 @@ func NewDestroyCommand() *cobra.Command {
cmd.Flags().StringVar(&opts.CloudConnection, "cloud-connection", opts.CloudConnection, "IBM Cloud PowerVS Cloud Connection. Use this flag to reuse an existing Cloud Connection resource for cluster's infra")
cmd.Flags().StringVar(&opts.CloudInstanceID, "cloud-instance-id", opts.CloudInstanceID, "IBM PowerVS Cloud Instance ID. Use this flag to reuse an existing PowerVS Cloud Instance resource for cluster's infra")
cmd.Flags().BoolVar(&opts.Debug, "debug", opts.Debug, "Enabling this will result in debug logs will be printed")
cmd.Flags().BoolVar(&opts.PER, "power-edge-router", opts.PER, "Enabling this flag will denotes that Power Edge Router solution is used while creating the cluster")
cmd.Flags().StringVar(&opts.TransitGatewayLocation, "transit-gateway-location", opts.TransitGatewayLocation, "IBM Cloud Transit Gateway location")
cmd.Flags().StringVar(&opts.TransitGateway, "transit-gateway", opts.TransitGateway, "IBM Cloud Transit Gateway. Use this flag to reuse an existing Transit Gateway resource for cluster's infra")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above, the wording should be different for the destroy command.

return err
}

if options.TransitGateway == "" {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: return early instead of enclosing a large block in the if

@csrwng
Copy link
Contributor

csrwng commented Feb 1, 2024

Some comments, otherwise lgtm
/approve

Copy link
Contributor

openshift-ci bot commented Feb 2, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: csrwng, dharaneeshvrd, mkumatag

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 2, 2024
@mkumatag
Copy link
Member

mkumatag commented Feb 2, 2024

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Feb 2, 2024
Copy link
Contributor

openshift-ci bot commented Feb 2, 2024

@dharaneeshvrd: all tests passed!

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@openshift-merge-bot openshift-merge-bot bot merged commit 198899a into openshift:main Feb 2, 2024
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. area/cli Indicates the PR includes changes for CLI area/documentation Indicates the PR includes changes for documentation area/testing Indicates the PR includes changes for e2e testing jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants