Skip to content

Commit

Permalink
[bitnami/apisix] feat: ♻️ Use os-shell for config generation (#31455)
Browse files Browse the repository at this point in the history
* [bitnami/apisix] feat: ♻️ Use os-shell for config generation

Signed-off-by: Javier J. Salmerón García <[email protected]>

* fix: 🐛 Change version

Signed-off-by: Javier J. Salmerón García <[email protected]>

* Update CHANGELOG.md

Signed-off-by: Bitnami Containers <[email protected]>

---------

Signed-off-by: Javier J. Salmerón García <[email protected]>
Signed-off-by: Bitnami Containers <[email protected]>
Co-authored-by: Bitnami Containers <[email protected]>
  • Loading branch information
javsalgar and bitnami-bot authored Jan 17, 2025
1 parent a607b9f commit e808ba0
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 14 deletions.
9 changes: 7 additions & 2 deletions bitnami/apisix/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
# Changelog

## 3.7.1 (2025-01-09)
## 3.7.2 (2025-01-17)

* [bitnami/apisix] Release 3.7.1 ([#31272](https://github.com/bitnami/charts/pull/31272))
* [bitnami/apisix] feat: :recycle: Use os-shell for config generation ([#31455](https://github.com/bitnami/charts/pull/31455))

## <small>3.7.1 (2025-01-09)</small>

* [bitnami/*] Fix typo in README (#31052) ([b41a51d](https://github.com/bitnami/charts/commit/b41a51d1bd04841fc108b78d3b8357a5292771c8)), closes [#31052](https://github.com/bitnami/charts/issues/31052)
* [bitnami/apisix] Release 3.7.1 (#31272) ([199b715](https://github.com/bitnami/charts/commit/199b7151ef54c3cc81ca09813e28e2b2ade50f2d)), closes [#31272](https://github.com/bitnami/charts/issues/31272)

## 3.7.0 (2024-12-10)

Expand Down
2 changes: 1 addition & 1 deletion bitnami/apisix/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,4 @@ sources:
- https://github.com/bitnami/charts/tree/main/bitnami/apisix
- https://github.com/bitnami/charts/tree/main/bitnami/apisix-dashboard
- https://github.com/bitnami/charts/tree/main/bitnami/apisix-ingress-controller
version: 3.7.1
version: 3.7.2
21 changes: 10 additions & 11 deletions bitnami/apisix/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ Init container definition for waiting for the database to be ready
# This init container renders and merges the APISIX configuration files, as well
# as preparing the Nginx server. We need to use a volume because we're working with
# ReadOnlyRootFilesystem
- name: prepare-apisix
- name: prepare-apisix-dirs
image: {{ template "apisix.image" .context }}
imagePullPolicy: {{ .context.Values.image.pullPolicy }}
{{- $block := "" }}
Expand All @@ -337,9 +337,7 @@ Init container definition for waiting for the database to be ready
ln -sf /opt/bitnami/apisix/openresty/luajit/share/lua/*/apisix /usr/local/apisix
mkdir -p /usr/local/apisix/logs
# Build final config.yaml with the sections of the different files
find /bitnami/apisix/conf -type f -name *.yaml -print0 | sort -z | xargs -0 yq eval-all '. as $item ireduce ({}; . * $item )' > /usr/local/apisix/conf/pre-render-config.yaml
render-template /usr/local/apisix/conf/pre-render-config.yaml > /usr/local/apisix/conf/config.yaml
rm /usr/local/apisix/conf/pre-render-config.yaml
cp /bitnami/apisix/rendered-conf/config.yaml /usr/local/apisix/conf/
chmod 644 /usr/local/apisix/conf/config.yaml
apisix init
{{- if eq .component "control-plane" }}
Expand Down Expand Up @@ -390,15 +388,12 @@ Init container definition for waiting for the database to be ready
- name: empty-dir
mountPath: /usr/local/apisix
subPath: app-tmp-dir
- name: config
mountPath: /bitnami/apisix/conf/00_default
- name: empty-dir
mountPath: /bitnami/apisix/rendered-conf
subPath: app-conf-dir
- name: empty-dir
mountPath: /tmp
subPath: tmp-dir
{{- if or $block.extraConfig $block.extraConfigExistingConfigMap }}
- name: extra-config
mountPath: /bitnami/apisix/conf/01_extra
{{- end }}
{{- if $block.tls.enabled }}
- name: certs
mountPath: /bitnami/certs
Expand Down Expand Up @@ -543,11 +538,15 @@ Render configuration for the dashboard and ingress-controller components
# as preparing the Nginx server. We need to use a volume because we're working with
# ReadOnlyRootFilesystem
- name: render-conf
image: {{ template "apisix.image" .context }}
image: {{ template "apisix.wait-container.image" .context }}
imagePullPolicy: {{ .context.Values.image.pullPolicy }}
{{- $block := "" }}
{{- if eq .component "ingress-controller" }}
{{- $block = index .context.Values "ingressController" }}
{{- else if eq .component "control-plane" }}
{{- $block = index .context.Values "controlPlane" }}
{{- else if eq .component "data-plane" }}
{{- $block = index .context.Values "dataPlane" }}
{{- else }}
{{- $block = index .context.Values "dashboard" }}
{{- end }}
Expand Down
1 change: 1 addition & 0 deletions bitnami/apisix/templates/control-plane/dep-ds.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ spec:
{{- end }}
initContainers:
{{- include "apisix.waitForETCDInitContainer" . | nindent 8 }}
{{- include "apisix.renderConfInitContainer" (dict "component" "control-plane" "context" $) | nindent 8 }}
{{- include "apisix.prepareApisixInitContainer" (dict "component" "control-plane" "context" $) | nindent 8 }}
{{- if .Values.controlPlane.initContainers }}
{{- include "common.tplvalues.render" (dict "value" .Values.controlPlane.initContainers "context" $) | nindent 8 }}
Expand Down
1 change: 1 addition & 0 deletions bitnami/apisix/templates/data-plane/dep-ds.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ spec:
{{- if .Values.controlPlane.enabled }}
{{- include "apisix.waitForControlPlaneInitContainer" . | nindent 8 }}
{{- end }}
{{- include "apisix.renderConfInitContainer" (dict "component" "data-plane" "context" $) | nindent 8 }}
{{- include "apisix.prepareApisixInitContainer" (dict "component" "data-plane" "context" $) | nindent 8 }}
{{- if .Values.dataPlane.initContainers }}
{{- include "common.tplvalues.render" (dict "value" .Values.dataPlane.initContainers "context" $) | nindent 8 }}
Expand Down

0 comments on commit e808ba0

Please sign in to comment.