Giter VIP home page Giter VIP logo

Comments (6)

pst avatar pst commented on June 9, 2024

I see your point, I also agree the immediate solution is to keep the name_prefix and workspace short. Instead of shortening staging -> stg, you can shorten or remove kubestack -> kbst.

The metadata module includes region as part of the cluster name to ensure multi-region. I see two options:

  1. have a parameter that disables including the region and then leaves it to users to use the name_prefix to avoid name collisions.
  2. have a parameter to define the entire cluster_name and ignore the name_prefix, workspace and region default

This is from the top of my head, if it really works will need some more thought and thorough testing. For reference, this is where the "magic" happens: https://github.com/kbst/terraform-kubestack/blob/master/common/metadata/main.tf

from terraform-kubestack.

meggieveggie avatar meggieveggie commented on June 9, 2024

Maybe an idea here could be to have a name_short that could be used when specifying a configuration that would be used instead of the metadata.name

That way it could be reusable throughout the module

from terraform-kubestack.

pst avatar pst commented on June 9, 2024

If the issue is only with the service account (I don't know if it is), it would be an option to have the name not just be the cluster name but be, e.g. something with a 7 char hash of the cluster name as a suffix to make it unique.

from terraform-kubestack.

meggieveggie avatar meggieveggie commented on June 9, 2024

I believe this issue is only on the service account as I did not experience it anywhere else. Would you like me to open a PR?

from terraform-kubestack.

pst avatar pst commented on June 9, 2024

Sure, in that case trying something to keep the SA name below the limit is worth a try. We need to be mindful about the upgrade path for existing clusters though.

from terraform-kubestack.

pst avatar pst commented on June 9, 2024

0.13's new custom validation could also be an option here: https://www.terraform.io/docs/configuration/variables.html#custom-validation-rules

from terraform-kubestack.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.