mirror of
https://github.com/shadoll/helm-charts.git
synced 2026-08-28 03:27:08 +00:00
feat: Update MikroTik MCP Helm chart to use Python 3.12-alpine and enhance version bumping logic
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -112,14 +112,20 @@ for chart_dir in "$REPO_ROOT"/*/; do
|
||||
|
||||
# Compare and Update
|
||||
if [ "$current_app_version" != "$latest_clean" ]; then
|
||||
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"
|
||||
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"
|
||||
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)
|
||||
|
||||
Reference in New Issue
Block a user