Skip to content

Conversation

@hadi2f244
Copy link

What type of PR is this?

/kind feature

What this PR does / why we need it:
This PR makes DNS autoscaler configuration explicit by rendering and applying a managed ConfigMap from Kubespray. It removes reliance on the autoscaler’s internal fallback defaults, ensuring consistent, predictable, and reproducible DNS autoscaling behavior across clusters.

Which issue(s) this PR fixes:

Fixes #12789

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

Yes. Kubespray now explicitly renders and manages the DNS autoscaler ConfigMap instead of relying on the autoscaler’s internal default configuration. While the default values remain unchanged, the resulting cluster resources and configuration ownership are now user-visible and fully managed by Kubespray.

Kubespray now explicitly creates and manages the DNS autoscaler ConfigMap instead of relying on upstream default configuration, ensuring consistent and reproducible DNS autoscaler behavior.

Copilot AI review requested due to automatic review settings December 21, 2025 21:50
@k8s-ci-robot k8s-ci-robot added the release-note Denotes a PR that will be considered when it comes time to generate release notes. label Dec 21, 2025
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: hadi2f244
Once this PR has been reviewed and has the lgtm label, please assign tico88612 for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Dec 21, 2025
@k8s-ci-robot
Copy link
Contributor

Hi @hadi2f244. Thanks for your PR.

I'm waiting for a github.com member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Dec 21, 2025
Copy link

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 makes DNS autoscaler configuration explicit and manageable by introducing a dedicated ConfigMap template. Instead of relying solely on the autoscaler's internal defaults (passed via --default-params), Kubespray now renders and manages a ConfigMap resource that contains the autoscaling parameters, ensuring consistent and reproducible behavior across clusters.

Key Changes:

  • Added a new ConfigMap template for DNS autoscaler configuration
  • Updated the manifest list to include the new ConfigMap template in the deployment sequence
  • The ConfigMap uses the same configuration parameters already defined in Kubespray defaults

Reviewed changes

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

File Description
roles/kubernetes-apps/ansible/vars/main.yml Adds dns-autoscaler-configmap.yml.j2 to the list of DNS autoscaler manifests that are deployed
roles/kubernetes-apps/ansible/templates/dns-autoscaler-configmap.yml.j2 New ConfigMap template that explicitly defines DNS autoscaler configuration using existing Kubespray variables (preventSinglePointFailure, coresPerReplica, nodesPerReplica, min replicas)

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@yankay
Copy link
Member

yankay commented Dec 23, 2025

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Dec 23, 2025
Copy link

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

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


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 4 to +5
- dns-autoscaler.yml.j2
- dns-autoscaler-configmap.yml.j2
Copy link

Copilot AI Jan 3, 2026

Choose a reason for hiding this comment

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

The ConfigMap should be created before the Deployment that references it. The dns-autoscaler deployment references this ConfigMap via the --configmap flag, but the ConfigMap is listed after the deployment in the manifest list. This could cause the deployment to fail or behave unexpectedly if it starts before the ConfigMap is created. Move dns-autoscaler-configmap.yml.j2 to line 4, before dns-autoscaler.yml.j2.

Suggested change
- dns-autoscaler.yml.j2
- dns-autoscaler-configmap.yml.j2
- dns-autoscaler-configmap.yml.j2
- dns-autoscaler.yml.j2

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Kubespray should explicitly create DNS autoscaler ConfigMap instead of relying on defaults

3 participants