-
Notifications
You must be signed in to change notification settings - Fork 48
Description
Is your feature request related to a problem? Please describe.
The current Helm chart config is rather decoupled between the configuration of OpenBao via the config string and the kubernetes resource declarations. As one example, in order to configure file-based storage, you need to have
storage "file" {
path = "/openbao/data"
}
in your config string and also have
dataStorage:
enabled: true
mountPath: "/openbao/data"
This requires duplication of the same values and can easily result in invalid configuration (e.g. you aren't using file storage for your storage but you left dataStorage enabled, creating an unnecessary PVC)
Describe the solution you'd like
A pattern used in for example the Tempo Helm chart is to have a config string but make use of templating to generate most of the contents, such as storage backing
https://github.com/grafana/helm-charts/blob/dc7572f3b4d8433e9de5e3a00f521b26234654c5/charts/tempo-distributed/values.yaml#L1266
https://github.com/grafana/helm-charts/blob/dc7572f3b4d8433e9de5e3a00f521b26234654c5/charts/tempo-distributed/values.yaml#L1622
Obviously getting every config possible converted to Helm would be too much work, but I think you could get a lot of low hanging fruit by combining essential config as a template with an "extraConfig" string that gets appended to the end to handle the less common more complex parts.
To go to the storage example, I would think you would have say
storage:
type: raft
raft:
storageClass: my-storage-class
mountPath: "/openbao/data"
which gets generated into a config template like
{{- if eq .Values.storage.type raft }}
storage "raft" {
path = "{{ .Values.storage.raft.mountPath}}"
}
{{- end }}
I'd be happy to take a pass at doing this myself, but I wanted to gauge receptiveness rather than just putting in a bunch of work and dropping a PR out of nowhere.