Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[kong] consolidate Ingress and Service templates (#251)
* [kong] consolidate Ingress and Service templates Add helper functions to handle the bulk of Ingress and Service generation, and rework Ingress and Service templates to use them. Individual service templates now mostly handle enabling/disabling resources and legacy behavior (for admin and proxy). This avoids issues where features (e.g. externalTrafficPolicy and LoadBalancer NodePort overrides) were available on some templates but not others, and eliminates the need to copy-paste template functionality across templates when adding new features in the future. Additionally: - Deprecate support for multi-host proxy Ingresses. As the proxy Ingress now uses the same template as all other services, it only supports a single hostname and TLS Secret. - Remove externalIPs from the default values configurations and do not render it if it is not present. externalIPs should be uncommon (it is designed for bare metal clusters that cannot update Service status automatically) and is easy to confuse with other functionality. - Add a loadBalancerIP comment to the proxy values. This is the setting actually used to request a specific IP from a cloud provider. Note: the reworked service templates run a number of boilerplate templates (e.g. kong.fullname) and store their result alongside the configuration context before invoking kong.ingress and kong.service. Although Helm documentation indicates that the "$" variable always points to the chart root, this isn't actually true for named template invocations: helm/helm#7915 Because of this, templates that require things like .Release.Name cannot access it, and we must render them in advance. * pr: fix indentation * pr: fix incorrect key check * pr: remove legacy config from CI
- Loading branch information