operator-framework / operator-sdk

SDK for building Kubernetes applications. Provides high level APIs, useful abstractions, and project scaffolding.
https://sdk.operatorframework.io
Apache License 2.0
7.24k stars 1.74k forks source link

How to restart a virtual service from controller in OperatorSDK v1.0.0 #4171

Closed anusood closed 3 years ago

anusood commented 3 years ago

Once a pod is recreated from inside the controller, I want a Virtual Service of Istio to be recreated as well. What package/third party API can help me with it.

jberkhahn commented 3 years ago

So, if you take a look at the example controller implementation you can see how to use the reconciler API to query and manipulate deployments and other core kubernetes types. You can follow this same pattern with custom types such as those implemented in the Istio operator, assuming those types are present on your cluster. You would have to import whatever library those Istio types are declared in and use them the same way.

The Istio operator itself also might offer more support for hooking into things, but I am not familiar with its exact functionality.