Plug in out-of-process adapter into mixer in the context of K8s cluster

Hello,

I am following this out-of-process-adapter walk through to learn how to write an out-of-process mixer adapter.

The way it makes the mixer aware of the new adapter is by passing in the --configStoreURL in the mixs command line:

$GOPATH/out/linux_amd64/release/mixs server --configStoreURL=fs://$(pwd)/mixer/adapter/mygrpcadapter/testdata

The example works well with the standalone mixer server, but how do you do that (inject the adapter resource config into Mixer’s configuration store) in the context of a kubernetes cluster?

In the walk-through guide, it points to a Prometheus adapter for example:

You may look at Prometheus Out of process adapter for a working example.

Looking at the code, I can see the mixer adapter will be deployed to the kubernetes cluster as a service:

But it’s not clear to me how the mixer is made aware of this adapter. Can someone please help me connect the missing dots as our use case needs to happen in the context of kubernetes cluster.

It will be great if there is another walk through with the Promethues example outlining the steps of how to deploy a mixer adapter and then plug it in the mixer in the context of a kubernetes cluster.

Thank you!

Here’s a tutorial I wrote -
https://venilnoronha.io/set-sail-a-production-ready-istio-adapter

  • Venil

Hi Hong,

The key is in the handler CRD. There is a config for “connection” that needs to be a valid address for Mixer to connect to. I have an example here.

Scott

Thanks much Venil! I will follow through the tutorial and let you know if I have any follow up questions.

Thanks Scott! So in the cluster scenario, there is no need to inject the adapter resource config into Mixer’s configuration store?

In the standalone case, we need to pass in the --configStoreURL in the mixs command line:

$GOPATH/out/linux_amd64/release/mixs server --configStoreURL=fs://$(pwd)/mixer/adapter/mygrpcadapter/testdata

There is no equivalent step for this in the cluster scenario?

Right. That step is because Mixer has no context when it runs standalone.