Anyone using the OpenSearch output on the fluentbi...
# fluent-operator
d
Anyone using the OpenSearch output on the fluentbit operator? I am getting the exception
Invalid value: "string": spec.opensearch.httpPassword in body must be of type object: "string"
and I cant seem to make out what it means XD I've tried
"httpPassword": "admin"
and
"httpPassword": admin
and nether want to work for me and I feel like I'm loosing my mind lol.
p
what does a
kubectl explain
say about it on the CRD? It'll be some lovely typing in YAML
It looks to be a reference to plugins secret type so my guess is it is a nested object? https://github.com/fluent/fluent-operator/blob/master/apis/fluentbit/v1alpha2/plugins/output/open_search_types.go#L50
d
Ahhhhhhhh that makes so much more sense. I am a bit new to this so I will need to create a secret that contains the httpPassword and httpUser?
Then pass the reference to the secret into the config?
p
looks like it, which makes sense rather than specifying fixed values
I've not used it I'm afraid but
kubectl explain
and the docs should help a lot 🙂
d
the docs
why do you tease me XD I spent a few hours combing the docs to see how to use this but didnt find it. I was specifically looking for OpenSearch tho so maybe looking for this pattern is what I need to do
Thanks for the kubectl expain tip tho didn't realize that was a thing
p
yeah, plus the docs and project are OSS so feel free to add specific examples 🙂
it's hard for someone to document every possible use case so a collaborative and emerging thing I think as we go along
💯 1
d
100% will be when I get it running
p
my guess is the Elasticsearch example may be close enough but I could be wrong, I avoid both if I can help it 😛
@Benjamin Huo on the docs side, did we decide with @Anurag Gupta as well whether to push a full docs site up like fluentbit.io?
d
Yeah the ES one was my starting point but seems like the spec's have diverged a fair bit.
p
That's probably more a question for Elastic and Opensearch folks 🙂
d
Hi nice to meet you, I'm the senior advocate for OpenSearch 🥲
haha
On a serious note kubectl explain was the piece I was missing
p
lol ok, I was going to say I know their has been explicit Opensearch contribution which is why it is diverging
d
Yeah, they probably did that for security as we try to have everything be secure by default
p
we did also do a fluent operator walkthrough in a sandbox for Kubecon last year that might be good to update for people to use directly then as a working example
d
Yeah that is the hope, I'll add a walkthrough in the manifests/logging-stack dir when Im finished
p
this one: https://github.com/kubesphere-sigs/fluent-operator-walkthrough Quite a while ago I did this as well to help folks, maybe good to add an Opensearch one to it: https://github.com/calyptia/fluent-bit-devtools We also use Opensearch in the Fluent Bit integration tests as well but that's more CI around Terraform and BATS.
feel free to ping me direct btw as well
d
Sounds good and ill look over those resources! Thanks pat!
p
no worries, if you're at Kubecon NA then there'll be a Fluent booth up as well (and a Calyptia one) - I won't be there though as in the UK
b
@Wanjun Lei @elon cheng how should we pass the username and password for open search? Using secret?
p
it seems a good option to me, the alternative is optional fields for a string and secret ref to allow a hard-coded one for POCs but realistically you never want that in prod so referencing a secret to then support auto-reloading via K8S when the secret changes is good
d
So here is how I've done it which feels good enough for most POC's
Only issue is this is still not shipping logs into OpenSearch.
e
For opensearch, es username and passwords, we use the form of secret mount, in my opinion, this is more secure, if there are any better suggestions, feel free to submit issue.