Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

API documentation incorrectly states that resizePolicy can be set to ephemeral containers #128384

Copy link
Copy link
Open
@jyh071116

Description

@jyh071116
Issue body actions

What happened?

스크린샷 2024-10-27 172423
Based on the concept of resizePolicy, it is expected behavior that resizePolicy cannot be assigned to ephemeral containers, as they do not support resource requests or limits.

However, in the Kubernetes v1.31 API documentation, there is no clear indication that the resizePolicy option is disallowed for ephemeral containers, which may lead to confusion for users.
image
image

pkg/apis/core/validation/validation_test.go

func TestValidateEphemeralContainers(t *testing.T) {
...
...
...
	{
			"Container uses disallowed field: ResizePolicy",
			line(),
			[]core.EphemeralContainer{{
				EphemeralContainerCommon: core.EphemeralContainerCommon{
					Name:                     "resources-resize-policy",
					Image:                    "image",
					ImagePullPolicy:          "IfNotPresent",
					TerminationMessagePolicy: "File",
					ResizePolicy: []core.ContainerResizePolicy{
						{ResourceName: "cpu", RestartPolicy: "NotRequired"},
					},
				},
			}},
			field.ErrorList{{Type: field.ErrorTypeForbidden, Field: "ephemeralContainers[0].resizePolicy"}},
		}
	...
	...
	...

As shown in the code above, it is explicitly stated that resizePolicy cannot be assigned to ephemeral containers.
This restriction is not reflected in the API documentation, potentially leading users to believe they can apply resizePolicy to ephemeral containers. Including this limitation in the documentation would improve clarity and enhance the user experience.

What did you expect to happen?

The Kubernetes v1.31 API documentation should clearly state that resizePolicy cannot be assigned to ephemeral containers, as they do not support resource requests or limits. This clarification would prevent users from mistakenly assuming that resizePolicy can be applied to ephemeral containers and help avoid configuration errors.

How can we reproduce it (as minimally and precisely as possible)?

  1. Go to the Kubernetes v1.31 API documentation.
  2. Navigate to the section discussing resizePolicy for containers.
  3. Review the documentation regarding ephemeral containers.
  4. Observe that there is no mention or clarification that resizePolicy cannot be applied to ephemeral containers, leading to potential misunderstandings.

Anything else we need to know?

No response

Kubernetes version

$ kubectl version
Client Version: v1.31.1
Kustomize Version: v5.4.2
Server Version: v1.31.1

Cloud provider

On-Premises

OS version

# On Linux:
$ cat /etc/os-release
RETTY_NAME="Ubuntu 22.04.4 LTS"
NAME="Ubuntu"
VERSION_ID="22.04"
VERSION="22.04.4 LTS (Jammy Jellyfish)"
VERSION_CODENAME=jammy
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=jammy

$ uname -a
Linux masternode-virtual-machine 6.8.0-47-generic #47~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Wed Oct  2 16:16:55 UTC 2 x86_64 x86_64 x86_64 GNU/Linux

Install tools

kubeadm

Container runtime (CRI) and version (if applicable)

containerd

Related plugins (CNI, CSI, ...) and versions (if applicable)

Metadata

Metadata

Labels

good first issueDenotes an issue ready for a new contributor, according to the "help wanted" guidelines.Denotes an issue ready for a new contributor, according to the "help wanted" guidelines.help wantedDenotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.kind/documentationCategorizes issue or PR as related to documentation.Categorizes issue or PR as related to documentation.priority/backlogHigher priority than priority/awaiting-more-evidence.Higher priority than priority/awaiting-more-evidence.sig/nodeCategorizes an issue or PR as relevant to SIG Node.Categorizes an issue or PR as relevant to SIG Node.triage/acceptedIndicates an issue or PR is ready to be actively worked on.Indicates an issue or PR is ready to be actively worked on.

Type

No type

Projects

Status

Triaged
Show more project fields

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    Morty Proxy This is a proxified and sanitized view of the page, visit original site.