-
Notifications
You must be signed in to change notification settings - Fork 4k
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
Hetzner node specific cloud init #5645
Hetzner node specific cloud init #5645
Conversation
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: marcwickenden The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Welcome @marcwickenden! |
@@ -206,6 +208,63 @@ func BuildHetzner(_ config.AutoscalingOptions, do cloudprovider.NodeGroupDiscove | |||
klog.Fatalf("Failed to get servers for for node pool %s error: %v", nodegroupSpec, err) | |||
} | |||
|
|||
// Get this node's cloud-init | |||
var cloudInitBase64 string | |||
nodeCloudInitVar := fmt.Sprintf("HCLOUD_%s_CLOUD_INIT", strings.ToUpper(spec.name)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This has the potential of conflicts when two node pools with the same name but different cases, ( pool
vs Pool
) exist. While I dont think that anyone actually uses it like that, those are valid node pool names according to validNodePoolName
regex.
Same "complaint" applies to nodePublicIPv4Var
& nodePublicIPv6Var
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did wonder about taking this semi-magical approach to be honest. Upper-casing was really for aesthetic purposes to avoid HCLOUD_pool_CLOUD_INIT but that's not that important. I actually think a better approach probably is to add some additional fields to the --nodes
parameter as it removes the need to things like this.
PR needs rebase. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
The Kubernetes project currently lacks enough contributors to adequately respond to all PRs. This bot triages PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
This PR looks very stale, closing for now. Please reopen if still relevant. /close |
@x13n: Closed this PR. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
What type of PR is this?
/kind feature
What this PR does / why we need it:
This PR adds the ability to provide a different cloud-init and public IP value for each pool. This was developed specifically to address the need to label each autoscaling group differently but could enable far greater customisation of the node through cloud-init.
Existing functionality is maintained as the default operation if pool-specific environment variables are not set.
Which issue(s) this PR fixes:
Fixes #4604
Special notes for your reviewer:
Does this PR introduce a user-facing change?
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.: