mirror of
https://github.com/k3s-io/k3s.git
synced 2024-06-07 19:41:36 +00:00
Merge pull request #253 from erikwilson/image-airgap-build
Generate air-gap image artifacts
This commit is contained in:
commit
9dd60779a4
@ -24,7 +24,7 @@ import (
|
|||||||
|
|
||||||
const (
|
const (
|
||||||
namespace = "kube-system"
|
namespace = "kube-system"
|
||||||
image = "rancher/klipper-helm:v0.1.4"
|
image = "rancher/klipper-helm:v0.1.5"
|
||||||
label = "helm.k3s.cattle.io/chart"
|
label = "helm.k3s.cattle.io/chart"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -158,7 +158,7 @@ func job(chart *k3s.HelmChart) (*batch.Job, *core.ConfigMap) {
|
|||||||
{
|
{
|
||||||
Name: "helm",
|
Name: "helm",
|
||||||
Image: image,
|
Image: image,
|
||||||
ImagePullPolicy: core.PullAlways,
|
ImagePullPolicy: core.PullIfNotPresent,
|
||||||
Args: args(chart),
|
Args: args(chart),
|
||||||
Env: []core.EnvVar{
|
Env: []core.EnvVar{
|
||||||
{
|
{
|
||||||
|
8
scripts/airgap/generate-list.sh
Executable file
8
scripts/airgap/generate-list.sh
Executable file
@ -0,0 +1,8 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
set -e -x
|
||||||
|
|
||||||
|
cd $(dirname $0)
|
||||||
|
|
||||||
|
k3s crictl images -o json \
|
||||||
|
| jq -r '.images[].repoTags[0] | select(. != null)' \
|
||||||
|
| tee image-list.txt
|
5
scripts/airgap/image-list.txt
Normal file
5
scripts/airgap/image-list.txt
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
docker.io/coredns/coredns:1.3.0
|
||||||
|
docker.io/library/traefik:1.7.9
|
||||||
|
docker.io/rancher/klipper-helm:v0.1.5
|
||||||
|
docker.io/rancher/klipper-lb:v0.1.1
|
||||||
|
k8s.gcr.io/pause:3.1
|
@ -9,3 +9,4 @@ fi
|
|||||||
|
|
||||||
./package-cli
|
./package-cli
|
||||||
./package-image
|
./package-image
|
||||||
|
./package-airgap
|
||||||
|
10
scripts/package-airgap
Executable file
10
scripts/package-airgap
Executable file
@ -0,0 +1,10 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
set -e -x
|
||||||
|
|
||||||
|
source $(dirname $0)/version.sh
|
||||||
|
|
||||||
|
cd $(dirname $0)/..
|
||||||
|
|
||||||
|
images=$(cat scripts/airgap/image-list.txt)
|
||||||
|
xargs -n1 docker pull <<< "${images}"
|
||||||
|
docker save ${images} -o dist/artifacts/k3s-airgap-images-${ARCH}.tar
|
Loading…
Reference in New Issue
Block a user