Skip to content

fix(dns): use dot separator for localtargets prefix with backward compatibility - #2401

Open
AruneshDwivedi wants to merge 2 commits into
k8gb-io:masterfrom
AruneshDwivedi:fix/localtargets-dot-prefix-backward-compat
Open

fix(dns): use dot separator for localtargets prefix with backward compatibility#2401
AruneshDwivedi wants to merge 2 commits into
k8gb-io:masterfrom
AruneshDwivedi:fix/localtargets-dot-prefix-backward-compat

Conversation

@AruneshDwivedi

Copy link
Copy Markdown

The localtargets- naming scheme could produce DNS labels exceeding the 63-character limit when the hostname's first label was long enough. Changed the separator from '-' to '.' so 'localtargets' becomes its own DNS label, keeping the original hostname labels intact.

Falls back to legacy dash-prefix naming when the new prefix returns no records, ensuring backward compatibility during migration.

Fixes #2366

…patibility

The localtargets-<host> naming scheme could produce DNS labels exceeding
the 63-character limit when the hostname's first label was long enough.
Changed the separator from '-' to '.' so 'localtargets' becomes its own
DNS label, keeping the original hostname labels intact.

Fall back to legacy dash-prefix naming when the new prefix returns no
records, ensuring backward compatibility during migration.

Fixes k8gb-io#2366

Signed-off-by: Arunesh Dwivedi <arunesh.devops@gmail.com>
@netlify

netlify Bot commented Jun 29, 2026

Copy link
Copy Markdown

Deploy Preview for k8gb-preview ready!

Name Link
🔨 Latest commit 3ce5285
🔍 Latest deploy log https://app.netlify.com/projects/k8gb-preview/deploys/6a5242e15f141500086cb23b
😎 Deploy Preview https://deploy-preview-2401--k8gb-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

…d chainsaw

The localtargets- prefix became localtargets. in the controller, but the
unit tests, weight test, and chainsaw step template still asserted the old
dash form, so the validation test, weight test, and every chainsaw
playground failed. Update the expected names to the dot form and widen the
over-long-label test host to 64 chars since the dot splits the prefix into
its own label.

Signed-off-by: Arunesh Dwivedi <arunesh.dwivedi@example.com>
@AruneshDwivedi

Copy link
Copy Markdown
Author

The chainsaw failure wasn't environmental — the step template and unit tests still asserted the old localtargets- dash prefix while the controller now publishes localtargets. with a dot, so I updated the tests, weight test, and chainsaw init to the new form. The over-long-label test now uses a 64-char host because the dot splits the prefix into its own label.

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

Successfully merging this pull request may close these issues.

Validate localtargets DNS label length and use a separate label instead of localtargets-<host>

1 participant