Skip to content

Commit 9d79268

Browse files
committed
Add parameter for Kubernetes apt-proxy
Now supports a parameter "proxy" for pulling packages from: proxy: "http://host.lima.internal:3142" It is not a deb package, but we can still use the apt-proxy. Need a new URL instead of https_proxy, if we want caching... Signed-off-by: Anders F Björklund <anders.f.bjorklund@gmail.com>
1 parent af91a4b commit 9d79268

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

templates/k3s.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,10 @@ provision:
3737
script: |
3838
#!/bin/sh
3939
if [ ! -d /var/lib/rancher/k3s ]; then
40+
{{- if .Param.proxy }}
41+
INSTALL_K3S_ARTIFACT_URL={{.Param.proxy}}/HTTPS///github.com/k3s-io/k3s/releases/download
42+
export INSTALL_K3S_ARTIFACT_URL
43+
{{- end}}
4044
{{if not ( and .Param.url .Param.token )}}
4145
curl -sfL https://get.k3s.io | INSTALL_K3S_EXEC="server --write-kubeconfig-mode 644" sh -
4246
{{else}}
@@ -73,5 +77,8 @@ message: |
7377
------
7478
{{end}}
7579
param:
80+
# The proxy to use when downloading artifacts from k3s.io
81+
# For a local proxy use for instance "http://host.lima.internal:3142"
82+
proxy: ""
7683
url: ""
7784
token: ""

0 commit comments

Comments
 (0)