-
-
Notifications
You must be signed in to change notification settings - Fork 162
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
Handle large resource spec being annotated to last-handled-configuration
#1087
Comments
wow this is unfortunate, literally the first lines of code I write with kopf and I hit this error: import kopf
|
Kopf is designed to work "out of the box" for the majority of cases, i.e. of typically small resources — without any special configuration or external dependencies. For this, it uses annotations to store its per-object state. However, if Kubernetes prohibits storing big values, Kopf can do nothing here. I am open to suggestions though. What an operator developer can do, is to configure their own state storage (2 storages of 2 types, actually), as documented here:
It can be e.g. a MySQL/Postgres/any other AWS RDS database, or even a filesystem (if the volume is persisted and shared across multiple instanced of Kopf or on restarts). All of this requires some extra configuration to start an operator and therefore is not the default "out of the box" setup. There is also the Kopf-provided storage to store the state in the |
I have a problem https://github.com/telekom-mms/trivy-dojo-report-operator which uses kopf and works with |
Keywords
annotation, spec, last-handled-configuration, finalizers
Problem
When dealing with a resource that has a large
spec
, the operator is throwing an errorThis is due to the fact that it is trying to store the spec in the
last-handled-configuration
annotation.It is especially problematic during deletion as it blocks the deletion using the finalizer, which never gets removed. So, how does one go about configuring the operator to handle such a scenario?
Note:
As per the doc Troubleshooting
Restarting the operator doesn't solve the problem. Only running this command unblocks it.
kubectl patch kopfexample kopf-example-1 -p '{"metadata": {"finalizers": []}}' --type merge
The text was updated successfully, but these errors were encountered: