When using Istio sidecars for mutual tls in the Kubernetes cluster the setup-credentials-job never succeeds as the sidecar container stays running even once the setup-credentials container finishes.
A solution that has worked with other jobs in the past was to explicitly shutdown the sidecar once the job has finished running:
command:
- 'bash'
- '/home/yugabyte/bin/setup-credentials/setup-credentials.sh'
- 'curl -fsI -X POST http://localhost:15020/quitquitquit' <--- this shuts down the sidecar (can be behind an if statement so that it only gets run if the setup-credentials.sh exits with a successful status code)
However at the moment there is no real way to change the command of the setup-credentials-job