Replies: 1 comment 3 replies
-
Hi. Do you import that main.py file in the script that runs Also, do you see any starting logs when executed with |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi Community.
Brief about my foobar microservice:
I was trying to exercise the kopf in my python foobar microservice running in K8s. This service as such interacts with network devices in south direction and in north side it's suppose to interface with CRD of kubernetes to get the input params.
Essentially, kopf will be my interface for interaction with CRD of K8s. I'm using kopf and running it as separate thread in my example snippet code file: foobar_k8s.py
def kopf_thread_loop():
In the Dockerfile of foobar microservice, I run the python program as:
CMD ["python3","main.py"]
main.py file and other files has the other important definitions for network device interaction (running as multi-threaded).
Although, with above I don't see any reception of create/update/delete etc.. of CR through kopf.
However, when I try using the below method in the dockerfile, I'm able to see the reception of create/update/delete CR.
CMD kopf run /foobar_k8s.py
Any comments or help on the above will be of great help.
Regards, Yogen
Beta Was this translation helpful? Give feedback.
All reactions