Skip to content

Commit 20cf0f0

Browse files
committed
Clarify /ephemeralcontainers discard behavior
1 parent a00aef6 commit 20cf0f0

File tree

1 file changed

+7
-4
lines changed
  • keps/sig-node/277-ephemeral-containers

1 file changed

+7
-4
lines changed

keps/sig-node/277-ephemeral-containers/README.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -193,9 +193,11 @@ similarly to updating `Pod.Status` via `/status`.
193193
The end-to-end process for creating an ephemeral container is:
194194

195195
1. Fetch a `Pod` object from the `/pods` resource.
196-
1. Modify the object and write it back to the pod's `/ephemeralcontainers`
197-
subresource, for example using `UpdateEphemeralContainers` in the generated
198-
client. (Patching is also supported on `/ephemeralcontainers`.)
196+
1. Modify `spec.ephemeralContainers` and write it back to the Pod's
197+
`/ephemeralcontainers` subresource, for example using `UpdateEphemeralContainers`
198+
in the generated client. (Patching is also supported on `/ephemeralcontainers`.)
199+
1. The apiserver discards all changes except those to `spec.ephemeralContainers`.
200+
That is, only `spec.ephemeralContainers` may be changed via `/ephemeralcontainers`.
199201
1. The apiserver validates the update.
200202
1. Pod validation fails if container spec contains fields disallowed for
201203
Ephemeral Containers or the same name as a container in the spec or
@@ -635,7 +637,8 @@ via this subresource. `EphemeralContainerStatuses` is updated in the same manner
635637
as everything else in `Pod.Status` via `/status`.
636638

637639
`Pod.Spec.EphemeralContainers` may be updated via `/ephemeralcontainers` as per
638-
normal (using PUT, PATCH, etc).
640+
normal (using PUT, PATCH, etc) except that existing Ephemeral Containers may
641+
not be modified.
639642

640643
The subresources `attach`, `exec`, `log`, and `portforward` are available for
641644
Ephemeral Containers and will be forwarded by the apiserver. This means `kubectl

0 commit comments

Comments
 (0)