Use debian:bookworm-slim image for adc-sync job
All checks were successful
Helm Chart Build / lint-only (push) Has been skipped
Helm Chart Build / build-helm (push) Successful in 54s
Build and Deploy / build-api (push) Successful in 45s
Build and Deploy / build-web (push) Successful in 1m10s

Update dependency installation logic to support Debian, Alpine, and
RHEL/CentOS distributions. Add error handling for unsupported Linux
distributions.
This commit is contained in:
d.viti
2025-10-08 15:09:20 +02:00
parent 741117dab8
commit 27118b21f8

View File

@@ -42,8 +42,8 @@ spec:
{{- end }}
containers:
- name: adc-sync
image: {{ .Values.api7.adc.image | default "ghcr.io/api7/adc:latest" }}
imagePullPolicy: {{ .Values.api7.adc.imagePullPolicy | default "IfNotPresent" }}
image: debian:bookworm-slim
imagePullPolicy: IfNotPresent
command:
- /bin/sh
- -c
@@ -53,12 +53,18 @@ spec:
# Install dependencies and ADC binary
echo "Installing curl and dependencies..."
if command -v apk &> /dev/null; then
apk add --no-cache curl {{- if .Values.api7.autoPublish }} jq{{- end }}
elif command -v apt-get &> /dev/null; then
if [ -f /etc/debian_version ]; then
# Debian/Ubuntu
apt-get update && apt-get install -y curl {{- if .Values.api7.autoPublish }} jq{{- end }}
elif command -v yum &> /dev/null; then
elif [ -f /etc/alpine-release ]; then
# Alpine
apk add --no-cache curl {{- if .Values.api7.autoPublish }} jq{{- end }}
elif [ -f /etc/redhat-release ]; then
# RHEL/CentOS
yum install -y curl {{- if .Values.api7.autoPublish }} jq{{- end }}
else
echo "ERROR: Unsupported Linux distribution"
exit 1
fi
# Download and install ADC binary