Add support of older versions of Helm
This PS allows to avoid of using assignments which are not supported in older versions of Helm (GO<1.11). Change-Id: Ic0dad4d1b60071c4366c63834f1ad7e3a76fdcd8
This commit is contained in:
parent
8f102a878a
commit
2fb6a299a3
@ -59,18 +59,18 @@ load_package_list_with_versions $(dpkg -l | awk 'NR>5 {print $2"="$3}')
|
||||
|
||||
{{- if hasKey .Values.conf "apt" }}
|
||||
{{- if hasKey .Values.conf.apt "repositories" }}
|
||||
{{- $repository := list }}
|
||||
echo -n "" > /etc/apt/trusted.gpg.d/divindbell_temp.gpg
|
||||
echo "#The list of repositories managed by Divingbell" > /etc/apt/sources.list.divingbell
|
||||
{{- range .Values.conf.apt.repositories }}
|
||||
{{- $url := .url }}
|
||||
{{- $components := .components | join " " }}
|
||||
{{- $subrepos := .subrepos | default list }}
|
||||
{{- range .distributions }}
|
||||
{{- $distribution := . }}
|
||||
{{- $repository = append $repository ( printf "deb %s %s %s" $url $distribution $components ) }}
|
||||
echo "{{ printf "deb %s %s %s" $url $distribution $components }}" >>/etc/apt/sources.list.divingbell
|
||||
{{- if $subrepos }}
|
||||
{{- range $subrepos }}
|
||||
{{- $repository = append $repository ( printf "deb %s %s-%s %s" $url $distribution . $components ) }}
|
||||
echo "{{ printf "deb %s %s-%s %s" $url $distribution . $components }}" >>/etc/apt/sources.list.divingbell
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
@ -80,10 +80,6 @@ apt-key --keyring /etc/apt/trusted.gpg.d/divindbell_temp.gpg add - <<"ENDKEY"
|
||||
ENDKEY
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
echo "#The list of repositories managed by Divingbell" > /etc/apt/sources.list.divingbell
|
||||
{{- range $repository }}
|
||||
echo "{{ . }}" >>/etc/apt/sources.list.divingbell
|
||||
{{- end }}
|
||||
mv /etc/apt/sources.list.divingbell /etc/apt/sources.list
|
||||
rm -rf /etc/apt/sources.list.d/*
|
||||
mv /etc/apt/trusted.gpg.d/divindbell_temp.gpg /etc/apt/trusted.gpg.d/divindbell.gpg
|
||||
|
Loading…
Reference in New Issue
Block a user