Search code examples
jenkins-x

'preview' ingress service configuration


I'd like to know how to add annotations on all preview ingress services definition generated for each jx preview to configure it.

I'm having issues with either header forward or header stripping by nginx. The server behind the preview ingress service is not receiving some headers requests.

Thank you for your help!


Solution

  • Jenkins X uses a controller called exposecontroller to generate ingress rules when applications are deployed. We can add annotations to Kubernetes services which exposecontroller then uses to in turn add to the ingress rule it creates.
    You can add a list of annotations to your applications service helm chart which can be found in the repo of your project. Here's an example from a Jenkins X nodejs quickstart and to see an example of where we list multiple annotations that exposecontroller adds to generated ingress rules you can look at some of Jenkins X own charts