feat: Update MikroTik MCP Helm chart to use Python 3.12-alpine and enhance version bumping logic

This commit is contained in:
sha
2026-04-20 10:29:56 +03:00
parent ac651b4a17
commit b7bb564948
3 changed files with 18 additions and 11 deletions
+1 -1
View File
@@ -33,7 +33,7 @@ spec:
{{- end }}
containers:
- name: {{ .Chart.Name }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
image: "{{ .Values.image.repository }}:{{ .Values.image.pythonTag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
command:
- sh
+3 -2
View File
@@ -1,8 +1,9 @@
image:
# Uses python:3.11-alpine as base; mcp-server-mikrotik is installed
# Uses python:3.12-alpine as base; mcp-server-mikrotik is installed
# from PyPI at container startup using the version from Chart.appVersion.
# NOTE: This tag is intentionally pinned to a Python version, not the app version.
repository: python
tag: "0.6.0-9"
pythonTag: "3.12-alpine"
pullPolicy: IfNotPresent
port: 8000
+8 -2
View File
@@ -112,14 +112,20 @@ for chart_dir in "$REPO_ROOT"/*/; do
# Compare and Update
if [ "$current_app_version" != "$latest_clean" ]; then
bump_chart=$(grep -E '^ version-bump-chart:' "$chart_yaml" | sed 's/.*: *"\?//;s/"\?$//')
if [ "$bump_chart" = "false" ]; then
echo " 🚀 Update found! Bumping to App: $latest_clean | Chart: $current_chart_version (chart version pinned)"
sed -i.bak \
-e "s|^appVersion:.*|appVersion: \"$latest_clean\"|"\
"$chart_yaml"
else
new_chart_version=$(bump_version "$current_chart_version")
echo " 🚀 Update found! Bumping to App: $latest_clean | Chart: $new_chart_version"
# Update Chart.yaml
sed -i.bak \
-e "s|^appVersion:.*|appVersion: \"$latest_clean\"|"\
-e "s|^version:.*|version: $new_chart_version|" \
"$chart_yaml"
fi
rm -f "$chart_yaml.bak"
# Update image.tag in values.yaml if it has a non-empty tag (for wrapper charts)