helm-charts icon indicating copy to clipboard operation
helm-charts copied to clipboard

Set JenkinsURL if OpenShift Route is enabled

Open adambkaplan opened this issue 4 months ago • 0 comments

Is your feature request related to a problem? Please describe

Currently, the Helm chart does not set the jenkinsUrl value if the OpenShift route is enabled. If possible, set the jenkinsUrl based on the generated route ingress.

Describe the solution you'd like

One of the nice things about OpenShift routes is they set defaults for the resulting ingress if it is not defined in advance. Ideally, the chart can be updated so the Jenkins URL can be set dynamically based on the status of the admitted Route object. This might need to be done with an added init container that can run kubectl commands.

Describe alternatives you've considered

Feature Parity with Ingress

If controller.ingress is enabled, the helm chart sets controller.jenkinsUrl based on the ingress hostName and path. Similar parity can be achieved for routes by letting users provide route.host in the chart, and updating jenkinsUrl accordingly.

Workaround

This can be worked around today as follows:

  • Set controller.route.enabled to true.
  • Set the same value for the nameOverride and fullNameOverride. This value should use less than 63 characters and comply with Kubernetes rules for object names.
  • Set controller.jenkinsUrl to the expected default value for the generated ingress. On an OpenShift cluster with the route ingress defaults, this takes the form of <route-name>-<route-namespace>.<cluster-domain>.

Additional context

Reference documentation for OpenShift Routes: https://docs.openshift.com/container-platform/4.17/rest_api/network_apis/route-route-openshift-io-v1.html#spec

adambkaplan avatar Oct 04 '24 16:10 adambkaplan