Skip to content
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

[Bug]: Anonymized field does not work #306

Closed
3 of 4 tasks
chnyda opened this issue Jan 3, 2024 · 2 comments · Fixed by #332
Closed
3 of 4 tasks

[Bug]: Anonymized field does not work #306

chnyda opened this issue Jan 3, 2024 · 2 comments · Fixed by #332
Labels
bug Something isn't working

Comments

@chnyda
Copy link

chnyda commented Jan 3, 2024

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

  1. Create a k8sgpt with anonymized set to False.
  spec:
    ai:
      anonymized: false
      backend: localai
     ...
  1. Wait for the controller to add a finalizer
  2. 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

@arbreezy
Copy link
Member

hey @chnyda,

Could you please share the version of your operator and the version of k8sgpt's deployment ?

@arbreezy arbreezy added the bug Something isn't working label Jan 16, 2024
@arbreezy
Copy link
Member

I found a reference for more context, as you rightly suggested probably switching to a pointer will resolve this, thanks for raising it :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants