Skip to content

Normalize line endings to LF and add .gitattributes for branch release 1.16#1029

Open
MilindRastogi24 wants to merge 1 commit into
karmada-io:release-1.16from
MilindRastogi24:eliminate-crlf-line-endings-release-1.16
Open

Normalize line endings to LF and add .gitattributes for branch release 1.16#1029
MilindRastogi24 wants to merge 1 commit into
karmada-io:release-1.16from
MilindRastogi24:eliminate-crlf-line-endings-release-1.16

Conversation

@MilindRastogi24

@MilindRastogi24 MilindRastogi24 commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

…e-1.16

What type of PR is this?

kind feature

What this PR does / why we need it:
Normalize line endings to LF and add .gitattributes for the release 1.16 branch

Enforce LF line endings repository-wide and convert 18 files that were
committed with CRLF.

Which issue(s) this PR fixes:
Part of #1026

Special notes for your reviewer:

@karmada-bot karmada-bot added the size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label Jun 17, 2026
@MilindRastogi24 MilindRastogi24 changed the base branch from main to release-1.16 June 17, 2026 11:13

@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 introduces a .gitattributes file to normalize line endings across the repository and applies formatting/line-ending normalization to various documentation files, including compatibility guides and upgrade notes in both English and Chinese. The reviewer identified several minor grammatical errors, typos, and a missing trailing newline in the documentation files (compatibility.md and v1.11-v1.12.md), which should be addressed to improve clarity and maintain formatting standards.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.


### API Changes

- Introduced `SecretRef` to `Karmada` API as part of the configuration for connecting to an external etcd cluster can be used to reference a secret that contains credentials for connecting to an external etcd cluster.

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

The sentence is missing a relative pronoun (like "which" or "that") or needs to be split to be grammatically correct.

Suggested change:

- Introduced `SecretRef` to `Karmada` API as part of the configuration for connecting to an external etcd cluster, which can be used to reference a secret that contains credentials for connecting to an external etcd cluster.


- Introduced `SecretRef` to `Karmada` API as part of the configuration for connecting to an external etcd cluster can be used to reference a secret that contains credentials for connecting to an external etcd cluster.
- Introduced `extraVolumes` and `extraVolumemounts` to the `Karmada` API to optionally specify extra volumes and volume mounts for the Karmada API server component.
- Introduced `ApiServerService` field to `Karmada` API as part of the Karmada instance status can be used to reference the API Server service for that instance. This is useful for scenarios where higher level operators need to discover the API Server service of a Karmada instance for tasks like setting up ingress traffic.

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

The sentence is missing a relative pronoun and has a double space typo ("instance for").

Suggested change:

- Introduced `ApiServerService` field to `Karmada` API as part of the Karmada instance status, which can be used to reference the API Server service for that instance. This is useful for scenarios where higher level operators need to discover the API Server service of a Karmada instance for tasks like setting up ingress traffic.

### karmada-controller-manager

- Introduced feature gate `StatefulFailoverInjection` to control whether Karmada collects and injects state information during a failover event for stateful application.
- The feature `Failover` now has been disabled by default, which should be explicitly enabled to avoid unexpected incidents. No newline at end of file

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

This file is missing a trailing newline at the end of the file. Since this pull request focuses on normalizing line endings, please ensure all files end with a newline character (LF) to adhere to POSIX standards and standard editor configurations.

Users can extend Karmada’s API surface in the same way they extend Kubernetes -- whether for custom resources or
third-party integrations.

To view all supported APIs, run the `karmadactl api-resources` command against Karmada, this lists all supported API

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

There is a minor grammatical typo: "all supported API" should be plural "all supported APIs".

Suggested change:

To view all supported APIs, run the `karmadactl api-resources` command against Karmada, this lists all supported APIs

- **聚合 APIServer**:Karmada 的 Cluster API 通过 karmada-aggregated-apiserver 扩展,用户可直接通过 Karmada 统一 API 端点查询成员集群资源(如 Nodes、Pods)。
用户可以通过与扩展 Kubernetes 相同的方式扩展 Karmada 的 API 能力,无论是自定义资源还是第三方集成。

要查看所有支持的 API,请对 Karmada 执行 `karmadactl api-resources` 命令,该命令会列出包括 Kubernetes API 和扩展 API 在内的所有支持API,输出示例如下:

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

There is a minor typo in the Chinese translation: "所有支持API" should be "所有支持的 API" to be consistent with the rest of the document.

Suggested change:

要查看所有支持的 API,请对 Karmada 执行 `karmadactl api-resources` 命令,该命令会列出包括 Kubernetes API 和扩展 API 在内的所有支持的 API,输出示例如下:

@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 introduces a .gitattributes file to normalize line endings across the repository and standardizes trailing newlines in several documentation files. The review feedback recommends expanding the .gitattributes file to explicitly handle Windows batch files with CRLF and Makefiles with LF to prevent execution failures on different platforms.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread .gitattributes
Comment on lines +17 to +18
# Shell scripts must use LF
*.sh text eol=lf

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

Windows batch files (*.bat, *.cmd) require CRLF line endings to execute properly on Windows systems. If they are normalized to LF, they may fail to run or encounter syntax errors. Conversely, Makefile and *.mk files must use LF line endings to prevent make execution failures on Unix/Linux environments. Adding these explicit rules ensures cross-platform compatibility.

# Shell scripts and Makefiles must use LF
*.sh text eol=lf
Makefile text eol=lf
*.mk text eol=lf

# Windows batch files must use CRLF
*.bat text eol=crlf
*.cmd text eol=crlf

@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 introduces a .gitattributes file to normalize line endings and manage binary assets, and updates documentation regarding Kubernetes compatibility and upgrading from v1.11 to v1.12. Feedback is provided to explicitly configure Windows batch files (*.bat and *.cmd) to use CRLF line endings in .gitattributes to ensure cross-platform compatibility, and to add a trailing newline to the upgrading documentation to adhere to standard POSIX conventions.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread .gitattributes
*.pdf binary

# Shell scripts must use LF
*.sh text eol=lf

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

Windows batch files (.bat and .cmd) require CRLF line endings to execute correctly on Windows systems. Since the repository-wide default is set to LF (* text=auto eol=lf), it is highly recommended to explicitly configure batch files to use CRLF to prevent execution failures on Windows.

*.sh text eol=lf

# Windows batch files must use CRLF
*.bat text eol=crlf
*.cmd text eol=crlf

### karmada-controller-manager

- Introduced feature gate `StatefulFailoverInjection` to control whether Karmada collects and injects state information during a failover event for stateful application.
- The feature `Failover` now has been disabled by default, which should be explicitly enabled to avoid unexpected incidents. No newline at end of file

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

The file does not end with a newline character. It is a standard POSIX convention and a best practice for text files to end with a newline to ensure compatibility with various command-line tools, editors, and git diffs.

…e-1.16

Co-authored-by: Cursor <cursoragent@cursor.com>
Signed-off-by: MilindRastogi24 <milindrastogicloud@gmail.com>
@MilindRastogi24 MilindRastogi24 force-pushed the eliminate-crlf-line-endings-release-1.16 branch from cfd2fc4 to 29a047e Compare June 17, 2026 11:23
@karmada-bot

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign rainbowmango 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants