Replies: 8 comments 18 replies
-
Oh my, that's a layered request! But doable. However, please don't hesitate to submit a PR, if you you cannot code terraform, GPT-4 can 😂, you just manage it. It would help, otherwise I will get to it sooner or later. Also don't forget about backward compatibility, so all new additions must be optional and well thought of. |
Beta Was this translation helpful? Give feedback.
-
Hopefully in a good way 😟. I tried to add more detail than less, I never like being on the other end of the feature requests with a one liner and no rationale for the goal. GPT and I have a very close working relationship already, this one may be a bit of a stretch though 😉. |
Beta Was this translation helpful? Give feedback.
-
@maggie44 No worries, will do. |
Beta Was this translation helpful? Give feedback.
-
Giving this a bit more thought, wanted to get some input on potential implementation. The goal being to allow setting specific of labels on individual nodes within each of the nodepools to allow larger pool limits. I think the label idea I mentioned above would work, but isn't as easy to work with as I would have hoped. Any ideas welcome.
|
Beta Was this translation helpful? Give feedback.
-
@Silvest89, you mentioned this would be fairly easy to implement. I have never written any Terraform before but reached the point I really need this feature. Any pointers to set me in the right direction would be appreciated. |
Beta Was this translation helpful? Give feedback.
-
Hi all, if I may add my opinion: I think the need for this new feature comes from the challenges that come with the choice to refer to nodes and node pools by their indices in lists. I have the same issue, not regarding labels, but regarding replacing individual faulty nodes. I cannot replace a single node if it is one of the "count" in a nodepool. Kind of the same problem as the labels. Shouldn't we think a bit harder about this, and try to find a (possibly backwards compatible) solution where nodepools aren't only determined by a count, but have a reference to individual nodes? For example, we could remove the count variable all together from one nodepool, and just demand a map of {node_label : [list of labels]}. this way, one can label nodes differently in one nodepool, and one can delete a single node from a pool by removing its key:value pair. Under the hood, some rewriting needs to be done, such that the node's key propagates to its terraform key (which is now already a conversion between list positions and map keys, a la |
Beta Was this translation helpful? Give feedback.
-
SOrry, reading the original proposal and the discussion once more, I think what I proposing is already exactly the original proposal from @maggie44 , where @maggie44 's proposal is actually much better. I would definitely prefer that over the index-as-a-key-in-a-map solution that came out after the solution. Also, it is not a breaking change! That's just a matter of coding the different input types for 'count' correctly. |
Beta Was this translation helpful? Give feedback.
-
Let me know what you think, I went ahead and made one possible implementation. With documentation. |
Beta Was this translation helpful? Give feedback.
-
Description
In #894 there is a discussion around node pool limits. While originally thought to be 255 it turns out to be 50 due to Hetzner's limits on subnets.
This is problematic for those who scale their services via nodepools instead of nodes as we now have much lower limits than originally anticipated. I for example add additional node pools to allow me to add labels and then the labels are used to associate a deployment. E.g.:
In the above example I deploy to nodes with the label
cluster=a1
which allows me to create a geographically dispersed HA cluster for a particular deployment and be able to target pods at particular sets of nodes. Being able to target pods at particular nodes is important for my services, as is those sets being geographically dispersed.For a second deployment on different nodes, I add additional nodepools with labels for a second cluster:
Ideally, we would be able to increase the
count
on each pool to add additional nodes and that way we do not hit the limit of 50 nodepools. But when scaling nodes viacount
there is no means of adding labels to the new nodes, and therefore no way to target pods at a particular set of nodes.I think being able to add labels to nodes within nodepools would be a useful feature to overcome this. It could look something like this:
These could then be deprovisioned like this, assuming we need to set to
0
rather than change the length of the count when deprovisioning (maybe that's only a nodepool thing):It would be nice if this then allows us more control over the node labelling. It currently looks something like:
k3s
is customisable via the config file and can be disabled.mynodename
is set vianame
in theagent_nodepool
.epo
seems to be a random three letter code to distinguish each node.It would be nice to be able to add identifiers to the nodes within each pool too, so either
name
in the item within thecount
array replacesepo
and theterraform apply
checks for unique values, or we add that name in addition to the random three letters:It wouldn't mean we would be able to use 255 node pools as originally thought but permits a similar effect and have more control over the nodes.
Beta Was this translation helpful? Give feedback.
All reactions