kafbat / helm-charts

Helm charts for kafbat projects
https://ui.charts.kafbat.io/
Apache License 2.0
3 stars 7 forks source link

Template the `yamlApplicationConfig` value #6

Closed yardenshoham closed 2 months ago

yardenshoham commented 3 months ago

This allows yamlApplicationConfig to include references to other values.

For example, if I have a value the determines the ingress host global.ingressHost and I want to set the OAuth2 parameters in the yamlApplicationConfig I could do something like

global:
  ingressHost: mywebsite.com

yamlApplicationConfig:
  auth:
    type: OAUTH2
    oauth2:
      client:
        keycloak:
          clientId: xxx
          clientSecret: yyy
          scope: opened
          issuer-uri: "https://{{ .Values.global.ingressHost }}/auth/realms/<realm>"
          user-name-attribute: preferred_username
          client-name: keycloak
          provider: keycloak
          custom-params:
            type: oauth

By changing global.ingressHost, the configuration for kafbat UI automatically changes to fit the new issuer-uri. Without this change, I'd have to duplicate the host configuration like

global:
  ingressHost: mywebsite.com

yamlApplicationConfig:
  auth:
    type: OAUTH2
    oauth2:
      client:
        keycloak:
          clientId: xxx
          clientSecret: yyy
          scope: opened
          issuer-uri: "https://mywebsite.com/auth/realms/<realm>"
          user-name-attribute: preferred_username
          client-name: keycloak
          provider: keycloak
          custom-params:
            type: oauth

This is very helpful when kafbat UI is a subchart of another chart.

This is strictly an enhancement, there are no breaking changes.

yardenshoham commented 3 months ago

Congratulations on the fork! Could you tell me what the policy is here regarding version bumps? Should I bump Chart.yaml to 1.1.0?

Haarolean commented 2 months ago

Congratulations on the fork! Could you tell me what the policy is here regarding version bumps? Should I bump Chart.yaml to 1.1.0?

Bumped it for you, thanks for your contribution :) sorry for the delay