Skip to content

Commit b23d5a1

Browse files
Adding overlays capability to the installer
1 parent be61c73 commit b23d5a1

15 files changed

Lines changed: 145 additions & 12 deletions

File tree

Makefile

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,18 @@
4848
# Default: latest
4949
# Examples: v1.0.0, dev, latest
5050
#
51+
# IMGPKG_IMAGE_REPOSITORY
52+
# Description: Registry/repository used for image refs inside the installer bundle (kbld-images).
53+
# Default: same as IMAGE_REPOSITORY
54+
# Override when developing installer carvel-packages to use released images in the bundle
55+
# instead of local images (e.g. IMGPKG_IMAGE_REPOSITORY=ghcr.io/educates).
56+
#
57+
# IMGPKG_PACKAGE_VERSION
58+
# Description: Version tag used for image refs inside the installer bundle (kbld-images).
59+
# Default: same as PACKAGE_VERSION
60+
# Override when developing installer to pin bundle to a released version's images
61+
# (e.g. IMGPKG_PACKAGE_VERSION=3.5.1).
62+
#
5163
# =============================================================================
5264
# BUILD TARGETS
5365
# =============================================================================
@@ -130,6 +142,10 @@ IMAGE_REPOSITORY = localhost:5001
130142
PACKAGE_VERSION = latest
131143
RELEASE_VERSION = 0.0.1
132144

145+
# Installer bundle image refs: default to same as build repo/version; override to use released images when developing installer
146+
IMGPKG_IMAGE_REPOSITORY ?= $(IMAGE_REPOSITORY)
147+
IMGPKG_PACKAGE_VERSION ?= $(PACKAGE_VERSION)
148+
133149
UNAME_SYSTEM := $(shell uname -s | tr '[:upper:]' '[:lower:]')
134150
UNAME_MACHINE := $(shell uname -m)
135151

@@ -291,7 +307,7 @@ else
291307
endif
292308

293309
push-installer-bundle:
294-
ytt -f carvel-packages/installer/config/images.yaml -f carvel-packages/installer/config/schema.yaml -v imageRegistry.host=$(IMAGE_REPOSITORY) -v version=$(PACKAGE_VERSION) > carvel-packages/installer/bundle/kbld/kbld-images.yaml
310+
ytt -f carvel-packages/installer/config/images.yaml -f carvel-packages/installer/config/schema.yaml -v imageRegistry.host=$(IMGPKG_IMAGE_REPOSITORY) -v version=$(IMGPKG_PACKAGE_VERSION) > carvel-packages/installer/bundle/kbld/kbld-images.yaml
295311
# For local development, we just need to lock educates images. Everything else can be referenced by tag from real origin.
296312
cat carvel-packages/installer/bundle/kbld/kbld-images.yaml | kbld -f - --imgpkg-lock-output carvel-packages/installer/bundle/.imgpkg/images.yml
297313
imgpkg push -b $(IMAGE_REPOSITORY)/educates-installer:$(RELEASE_VERSION) -f carvel-packages/installer/bundle

carvel-packages/installer/bundle/config/ytt/_ytt_lib/infrastructure/custom/00-remove-toplevel-values.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,3 +48,5 @@ websiteStyling:
4848
imagePuller:
4949
#@overlay/remove
5050
lookupService:
51+
#@overlay/remove
52+
installerImages:

carvel-packages/installer/bundle/config/ytt/_ytt_lib/infrastructure/eks/00-remove-toplevel-values.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,3 +48,5 @@ websiteStyling:
4848
imagePuller:
4949
#@overlay/remove
5050
lookupService:
51+
#@overlay/remove
52+
installerImages:

carvel-packages/installer/bundle/config/ytt/_ytt_lib/infrastructure/generic/00-remove-toplevel-values.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,3 +48,5 @@ websiteStyling:
4848
imagePuller:
4949
#@overlay/remove
5050
lookupService:
51+
#@overlay/remove
52+
installerImages:

carvel-packages/installer/bundle/config/ytt/_ytt_lib/infrastructure/kind/00-remove-toplevel-values.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,3 +48,5 @@ websiteStyling:
4848
imagePuller:
4949
#@overlay/remove
5050
lookupService:
51+
#@overlay/remove
52+
installerImages:

carvel-packages/installer/bundle/config/ytt/_ytt_lib/infrastructure/minikube/00-remove-toplevel-values.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,3 +48,5 @@ websiteStyling:
4848
imagePuller:
4949
#@overlay/remove
5050
lookupService:
51+
#@overlay/remove
52+
installerImages:

carvel-packages/installer/bundle/config/ytt/_ytt_lib/infrastructure/openshift/00-remove-toplevel-values.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,3 +48,5 @@ websiteStyling:
4848
imagePuller:
4949
#@overlay/remove
5050
lookupService:
51+
#@overlay/remove
52+
installerImages:

carvel-packages/installer/bundle/config/ytt/_ytt_lib/infrastructure/vcluster/00-remove-toplevel-values.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,3 +48,5 @@ websiteStyling:
4848
imagePuller:
4949
#@overlay/remove
5050
lookupService:
51+
#@overlay/remove
52+
installerImages:

carvel-packages/installer/bundle/config/ytt/values-schema.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ clusterInfrastructure:
7575
#@schema/title "AWS IAM IRSA Roles"
7676
#@schema/desc "AWS IAM IRSA Roles for external-dns and cert-manager"
7777
irsaRoles:
78-
#@schema/example "arn:aws:iam::MY_IAM:role/external-dns"
78+
#@schema/example "arn:aws:iam::MY_IAM:role/external-dns"
7979
#@schema/validation ("irsaRole for external-dns is required for aws based providers",lambda v: len(v) >= 1)
8080
external-dns: ""
8181
#@schema/example "arn:aws:iam::MY_IAM:role/cert-manager"
@@ -122,6 +122,9 @@ localKindCluster: {}
122122
#@schema/nullable
123123
#@schema/type any=True
124124
localDNSResolver: {}
125+
#@schema/nullable
126+
#@schema/type any=True
127+
installerImages: {}
125128
#!--------- educates training platform schema
126129
#! NOTE: https://github.com/jorgemoralespou/educates-training-platform/blob/develop/carvel-packages/training-platform/bundle/config/00-schema.yaml#L21C1-L33
127130
#! This is only so that the images generates are loaded from this registry. There's a pre-proccesing step that will generate a images file

client-programs/pkg/cmd/cluster_portal_open_cmd.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ func (o *ClusterPortalOpenOptions) Run() error {
6767
return err
6868
}
6969

70+
// TODO: Most of this logic is similar to workshops.OpenBrowser, so we should refactor it to a common function.
7071
fmt.Printf("Training portal %q.\n", o.Portal)
7172

7273
fmt.Print("Checking training portal is ready.\n")

0 commit comments

Comments
 (0)