Add NodeNamePolicy to Controlplane configuration#190
Merged
Conversation
Extend the `Controlplane` provider configuration to allow to set the `HostnamePolicy` for a `Shoot` cluster. Supported values are `Server`. If that field is set, the MCM gets an extra `arg` to use the `Server` name as a `Node` name instead of using the `ServerClaim` name. If this field is not set, `ServerClaim` name will be used (default behaviour).
Nuckal777
reviewed
May 22, 2025
Contributor
Nuckal777
left a comment
There was a problem hiding this comment.
Looks good in general. One question from the api design perspective. Should the hostnamePolicy field be required and defaulted to Claim? 🤔
Member
Author
|
I actually might change the flag in the |
HostnamePolicy to Controlplane configurationNodeNamePolicy to Controlplane configuration
Nuckal777
approved these changes
May 27, 2025
| ensurer = NewEnsurer(logger, false) | ||
| scheme := runtime.NewScheme() | ||
| Expect(v1alpha1.AddToScheme(scheme)).To(Succeed()) | ||
| ensurer = controlplane.NewEnsurer(logr.Discard(), scheme) |
Contributor
There was a problem hiding this comment.
fyi, Ginkgo brings a GinkgoLogr, which prints logs in case of test failures.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Proposed Changes
Extend the
Controlplaneprovider configuration to allow to set theNodeNamePolicyfor aShootcluster. Supported values areServer. If that field is set, the MCM gets an extraargto use theServername as aNodename instead of using theServerClaimname.If this field is not set,
ServerClaimname will be used (default behaviour).This solution should be future proof in case we add a
ServerClaim.Spec.Hostnamefield for custom hostnames./ref ironcore-dev/machine-controller-manager-provider-ironcore-metal#103