Skip to content

refactor: make external-dns values provider-aware#391

Merged
Matthiator merged 2 commits into
mainfrom
prep/external-dns-provider-values
Jun 19, 2026
Merged

refactor: make external-dns values provider-aware#391
Matthiator merged 2 commits into
mainfrom
prep/external-dns-provider-values

Conversation

@Matthiator

@Matthiator Matthiator commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

📝 Summary

Prepares the first small split from #370 by refactoring the built-in ExternalDNS Helm values for provider-specific configuration.

The existing Stackit-specific ExternalDNS settings are now rendered conditionally from terraform.provider, while provider-independent values remain shared. This establishes the supported pattern for adding further provider-specific ExternalDNS configuration without duplicating complete Helm values files.

Additional changes made while preparing this split and addressing review feedback:

  • Treat provider-specific template directories only under terraform/providers/<provider>/; Helm provider behavior stays in shared values templates or charts.
  • Introduce a dedicated TerraformProvider type and centralize supported Terraform provider validation.
  • Introduce terraform.provider: none as the default to support clusters without Terraform-managed infrastructure.
  • Skip Terraform template generation for clusters without Terraform config during default kubara generate.
  • Keep kubara generate --terraform strict and require a supported Terraform provider.
  • Avoid rendering a provider-derived Velero VolumeSnapshotClass when Terraform is disabled.
  • Handle existing clusters without Terraform during kubara init --overwrite.
  • Document the Terraform-only provider template layout and the catalog boundary for app-specific behavior.

🧩 Type of change

  • 🔧 CLI / Go code
  • 📦 Helm chart
  • 🧱 Terraform module
  • 📝 Documentation
  • 🧪 Test or CI change
  • ♻️ Refactor / cleanup

⚠️ Is this a breaking change?

  • Yes, this change breaks existing functionality (explain in summary)

No intended breaking changes to supported behavior. Existing Stackit ExternalDNS values are preserved when terraform.provider: stackit is configured.

Clusters without Terraform config, or with terraform.provider: none, can now use the default kubara generate flow without forcing --helm.

🧪 Testing

  • CI passed
  • Manually tested (local/dev cluster)
  • Unit tested
  • Not tested (explain why below)

Ran locally:

  • cd src && make test
  • cd src && go test ./internal/workflow ./cmd ./internal/config ./internal/render -count=1
  • make docs-validate
  • git diff --check

🔗 Related Issues / Tickets

✅ Checklist

  • Code compiles and passes all tests
  • Linting and style checks pass
  • Comments added for complex logic
  • Documentation updated (if applicable)

📎 Additional Context (optional)

This PR intentionally covers the ExternalDNS values preparation plus the provider handling needed to make terraform.provider: none a valid no-Terraform state.

It does not include T Cloud Public provider registration, OpenBao integration, Terraform modules, or the remaining provider-specific Helm changes from #370.

@Matthiator Matthiator marked this pull request as ready for review June 11, 2026 09:39
@Matthiator Matthiator requested review from a team and tuunit June 11, 2026 09:39
Comment thread docs/content/1_getting_started/catalogs.md Outdated
Comment thread src/internal/cmd/generate/generator.go Outdated
Comment thread src/internal/cmd/generate/generator.go Outdated
Comment thread src/internal/cmd/generate/generator.go Outdated
Comment thread src/internal/cmd/generate/generator_test.go Outdated
@Matthiator Matthiator force-pushed the prep/external-dns-provider-values branch 4 times, most recently from 7050261 to f8fc069 Compare June 18, 2026 08:09
@Matthiator Matthiator changed the title refactor: split external-dns provider values refactor: restrict provider-specific templates to terraform Jun 18, 2026
@Matthiator Matthiator changed the title refactor: restrict provider-specific templates to terraform refactor: make external-dns values provider-aware Jun 18, 2026
@Matthiator Matthiator requested a review from tuunit June 18, 2026 08:43
Comment thread src/internal/config/types.go Outdated
Comment thread src/internal/config/types.go Outdated
Comment thread src/internal/cmd/generate/generator.go Outdated
Comment thread src/internal/render/render.go Outdated
@Matthiator Matthiator force-pushed the prep/external-dns-provider-values branch 3 times, most recently from 4385102 to 049169d Compare June 18, 2026 13:22
@Matthiator Matthiator requested a review from tuunit June 18, 2026 13:37
Comment thread src/cmd/generate_test.go Outdated
Comment thread src/internal/config/types.go Outdated
@Matthiator Matthiator force-pushed the prep/external-dns-provider-values branch from 049169d to c7667ed Compare June 19, 2026 06:55
@Matthiator Matthiator force-pushed the prep/external-dns-provider-values branch from c7667ed to efcd36e Compare June 19, 2026 06:58
@Matthiator Matthiator requested a review from tuunit June 19, 2026 06:58
@Matthiator Matthiator merged commit c2b84a7 into main Jun 19, 2026
10 checks passed
@Matthiator Matthiator deleted the prep/external-dns-provider-values branch June 19, 2026 07:52
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.

2 participants