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

Fix/multiple providers #1348

Merged
merged 9 commits into from May 3, 2024
Merged

Fix/multiple providers #1348

merged 9 commits into from May 3, 2024

Conversation

Despire
Copy link
Contributor

@Despire Despire commented Apr 26, 2024

Closes #1296
Closes #1312

This PR also introduces a limit on names for:

clusters: 28 chars.
nodepools: 14 chars.

Note: Mostly the changes are in the terraform files where everything has a "provider.specName" suffix so that no collisions will be generated when using more than one of the same provider

Copy link
Contributor

@cloudziu cloudziu left a comment

Choose a reason for hiding this comment

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

LGTM 👍

Copy link
Contributor

@JKBGIT1 JKBGIT1 left a comment

Choose a reason for hiding this comment

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

LGMT 👍
Just one more question. Why do we use region in the provider.alias for most of the cloud providers and some (Hetzner) we don't?

internal/manifest/manifest.go Show resolved Hide resolved
@Despire
Copy link
Contributor Author

Despire commented Apr 30, 2024

Why do we use region in the provider.alias for most of the cloud providers and some (Hetzner) we don't?

This is the case for the hetzner as the networking stuff doesn't have to be region specific. Moreover, hetzner doesn't allow to create the same ssh keys (they check based on the key fingerprint) so it is not possible to have more than one hetzner provider in the same cluster (unless two completely different hetzner accounts will be used in which case it will work)

@JKBGIT1
Copy link
Contributor

JKBGIT1 commented Apr 30, 2024

alias = "nodepool_{{ $region }}_{{ $.Provider.SpecName }}"

And why isn't it possible to omit {{ $region }} in the alias and use only {{ $.Provider.SpecName }} in this line? It's for AWS, but that shouldn't matter if I got it right.

EDIT: If I am not mistaken the {{ $.Provider.SpecName }} should be unique for each provider, right?

@Despire
Copy link
Contributor Author

Despire commented Apr 30, 2024

And why isn't it possible to omit {{ $region }} in the alias and use only {{ $.Provider.SpecName }} in this line? It's for AWS, but that shouldn't matter if I got it right.

For some providers you need the region (for example for aws and gcp, oci...,

) as the resources are region specific. So you actually need the provider for that specific region.

You could have different nodepools from the same provider but in different regions.

@JKBGIT1
Copy link
Contributor

JKBGIT1 commented Apr 30, 2024

Okay, got it. Thanks.

Despire and others added 3 commits May 3, 2024 10:05
# Conflicts:
#	manifests/claudie/kustomization.yaml
#	manifests/testing-framework/kustomization.yaml
@Despire Despire added this pull request to the merge queue May 3, 2024
Merged via the queue into master with commit 6cf315a May 3, 2024
@Despire Despire deleted the fix/multiple-providers branch May 3, 2024 10:01
@Despire Despire mentioned this pull request May 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants