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

Generated names and potential collisions in shared infrastructure #4

Open
soerenschneider opened this issue Dec 19, 2024 · 3 comments
Assignees

Comments

@soerenschneider
Copy link
Collaborator

When running Demo1 step 2 I noticed the generated cluster's name is hmc-system-aws-test1. In my current understanding, we'll likely share a common AWS account.

Given that assumption, wouldn't we need to introduce some pseudo randomness into the generated resource names on AWS to provide collisions? Thinking about cluster names, but also overlapping subnets. Not sure about account quotas but that could also be a future problem.

@Schnitzel
Copy link
Collaborator

yea, great point, I was wondering about this as well. Maybe we could add some kind of hash to each clustername based on the hostname of the computer we are running the demo?

@soerenschneider
Copy link
Collaborator Author

I added a POC in this commit, please let me know what you think.

My assumption was that I want to use a pseudo random string, only using docker to not have to support multiple OSes. The file is stored within the repo (outside of git, hence the entry in .gitignore) and can be used in appropriate targets.

@soerenschneider soerenschneider self-assigned this Dec 20, 2024
@Algeran
Copy link
Collaborator

Algeran commented Dec 23, 2024

Another approach, this is how I implemented it in the GitOps demo repo:

So, it forces user to define the USERNAME environment variable and fails it it's not. Username allows cloud administrators to easily check owners of the created resources instead of discovering by randomly generated suffixes

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

No branches or pull requests

3 participants