Kube Play mishandles the Optional field in Volume of type Secret #16636
Labels
kind/bug
Categorizes issue or PR as related to a bug.
locked - please file new issue/PR
Assist humans wanting to comment on an old issue or PR with locked comments.
Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)
/kind bug
Description
Kube Play has two issues when it handles a Volume with SecretVolumeSource:
Optional
in theSecretVolumeSource
structure is an optional field with a default value offalse
. However, not setting the field causes a segmentation fault. The reason for the segmentation fault is that since the field is optional its type it*bool
, but the code derefereneces it without checking if it is not nilOptional
totrue
causes Podman to disregard the secret even if it existsSteps to reproduce the issue:
optional
field or set it totrue
Describe the results you received:
When not setting
optional
, Podman crashesWhen setting
optional
totrue
the container is created but the secret is not mounted into itDescribe the results you expected:
In both cases, since the secret exists, it should be mounted into the container
Output of
podman version
:Output of
podman info
:Package info (e.g. output of
rpm -q podman
orapt list podman
orbrew info podman
):Have you tested with the latest version of Podman and have you checked the Podman Troubleshooting Guide? (https://github.com/containers/podman/blob/main/troubleshooting.md)
Yes
The text was updated successfully, but these errors were encountered: