[Bug]: Anonymized field does not work
Closed this issue · 2 comments
chnyda commented
Checklist
- I've searched for similar issues and couldn't find anything matching
- I've included steps to reproduce the behavior
Affected Components
- K8sGPT (CLI)
- K8sGPT Operator
K8sGPT Version
No response
Kubernetes Version
No response
Host OS and its Version
No response
Steps to reproduce
- Create a k8sgpt with anonymized set to False.
spec:
ai:
anonymized: false
backend: localai
...
- Wait for the controller to add a finalizer
- The k8sgpt is now like this
spec:
ai:
anonymized: true
backend: localai
...
Expected behaviour
The anonymized field should stay as it was during the creation of the object.
Actual behaviour
When the finalizer is added to the resource and the resource is updated, some fields are set to the default values, probably because of omitempty. One solution is to use pointers instead of pure booleans.
Additional Information
No response