-
-
Notifications
You must be signed in to change notification settings - Fork 165
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
KeyError: 'apiVersion' in Kopf 1.37.x with Kubernetes 1.30.x #1144
Comments
Hello. Thanks for reporting. A preliminary fix is in #1151, but I would like to request some clarification. To which operator does this I need this information in order to reproduce the issue locally, and to decide what to do in this case: either accept the ref "as is" without |
Colleague of the original poster here. Yes, |
@nolar any progress on this? |
I have the same error when trying this example https://github.com/nolar/kopf/tree/main/examples/04-events
|
I applied #1151 locally and it seems to be working now without crashing. |
Discussed in #1143
Originally posted by drexlar5 December 3, 2024
Summary
I’m encountering a recurring
KeyError: 'apiVersion'
error in Kopf when it attempts to post events. This happens despite ensuring compatibility between Kopf, the Kubernetes Python client, and the Kubernetes server version.Environment Details
1.37.3
30.5.0
v1.30.5-gke.1443001
v1.30.6-dispatcher
I’m running Kopf in a containerized environment, and the same issue is reproducible across different deployments.
Error Logs
Below are the logs I consistently see whenever that is a change to the custom applicationSet resource that kopf is watching:
This error occurs during the posting of Kubernetes events, specifically when Kopf tries to access the apiVersion field of the ref object.
What I have tried
Updated Versions for Compatibility:
1.37.3
30.5.0
v1.30.5
Tested on Local KIND Environment:
Expected Behavior
Kopf should gracefully handle situations where the
apiVersion
field is missing from theref
object, or ensure that it is always populated during event posting.Additional Notes
The text was updated successfully, but these errors were encountered: