Ansible Operator - CR based log segregation

11 views
Skip to first unread message

Anup Chandak

unread,
Jul 28, 2022, 4:34:14 AM7/28/22
to Operator Framework
Team

I have developed an ansible based operator for my application.

In production, as it will be a multi-tenant environment, I will be having multiple Custom Resources.

Currently, the controller shows the logs for all the CRs jumbled up.

How can I configure the controller to log to a file specific for each CR?  

TIA!
Anup Chandak

Sid Kattoju

unread,
Jul 28, 2022, 7:44:26 AM7/28/22
to Anup Chandak, Operator Framework
Hi Anup,

You typically want to have centralized logging where you can filter based on what you need. You can set up centralized logging with the help of another operator. Given that your controller typically runs in a cluster it may not be worth it to segregate logs "locally". That said the operator sdk default logger is zap[1] and you can configure that as needed.


Best Regards,

Sid.

--
You received this message because you are subscribed to the Google Groups "Operator Framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email to operator-framew...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/operator-framework/d3cc23f6-3396-48d3-ab8a-b0403518529en%40googlegroups.com.

Anup Chandak

unread,
Jul 29, 2022, 9:00:37 AM7/29/22
to Operator Framework
Thank you Sid for taking out the time and replying to my query. 

Yes, I am thinking of using LogDNA. Let's see how that goes.

Cheers!
Anup
Reply all
Reply to author
Forward
0 new messages