I have created a deployment with two replicas in my K8S cluster with the volumes section to clone a git repo. The repo is cloned, the pods are created, deployment is created. I can login to the pod and run git commits are things look ok.
My assumption: If I do a git push to the repository managed by gitRepo volume mount, the pod or K8S deployment will be automatically redeployed but this is not happening? Is my assumption wrong? Should I do something more to do an auto-redeploy once a push is done like a CD pipeline? If the latter is true, I am trying to understand the purpose of gitRepo volume mounts now.
Thanks for your inputs.
Abdul.
After some research, I think I understand the scope of gitRepo volumes now. My requirement to auto-update the pods/deployments when changes happen to git repo can be handled using a microservice such as this: https://github.com/fabric8io/gitcontroller
The issues with the above microservice:
So I believe the above microservice is broken and not probably maintained now (as of writing). Until it's fixed, I am going back to using Spring Cloud Config server with git backed repo to handle my configs. So when my configs change, I can run the Fabric8 maven plugin (https://maven.fabric8.io/) to build a new Docker image and deploy that in my cluster. All of this can be automated using a simple Jenkins CD pipeline.