0

I have been looking at options to generate a v4 UUID from my nginx ingress implementation with the use of some annotations or any other way it would be possible to achieve this. I could not find any useful link to process v4 UUID yet from nginx, but wondering if it is possible at all and has someone come across a link which might be helpful.

1 Answers1

1

According to relevant search results, the simplest method appears to be to run luarocks install uuid when the Ingress controller Pod starts up, then in whatever Ingress you want, generate the nginx variable as one normally would:

set_by_lua $request_uuid '
  return uuid()
'

If you're using this mechanism for request tracing, then you should be aware that the latest ingress-nginx releases support Open Tracing out of the box: https://kubernetes.github.io/ingress-nginx/user-guide/nginx-configuration/configmap/#enable-opentracing

mdaniel
  • 2,561
  • 1
  • 9
  • 13