Merge pull request #253 from erikwilson/image-airgap-build

Generate air-gap image artifacts
This commit is contained in:
Darren Shepherd 2019-03-22 13:51:25 -07:00 committed by GitHub
commit 9dd60779a4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 26 additions and 2 deletions

View File

@ -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{
{ {

View 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

View 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

View File

@ -9,3 +9,4 @@ fi
./package-cli ./package-cli
./package-image ./package-image
./package-airgap

10
scripts/package-airgap Executable file
View 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