Skip to content

Commit

Permalink
feat(conf): option to add pre-installed plugins to plugin list (#1214)
Browse files Browse the repository at this point in the history
* ADDED - option to add pre-installed plugins to plugin list

* ADDED - option to add pre-installed plugins to plugin list - README

* update changelog - kong
  • Loading branch information
waskow-consensys authored Jan 23, 2025
1 parent 22e15b2 commit 3543a37
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 1 deletion.
2 changes: 2 additions & 0 deletions charts/kong/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
to avoid collisions in case of multiple installations.
[#1211](https://github.com/Kong/charts/pull/1211)
* Bumped default `kong` image tag to 3.9. [#1219](https://github.com/Kong/charts/pull/1219)
* Option to add pre-installed plugins to plugin list [#1214](https://github.com/Kong/charts/pull/1214)


## 2.46.0

Expand Down
2 changes: 1 addition & 1 deletion charts/kong/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -617,7 +617,7 @@ directory.
| image.pullPolicy | Image pull policy | `IfNotPresent` |
| image.pullSecrets | Image pull secrets | `null` |
| replicaCount | Kong instance count. It has no effect when `autoscaling.enabled` is set to true | `1` |
| plugins | Install custom plugins into Kong via ConfigMaps or Secrets | `{}` |
| plugins | Install custom plugins into Kong via ConfigMaps, Secrets or preInstalled | `{}` |
| env | Additional [Kong configurations](https://getkong.org/docs/latest/configuration/) | |
| customEnv | Custom Environment variables without `KONG_` prefix | |
| envFrom | Populate environment variables from ConfigMap or Secret keys | |
Expand Down
6 changes: 6 additions & 0 deletions charts/kong/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -843,6 +843,12 @@ The name of the Service which will be used by the controller to update the Ingre
{{- range .Values.plugins.secrets -}}
{{ $myList = append $myList .pluginName -}}
{{- end }}
{{- if .Values.plugins.preInstalled -}}
{{- $preInstalledPlugins := split "," .Values.plugins.preInstalled -}}
{{- range $preInstalledPlugins -}}
{{- $myList = append $myList . -}}
{{- end -}}
{{- end }}
{{- $myList | uniq | join "," -}}
{{- end -}}

Expand Down
2 changes: 2 additions & 0 deletions charts/kong/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -456,6 +456,8 @@ plugins: {}
# secrets:
# - pluginName: rewriter
# name: kong-plugin-rewriter
# If your development cycle preinstalls the plugin as part of the image, this appends them to the plugins env var
# preInstalled: sweet-plugin,another-sweet-plugin
# Inject specified secrets as a volume in Kong Container at path /etc/secrets/{secret-name}/
# This can be used to override default SSL certificates.
# Be aware that the secret name will be used verbatim, and that certain types
Expand Down

0 comments on commit 3543a37

Please sign in to comment.