CAAPIM / apim-charts

Helm Charts for Layer7 API Management components.
MIT License
11 stars 48 forks source link

[charts/gateway]Make restman host and port modifiable for otk install job #267

Open SebastiaanKveek opened 12 months ago

SebastiaanKveek commented 12 months ago

Currently the otk-install job template does not allow to change the restman host or port. This makes it very inflexible for example in our case where we are using a custom loadbalancer and clusterhostname instead of the ingress to make restman available. It's also not possible to patch this job with --post-renderer since it's a post-upgrade,post-install job.

Small adjustment on the otk-install job template and the values file

Benefits

The benefits of this change will be to make the otk-install job more flexible by parameterizing the restman variables. It will still retain the current values as defaults so it should not be a breaking change.

Drawbacks No drawbacks but please double check if the templating code used is correct

Applicable issues

Additional information

Checklist

APIM-KiranVaddadi commented 12 months ago

@SebastiaanKveek No harm in adding option to specify restman host and port but would like avoid repetition of configuration if possible. For our understanding, can share more details about the gateway service (type). OTK uses the gateway service and would like to know why its working.

SebastiaanKveek commented 12 months ago

@APIM-KiranVaddadi We added a loadBalancer service via the values.yml that only allow traffic on a specific port. This loadbalancer name get's templated like this: name: {{ template "gateway.fullname" . }} See https://github.com/CAAPIM/apim-charts/blob/stable/charts/gateway/templates/service.yaml line 11.

Another idea would be to point the otk-install job to the management load balancer service which is created by default through the helm chart. See line 12 in https://github.com/CAAPIM/apim-charts/blob/stable/charts/gateway/templates/management-service.yaml That would mean you point towards ` name: {{ template "gateway.fullname" . }}-management' As opposed to the current name. So then the management loadbalancer service would be default and you could still have the option of modifying it yourself.

APIM-KiranVaddadi commented 12 months ago

@SebastiaanKveek Management service is optional and conditional. Its better to leave the default to be 'gateway service' if otk.restmanHost is blank and same goes for the port. We are will productize and include the changes in the next OTK or Gateway Helm release. For now we will keep this open and close when the changes goes into product. Thank you.

SebastiaanKveek commented 12 months ago

@APIM-KiranVaddadi Great thanks for the quick response and solution.

SebastiaanKveek commented 10 months ago

Wondering what the status on this is?