I am running a Docker image using Kubernetes. I would like to pass to the container the digest of the image being used. So that the code inside the container can use this for debugging/logging. The problem is that I do not seem to be able to find a way to do this without hard-coding the image digest into the pod configuration.
Is there a way to define pod configuration way so that it dynamically passes the digest as environment variable for whichever version of Docker image it ends up using?