mirror of
https://github.com/shadoll/helm-charts.git
synced 2026-08-28 11:33:17 +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 }}
|
{{- end }}
|
||||||
containers:
|
containers:
|
||||||
- name: {{ .Chart.Name }}
|
- name: {{ .Chart.Name }}
|
||||||
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
|
image: "{{ .Values.image.repository }}:{{ .Values.image.pythonTag }}"
|
||||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||||
command:
|
command:
|
||||||
- sh
|
- sh
|
||||||
|
|||||||
@@ -1,8 +1,9 @@
|
|||||||
image:
|
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.
|
# 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
|
repository: python
|
||||||
tag: "0.6.0-9"
|
pythonTag: "3.12-alpine"
|
||||||
pullPolicy: IfNotPresent
|
pullPolicy: IfNotPresent
|
||||||
|
|
||||||
port: 8000
|
port: 8000
|
||||||
|
|||||||
@@ -112,14 +112,20 @@ for chart_dir in "$REPO_ROOT"/*/; do
|
|||||||
|
|
||||||
# Compare and Update
|
# Compare and Update
|
||||||
if [ "$current_app_version" != "$latest_clean" ]; then
|
if [ "$current_app_version" != "$latest_clean" ]; then
|
||||||
new_chart_version=$(bump_version "$current_chart_version")
|
bump_chart=$(grep -E '^ version-bump-chart:' "$chart_yaml" | sed 's/.*: *"\?//;s/"\?$//')
|
||||||
echo " 🚀 Update found! Bumping to App: $latest_clean | Chart: $new_chart_version"
|
if [ "$bump_chart" = "false" ]; then
|
||||||
|
echo " 🚀 Update found! Bumping to App: $latest_clean | Chart: $current_chart_version (chart version pinned)"
|
||||||
# Update Chart.yaml
|
sed -i.bak \
|
||||||
sed -i.bak \
|
-e "s|^appVersion:.*|appVersion: \"$latest_clean\"|"\
|
||||||
-e "s|^appVersion:.*|appVersion: \"$latest_clean\"|" \
|
"$chart_yaml"
|
||||||
-e "s|^version:.*|version: $new_chart_version|" \
|
else
|
||||||
"$chart_yaml"
|
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"
|
rm -f "$chart_yaml.bak"
|
||||||
|
|
||||||
# Update image.tag in values.yaml if it has a non-empty tag (for wrapper charts)
|
# Update image.tag in values.yaml if it has a non-empty tag (for wrapper charts)
|
||||||
|
|||||||
Reference in New Issue
Block a user