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