Skip to content

skip the PodListeners lookup when the served Pod is being deleted #720

Description

@soenkeliebau

Problem

The secret-operator needs to read PodListeners in order to retrieve additional listener addresses to generate into the SAN field of certificates it creates. It has a long timeout waiting for these objects to appear, when a pod is spawned and requests the listener scope on certificates.
Especially during namespace deletion (maybe at other times as well) this can become a problem, when the PodListeners get deleted and the secret operator waits for them indefinitely. Since this is part of the NodePublishVolume step, this results in the Pod being stuck and holding pvc-protection.

Fix

In NodePublishVolume, if the Pod the volume serves has a deletionTimestamp, skip the
PodListeners lookup and issue the (throwaway) certificate without listener SANs so the mount can
complete. A Pod that is being deleted does not need listener-addressed certs.

The startup/steady-state path is unchanged: live Pods still wait for their listener addresses, so no
correctness regression and no startup race, the guard only relaxes behaviour for Pods already
marked for deletion.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions