Skip to content

Conversation

@rtmiz
Copy link

@rtmiz rtmiz commented Oct 7, 2025

Add: add_custom_event method, custom_event_queue trait,
Update: events property to handle custom events

Adjust KubeSpawner class so you can easily include custom messages for the user during the spawning process, for instance like so (When using hooks inside of a jupyterhub config):

import time
from datetime import datetime, timezone

def modify_pod_hook(spawner, pod):
    spawner.add_custom_event(
        eventTime=str(datetime.now(timezone.utc)),
        lastTimestamp
        message="Test event. This is a test event inside of modify_pod_hook.",
        type="Custom",
        involvedObject: {"name": spawner.pod_name},
        metadata: {"uid": str(time.time())}
    )
    return pod

Closes #899

@rtmiz
Copy link
Author

rtmiz commented Oct 7, 2025

Seems like the failing tests are related to #895

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

System for displaying internal spawn messages outside of K8s events

1 participant