Skip to content

chore(base-cluster/dns): migrate external-dns away from bitnami#1601

Merged
cwrau merged 1 commit intomainfrom
chore/base-cluster/migrate-away-from-bitnami
Jul 25, 2025
Merged

chore(base-cluster/dns): migrate external-dns away from bitnami#1601
cwrau merged 1 commit intomainfrom
chore/base-cluster/migrate-away-from-bitnami

Conversation

@cwrau
Copy link
Copy Markdown
Member

@cwrau cwrau commented Jul 21, 2025

Summary by CodeRabbit

  • Chores
    • Updated the external-dns chart to use the official Kubernetes SIGs Helm repository and version 1.18.0.
    • Simplified and standardized the external-dns configuration, including image, provider, and metrics settings.
    • Improved security context and secret handling for Cloudflare integration.
    • Removed deprecated or redundant configuration options for improved maintainability.
    • Added trusted status for all tags of the external-dns image under the official registry.

Copilot AI review requested due to automatic review settings July 21, 2025 14:16
@cwrau cwrau enabled auto-merge July 21, 2025 14:16
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Jul 21, 2025

Walkthrough

The changes update the deployment of the external-dns Helm chart by switching its source from the Bitnami repository to the official Kubernetes SIGs repository, updating the chart version, and restructuring the HelmRelease manifest for clarity and consistency. Image, provider, security, RBAC, and metrics configurations were revised, with conditionals and deprecated settings removed. Additionally, the trusted registries configuration was expanded to trust all tags for the external-dns image under registry.k8s.io.

Changes

File(s) Change Summary
charts/base-cluster/templates/dns/external-dns.yaml Refactored HelmRelease manifest: changed chart repo, image config, provider structure, security context, RBAC, metrics, and removed conditionals and deprecated fields.
charts/base-cluster/values.yaml Removed Bitnami repo for external-dns; added official external-dns repo and updated chart version.
.github/trusted_registries.yaml Added external-dns under registry.k8s.io with tag policy ALL_TAGS to trusted container image registries.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

In the warren of clusters, DNS hops anew,
With charts now official, and configs trimmed too.
Security’s tighter, the metrics are neat,
Our external-dns is ready to greet!
🐇✨

— A happy CodeRabbit, hopping through Helm charts


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between f1af463 and 10860be.

📒 Files selected for processing (3)
  • .github/trusted_registries.yaml (1 hunks)
  • charts/base-cluster/templates/dns/external-dns.yaml (3 hunks)
  • charts/base-cluster/values.yaml (1 hunks)
✅ Files skipped from review due to trivial changes (1)
  • .github/trusted_registries.yaml
🚧 Files skipped from review as they are similar to previous changes (2)
  • charts/base-cluster/values.yaml
  • charts/base-cluster/templates/dns/external-dns.yaml
✨ Finishing Touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch chore/base-cluster/migrate-away-from-bitnami

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai generate unit tests to generate unit tests for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR migrates the external-dns Helm chart from the Bitnami repository to the official Kubernetes SIGs external-dns repository. This change involves updating the chart source, version, and configuration parameters to align with the new chart's structure and API.

  • Updates external-dns chart source from Bitnami to kubernetes-sigs repository
  • Upgrades chart version from 5.4.8/8.9.2 to 1.18.0
  • Refactors configuration values to match the new chart's schema and removes legacy API version handling

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
charts/base-cluster/values.yaml Updates external-dns chart repository URL and version configuration
charts/base-cluster/templates/dns/external-dns.yaml Refactors template to use new chart schema, removes legacy API handling, and updates configuration structure

Comment thread charts/base-cluster/templates/dns/external-dns.yaml
Comment thread charts/base-cluster/templates/dns/external-dns.yaml
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🧹 Nitpick comments (4)
charts/base-cluster/values.yaml (1)

119-122: Repository block lacks conditional & housekeeping keys

Every other repository entry either carries a condition or interval (sometimes both) so Renovate/Flux only pulls when it is actually needed.
With an unconditional external-dns repo the reconciler will query the upstream index on every cluster, even when dns.provider is null, which is unnecessary churn and log noise.

 external-dns:
   url: https://kubernetes-sigs.github.io/external-dns
   charts:
     external-dns: 1.18.0
+  # pull chart only when external-dns is actually in use
+  condition: "{{ not (empty .Values.dns.provider) }}"
+  interval: 5m
charts/base-cluster/templates/dns/external-dns.yaml (3)

33-39: Hard-coded secret name may clash with multi-cluster setups

The Cloudflare block always mounts secretKeyRef.name: external-dns.
If several clusters share the same Git repository the secret names usually carry the cluster suffix (external-dns-<cluster>).

Expose the secret name through values to avoid manual patching:

-            name: external-dns
+            name: {{ default "external-dns" .Values.dns.provider.cloudflare.secretName }}

62-65: additionalLabels renders null when unset

include "common.tplvalues.render" returns null for an empty map, which the YAML emitter will still output, producing:

additionalLabels: null

Some Prometheus setups choke on that.
Wrap the block with a guard:

-    serviceMonitor:
-      enabled: {{ .Values.monitoring.prometheus.enabled }}
-      additionalLabels: {{- include "common.tplvalues.render" (dict "value" .Values.monitoring.labels "context" .) | nindent 10 }}
+    serviceMonitor:
+      enabled: {{ .Values.monitoring.prometheus.enabled }}
+      {{- with .Values.monitoring.labels }}
+      additionalLabels: {{- include "common.tplvalues.render" (dict "value" . "context" $) | nindent 10 }}
+      {{- end }}

53-54: Registry hard-coded to txt

If someone wants to use the S3 or AWS Route53 registry back-ends, the value must be overridden in user-values. Consider templating it:

-    registry: txt
+    registry: {{ default "txt" .Values.externalDNS.registry }}
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between eec214f and e6c2ce6.

📒 Files selected for processing (2)
  • charts/base-cluster/templates/dns/external-dns.yaml (3 hunks)
  • charts/base-cluster/values.yaml (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: check licenses
  • GitHub Check: lint helm chart (base-cluster)
  • GitHub Check: wait-for-checks

Comment thread charts/base-cluster/templates/dns/external-dns.yaml
Comment thread charts/base-cluster/templates/dns/external-dns.yaml
@cwrau cwrau force-pushed the chore/base-cluster/migrate-away-from-bitnami branch from e6c2ce6 to dbd4342 Compare July 21, 2025 14:56
@cwrau cwrau changed the title chore(base-cluster/dns): migrate away from bitnami chore(base-cluster/dns): migrate external-dns away from bitnami Jul 21, 2025
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

♻️ Duplicate comments (3)
charts/base-cluster/templates/dns/external-dns.yaml (3)

26-28: Image tag is still floating
Same concern previously raised: the image: stanza lacks an explicit tag, so the cluster will follow upstream tags implicitly.


30-31: Provider map → string breaking change still unguarded

The template still assumes dns.provider is a map and calls keys | first. Existing values files that pass a plain string will explode at render time.


56-60: Security hardening settings removed

runAsNonRoot, readOnlyRootFilesystem, allowPrivilegeEscalation: false, and capability drops are still missing, reducing defence-in-depth.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between e6c2ce6 and dbd4342.

📒 Files selected for processing (2)
  • charts/base-cluster/templates/dns/external-dns.yaml (3 hunks)
  • charts/base-cluster/values.yaml (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • charts/base-cluster/values.yaml
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
  • GitHub Check: Update release-please config file for a possibly new chart
  • GitHub Check: check licenses
  • GitHub Check: lint helm chart (base-cluster)
  • GitHub Check: wait-for-checks
🔇 Additional comments (1)
charts/base-cluster/templates/dns/external-dns.yaml (1)

11-11: Pin the chart version to avoid silent upgrades

chart.spec is now built via the helper, but the rendered object does not explicitly pin a version. Without an immutable version, Flux may pick up whatever the repository advertises as “latest”, causing cross-cluster drift.

Confirm that base-cluster.helm.chartSpec injects a fixed version: field (e.g. 1.18.0).
If not, add it.

Comment thread charts/base-cluster/templates/dns/external-dns.yaml
marvinWolff
marvinWolff previously approved these changes Jul 25, 2025
@cwrau cwrau force-pushed the chore/base-cluster/migrate-away-from-bitnami branch from 20fea65 to f096019 Compare July 25, 2025 09:03
marvinWolff
marvinWolff previously approved these changes Jul 25, 2025
@cwrau cwrau force-pushed the chore/base-cluster/migrate-away-from-bitnami branch from f096019 to f1af463 Compare July 25, 2025 13:53
@cwrau cwrau force-pushed the chore/base-cluster/migrate-away-from-bitnami branch from f1af463 to 10860be Compare July 25, 2025 14:20
Copy link
Copy Markdown
Collaborator

@tasches tasches left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@cwrau cwrau added this pull request to the merge queue Jul 25, 2025
Merged via the queue into main with commit 7af34d2 Jul 25, 2025
17 checks passed
@cwrau cwrau deleted the chore/base-cluster/migrate-away-from-bitnami branch July 25, 2025 15:03
github-merge-queue Bot pushed a commit that referenced this pull request Jul 31, 2025
🤖 I have created a release *beep* *boop*
---


##
[9.1.0](base-cluster-v9.0.0...base-cluster-v9.1.0)
(2025-07-31)


### Features

* **base-cluster:** use new networkPolicy template
([#1414](#1414))
([e433c02](e433c02))


### Bug Fixes

* **base-cluster/kyverno:** migrate to new `validationFailureAction`
syntax
([#1621](#1621))
([c3f16be](c3f16be))
* **base-cluster/monitoring:** also create metrics for resources without
suspend field
([#1634](#1634))
([964b34c](964b34c))
* **base-cluster/monitoring:** oauth-proxy serviceMonitor labels
([#1625](#1625))
([86c1981](86c1981))
* **base-cluster/monitoring:** pin image-renderer version to ensure it's
compatible
([#1631](#1631))
([685592c](685592c))


### Miscellaneous Chores

* **base-cluster/dependencies:** update helm release
kube-prometheus-stack to v75.15.1
([#1610](#1610))
([256cb8e](256cb8e))
* **base-cluster/dependencies:** update helm release loki to v6.33.0
([#1618](#1618))
([7e6a8e8](7e6a8e8))
* **base-cluster/dns:** migrate external-dns away from bitnami
([#1601](#1601))
([7af34d2](7af34d2))
* **base-cluster/monitoring:** adjust metrics syntax
([#1562](#1562))
([ebc2d74](ebc2d74))
* **base-cluster/monitoring:** migrate metrics-server away from bitnami
([#1604](#1604))
([6a755d9](6a755d9))
* **base-cluster:** migrate kubectl image away from bitnami
([#1606](#1606))
([6fe2410](6fe2410))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **New Features**
  * Introduced a new networkPolicy template in the base-cluster.

* **Bug Fixes**
* Updated kyverno component to use the latest `validationFailureAction`
syntax.
  * Added metrics for resources in monitoring that lack a suspend field.
* Corrected labels in the oauth-proxy serviceMonitor within monitoring.
  * Pinned image-renderer version to ensure compatibility.

* **Chores**
  * Upgraded helm releases for kube-prometheus-stack and loki.
* Migrated external-dns, metrics-server, and kubectl images away from
bitnami.
  * Adjusted metrics syntax in monitoring.

* **Documentation**
  * Added changelog entry for version 9.1.0.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
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.

4 participants