Skip to content

fix: change kube_vip to kube-vip#3118

Merged
kubesphere-prow[bot] merged 1 commit into
kubesphere:mainfrom
redscholar:change_kube_vip_name
May 28, 2026
Merged

fix: change kube_vip to kube-vip#3118
kubesphere-prow[bot] merged 1 commit into
kubesphere:mainfrom
redscholar:change_kube_vip_name

Conversation

@redscholar

Copy link
Copy Markdown
Contributor

What type of PR is this?

/kind bug

What this PR does / why we need it:

Which issue(s) this PR fixes:

Fixes #

Special notes for reviewers:

Does this PR introduced a user-facing change?

change kube_vip to kube-vip

Additional documentation, usage docs, etc.:


Signed-off-by: redscholar <blacktiledhouse@gmail.com>
@kubesphere-prow kubesphere-prow Bot added release-note kind/bug Categorizes issue or PR as related to a bug. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels May 28, 2026
@kubesphere-prow

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: redscholar

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

The pull request process is described 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

@kubesphere-prow kubesphere-prow Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label May 28, 2026
@sonarqubecloud

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Code Review

This pull request standardizes the naming of the control plane endpoint type by replacing "kube_vip" with "kube-vip" across various Ansible tasks, configuration defaults, and documentation files. The reviewer raised critical feedback regarding backward compatibility, pointing out that strictly checking for "kube-vip" will break operations (such as uninstallation, initialization, prechecks, and DNS configuration) on existing clusters that were deployed using the older "kube_vip" value. It is recommended to update the conditional statements to support both "kube-vip" and "kube_vip" values.


- name: Network | Remove ARP and IP address entries for kube-vip
when: eq .kubernetes.control_plane_endpoint.type "kube_vip"
when: eq .kubernetes.control_plane_endpoint.type "kube-vip"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

high

Changing the type check strictly to kube-vip will break uninstallation for existing clusters that were deployed with kube_vip in their configuration. To ensure backward compatibility and prevent leaving stale ARP/IP entries on the nodes during uninstallation, we should support both kube-vip and kube_vip values.

  when: or (eq .kubernetes.control_plane_endpoint.type "kube-vip") (eq .kubernetes.control_plane_endpoint.type "kube_vip")


- name: Delete arp by kube-vip
when: eq .kubernetes.control_plane_endpoint.type "kube_vip"
when: eq .kubernetes.control_plane_endpoint.type "kube-vip"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

high

To maintain backward compatibility for existing clusters that were installed with kube_vip, we should allow both kube-vip and kube_vip during the uninstallation process. Otherwise, the ARP/IP cleanup tasks will be skipped for those clusters.

  when: or (eq .kubernetes.control_plane_endpoint.type "kube-vip") (eq .kubernetes.control_plane_endpoint.type "kube_vip")

when:
- .kubernetes.kube_version | semverCompare ">=v1.29.0"
- eq .kubernetes.control_plane_endpoint.type "kube_vip"
- eq .kubernetes.control_plane_endpoint.type "kube-vip"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

To ensure backward compatibility for existing clusters during initialization/upgrade phases, we should accept both kube-vip and kube_vip values.

        - or (eq .kubernetes.control_plane_endpoint.type "kube-vip") (eq .kubernetes.control_plane_endpoint.type "kube_vip")

when:
- .kubernetes.kube_version | semverCompare ">=v1.29.0"
- eq .kubernetes.control_plane_endpoint.type "kube_vip"
- eq .kubernetes.control_plane_endpoint.type "kube-vip"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

To ensure backward compatibility for existing clusters during initialization/upgrade phases, we should accept both kube-vip and kube_vip values.

        - or (eq .kubernetes.control_plane_endpoint.type "kube-vip") (eq .kubernetes.control_plane_endpoint.type "kube_vip")

include_tasks: high-availability/kube_vip.yaml
when:
- .kubernetes.control_plane_endpoint.type | eq "kube_vip"
- .kubernetes.control_plane_endpoint.type | eq "kube-vip"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

To ensure backward compatibility for existing clusters during deployment or scaling operations, we should support both kube-vip and kube_vip values.

    - or (.kubernetes.control_plane_endpoint.type | eq "kube-vip") (.kubernetes.control_plane_endpoint.type | eq "kube_vip")

cat >> {{ .item }} <<EOF
# kubekey kubernetes control_plane_endpoint BEGIN
{{- if .kubernetes.control_plane_endpoint.type | eq "kube_vip" }}
{{- if .kubernetes.control_plane_endpoint.type | eq "kube-vip" }}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

To ensure backward compatibility for existing clusters, the DNS configuration should handle both kube-vip and kube_vip values.

    {{- if or (.kubernetes.control_plane_endpoint.type | eq "kube-vip") (.kubernetes.control_plane_endpoint.type | eq "kube_vip") }}

- name: Kubernetes | Validate kube-vip address
run_once: true
when: .kubernetes.control_plane_endpoint.type | eq "kube_vip"
when: .kubernetes.control_plane_endpoint.type | eq "kube-vip"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

To ensure backward compatibility for existing clusters during precheck, we should validate the kube-vip address if the type is either kube-vip or kube_vip.

  when: or (.kubernetes.control_plane_endpoint.type | eq "kube-vip") (.kubernetes.control_plane_endpoint.type | eq "kube_vip")

fail_msg: >-
"kubernetes.control_plane_endpoint.kube_vip.address" should be a un-used ip address.
when: .kubernetes.control_plane_endpoint.type | eq "kube_vip"
when: .kubernetes.control_plane_endpoint.type | eq "kube-vip"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

To ensure backward compatibility for existing clusters during precheck, we should validate the kube-vip address if the type is either kube-vip or kube_vip.

  when: or (.kubernetes.control_plane_endpoint.type | eq "kube-vip") (.kubernetes.control_plane_endpoint.type | eq "kube_vip")

@redscholar redscholar added the lgtm Indicates that a PR is ready to be merged. label May 28, 2026
@kubesphere-prow kubesphere-prow Bot merged commit 32da750 into kubesphere:main May 28, 2026
4 checks passed
@redscholar redscholar deleted the change_kube_vip_name branch May 28, 2026 10:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. kind/bug Categorizes issue or PR as related to a bug. lgtm Indicates that a PR is ready to be merged. release-note size/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant