Skip to content

Allow sidecars to specify probe port #8949

@emaildanwilson

Description

@emaildanwilson

Currently the API for container livenessProbe and readinessProbe doesn't allow port to be specified since containerPort is already provided. In a multi-container use case, containerPort can only be specified on one container which provides a clear way to identify the container and port which receives traffic. As a side effect, it's currently not possible to configure a sidecar container with liveness/readiness probes using either httpGet or tcpSocket.

A non-ideal workaround for readinessProbe exists to design the primary container's health check code to also check the health of any dependent sidecars. This isn't a typical consideration of the service developer and would not work in many cases for third party containers.

Since k8s restarts the specific container that fails a livenessProbe and NOT the entire pod, this same workaround is not effective for livenessProbe and instead would result in unnecessary restarts of the primary container.

Metadata

Metadata

Labels

good first issueDenotes 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.kind/api-changeCategorizes issue or PR as related to adding, removing, or otherwise changing an APIkind/featureWell-understood/specified features, ready for coding.lifecycle/frozenIndicates that an issue or PR should not be auto-closed due to staleness.triage/acceptedIssues which should be fixed (post-triage)

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions