This is an HyCloud charts repository.
create and publish docs:
$ helm create mychart
$ helm package mychart
$ mv mychart-0.1.0.tgz docs
$ helm repo index docs --url https://hycomsa.github.io/hycharts/
$ git add -i
$ git commit -av
$ git push origin master
From there, I can do a
helm repo add hycharts https://hycomsa.github.io/hycharts/
Just modify krakend.json.
There are 2 options here:
- Override subchart values.yaml krakendJson key from parent chart values.yaml and paste KrakenD configuration there.
- Override subchart usedAsSubchart key to true, create your krakend.json configuration file and put it into parent chart root directory. Create template for configmap in parent chart with the following content:
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ .Release.Name }}-kraken-configmap
data:
krakend.json: |-
{{- if eq .Values.<your_custom_key> "" }}
{{ .Files.Get "krakend.json" | indent 4 }}
{{- else }}
{{ .Values.<your_custom_key> | indent 4 }}
{{- end}}
KrakenD configuration can still be modified from values.yaml using <your_custom_key>. This process will substitute subchart configmap with KrakenD configuration with one from parent and mount it to subchart deployment. Now you can keep your KrakenD configuration in your parent chart json file.
Enable Flexible Config in values.yaml and put your components into flexible-configuration directory with settings, partials and templates respectively as described by official documentation.
- Override subchart values.yaml from parent chart to enable flexible configuration and override krakendJson to update gateway configuration. Parent values.yaml should have following keys:
krakend:
flexible_config:
enabled: true
krakendJson: "<paste you configuration here>"
- Create directory for flexible configuration and subdirectories for partials, settings, templates. Parent chart directory structure should look like this:
<your_chart>
└── flexible-configuration
├── settings
├── partials
└── templates
- Copy templates for settings-configmap.yaml, partials-configmap.yaml and templates-configmap.yaml and put them into parent chart templates directory. Modify the first line in each file to:
{{- if .Values.krakend.flexible_config.enabled }}