druid-io / druid-operator

Druid Kubernetes Operator
Other
205 stars 93 forks source link

Sidecar container spec for druid #296

Closed cintoSunny closed 1 year ago

cintoSunny commented 2 years ago

Fixes https://github.com/druid-io/druid-operator/issues/275

Description

Currently, the Druid operator does not allow the addition of a sidecar container to Druid deployments. The only way is to inject sidecars by mutation webhooks like istio. But many orgs may not allow setting up istio or it could be an additional effort to add them.

The sidecar containers can be added like below:

sidecarContainer:
- configs:
    imageName: docker.com/ns/samplesimage:latest
    containerName: sidecar
    command: /bin/start.sh
    pullPolicy: Always
...

This PR has:


Key changed/added files in this PR
AdheipSingh commented 1 year ago

@nishantmonu51 kindly approve to run CI checks

AdheipSingh commented 1 year ago

@cintoSunny can you add a documentation around adding this feature, would be really helpful :) and an example spec here https://github.com/druid-io/druid-operator/blob/master/docs/examples.md

cintoSunny commented 1 year ago

@cintoSunny can you add a documentation around adding this feature, would be really helpful :) and an example spec here https://github.com/druid-io/druid-operator/blob/master/docs/examples.md

I have added a sample spec to example.md. Let me know what you think.

I have added documentation to features.md. Let me know what you think

AdheipSingh commented 1 year ago

I have tested this locally, its backward compatible. works with updated CRD. LGTM

Can you add a working example, in examples folder. It would be easier for users to test. I had to construct own yaml for test. ( the yamls in testdata wont work against the updated CRD, need to update thise. )

cintoSunny commented 1 year ago

I have tested this locally, its backward compatible. works with updated CRD. LGTM

Can you add a working example, in examples folder. It would be easier for users to test. I had to construct own yaml for test. ( the yamls in testdata wont work against the updated CRD, need to update thise. )

Sorry about that. I had to remove some company-specific things, hence left out a few parts. I changed it to your working example.