Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Shipyard support for deploying clusters #1317

Open
wants to merge 1 commit into
base: v1
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,9 @@

# Generated files
manifest.json

# Shipyard generated and downloaded
.dapper
Dockerfile.dapper
Makefile.shipyard
output/
5 changes: 5 additions & 0 deletions .shipyard.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
nodes: control-plane worker
clusters:
cluster1:
cluster2:
30 changes: 30 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,15 @@ PLATFORMS ?= linux/amd64,linux/arm64
GOOS ?= linux
GOARCH ?= amd64

# Shipyard configuration
BASE_BRANCH = main
LOAD_BALANCER = true
ORG = skupperproject
PROJECT = skupper
SETTINGS = ./.shipyard.yml
SHIPYARD_URL = https://raw.githubusercontent.com/submariner-io/shipyard/devel
export BASE_BRANCH ORG PROJECT SHIPYARD_REPO SHIPYARD_URL

all: generate-client build-cmd build-get build-config-sync build-controllers build-tests build-manifest

build-tests:
Expand Down Expand Up @@ -142,3 +151,24 @@ release/arm64/skupper: cmd/skupper/skupper.go

release/arm64.tgz: release/arm64/skupper
tar -czf release/arm64.tgz release/arm64/skupper

ifneq (,$(DAPPER_HOST_ARCH))

# Running in Shipyard's container

include $(SHIPYARD_DIR)/Makefile.clusters

else

# Not running in Shipyard's container

Makefile.shipyard:
ifeq (,$(findstring s,$(firstword -$(MAKEFLAGS))))
@echo Downloading $@
endif
@curl -sfLO $(SHIPYARD_URL)/$@

ONLY_SHIPYARD_GOALS = true
include Makefile.shipyard

endif