Skip to content

[improvement] Fix DNS_UNIQUE_ID in templating so it's not required to be set for DNS flavor#883

Merged
AshleyDumaine merged 1 commit intomainfrom
dns-unique-id-default
Sep 24, 2025
Merged

[improvement] Fix DNS_UNIQUE_ID in templating so it's not required to be set for DNS flavor#883
AshleyDumaine merged 1 commit intomainfrom
dns-unique-id-default

Conversation

@AshleyDumaine
Copy link
Collaborator

What this PR does / why we need it: We allow this field to be empty so CAPL can create a unique identifier automatically:

  dnsUniqueIdentifier	<string>
    dnsUniqueIdentifier is the unique identifier for the DNS. This let clusters
    with the same name have unique
    DNS record
    Ignored if the LoadBalancerType is set to anything other than dns
    If not set, CAPL will create a unique identifier for you

However if this var isn't set during template rendering we get an error:

(⎈|kind-tilt:N/A) ~/cluster-api-provider-linode   main  clusterctl generate cluster test-cluster --kubernetes-version v1.31.8 --infrastructure local-linode:v0.0.0 --flavor kubeadm-dns-loadbalancing> test-cluster.yaml
Error: value for variables [DNS_UNIQUE_ID] is not set. Please set the value using os environment variables or the clusterctl config file

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #

Special notes for your reviewer:

TODOs:

  • squashed commits
  • includes documentation
  • adds unit tests
  • adds or updates e2e tests

@codecov
Copy link

codecov bot commented Sep 24, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 65.97%. Comparing base (148daa3) to head (6e86fb3).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #883   +/-   ##
=======================================
  Coverage   65.97%   65.97%           
=======================================
  Files          71       71           
  Lines        7959     7959           
=======================================
  Hits         5251     5251           
  Misses       2406     2406           
  Partials      302      302           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@AshleyDumaine AshleyDumaine enabled auto-merge (squash) September 24, 2025 20:20
@AshleyDumaine AshleyDumaine merged commit 306eedf into main Sep 24, 2025
16 checks passed
@AshleyDumaine AshleyDumaine deleted the dns-unique-id-default branch September 26, 2025 14:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants