Skip to content

SDKQE-3617: Enable PSC linking to GCP instances#117

Closed
Aaliya7516 wants to merge 19 commits into
masterfrom
gcp-support
Closed

SDKQE-3617: Enable PSC linking to GCP instances#117
Aaliya7516 wants to merge 19 commits into
masterfrom
gcp-support

Conversation

@Aaliya7516
Copy link
Copy Markdown
Member

No description provided.

@Aaliya7516 Aaliya7516 self-assigned this Jun 11, 2025
@Aaliya7516
Copy link
Copy Markdown
Member Author

I'm planning to remove gcp-project-id flag from setup-link and make init command take the input from user if it is not detected automatically.

Comment thread cbdcconfig/config.go
Region string `yaml:"region"`

_DefaultRegion string `yaml:"default-region"`
Zone string `yaml:"zone"`
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This change appears to be a breaking config change and would need to be done as part of the config versioning system that's built into dinocluster. Separately from this though, I don't think selecting a specific zone is something that is meant to exist in the config file, but instead the region should be defined, and the specific zone would be auto-detected or auto-selected.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

noted

vmId, _ := cmd.Flags().GetString("vm-id")

instanceIdGcp, _ := cmd.Flags().GetString("gcp-instance-id")
projectIdGcp, _ := cmd.Flags().GetString("gcp-project-id")
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I think this should be something that can be automatically determined based on the instance-id? Or perhaps the project-id is actually something that should be defined in the configuration or as part of your GCP CLI configuration?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Yes, I recently planned to remove this from setup-link command and add it to GCP CLI configuration.

if shouldAutoConfig {
if instanceId != "" || vmId != "" {
logger.Fatal("must not specify both auto and instance-id/vm-id")
if instanceId != "" || vmId != "" || instanceIdGcp != "" {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

What's the reason for adding an additional parameter here when GCP uses the same terminology as AWS? You should be able to determine the 'meaning' in terms of AWS vs GCP trivially by looking at the clouddeploy.ClusterInfo to know what kind of cluster this is. Ultimately the instance-id and vm-id are really just aliases of eachother for convenience.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Oh yes, I'll make the changes

SubnetIds: vpcInfo.SubnetworkID,
})

err = helper.ExecuteBashCommand(command)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

We intentionally avoid directly invoking other system commands from dinocluster, instead opting to implement them directly in cbdinocluster in order to ensure that cbdinocluster remains compatible with the widest variety of platforms, to be able to provide more nuanced diagnostic information when things go wrong as well as ensuring that dinocluster does not have unnecessary dependancies for users on third-party tools. The information needed to bind the private endpoint should be available from the API separate from the generated command they give you, if it does not currently do this, we should file an AV bug, since this will likely impact other automated tools like terraform and parse the command they provide in the short-term.

@Aaliya7516 Aaliya7516 closed this Jun 19, 2025
@Aaliya7516 Aaliya7516 deleted the gcp-support branch June 19, 2025 12:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants