Skip to content

Commit c723ac8

Browse files
Merge pull request openshift#7620 from vincepri/cluster-api-build
CORS-2852: Build and package Cluster API and providers
2 parents 0671951 + f25b4cf commit c723ac8

File tree

43,841 files changed

+17876430
-5
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43,841 files changed

+17876430
-5
lines changed

cluster-api/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/bin/

cluster-api/Makefile

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
TARGET_OS_ARCH:=$(shell go env GOOS)_$(shell go env GOARCH)
2+
3+
PROVSUBDIRS:= $(foreach DIR,$(shell find providers -maxdepth 1 -mindepth 1 -type d),$(subst providers/,,$(DIR)))
4+
5+
GO_MOD_TIDY_TARGETS:= $(foreach DIR,$(PROVSUBDIRS), $(subst $(DIR),go-mod-tidy-vendor.$(DIR),$(DIR)))
6+
GO_BUILD_TARGETS:= $(foreach DIR,$(PROVSUBDIRS), $(subst $(DIR),go-build.$(DIR),$(DIR)))
7+
GO_CLEAN_TARGETS:= $(foreach DIR,$(PROVSUBDIRS), $(subst $(DIR),go-clean.$(DIR),$(DIR)))
8+
PROVIDER_TARGETS := $(foreach DIR,$(PROVSUBDIRS), bin/$(TARGET_OS_ARCH)/cluster-api-provider-$(DIR))
9+
10+
LDFLAGS:= "-s -w"
11+
GCFLAGS:= ""
12+
13+
ifeq ($(MODE), dev)
14+
LDFLAGS:= ""
15+
GCFLAGS:= "all=-N -l"
16+
endif
17+
18+
.PHONY: all
19+
all: go-build
20+
21+
.PHONY: go-mod-tidy-vendor
22+
go-mod-tidy-vendor: $(GO_MOD_TIDY_TARGETS) go-mod-tidy-vendor-cluster-api
23+
$(GO_MOD_TIDY_TARGETS): go-mod-tidy-vendor.%:
24+
cd providers/$* && go mod tidy && go mod vendor
25+
26+
.PHONY: go-build
27+
go-build: $(GO_BUILD_TARGETS) go-build-cluster-api
28+
$(GO_BUILD_TARGETS): go-build.%: bin/$(TARGET_OS_ARCH)/cluster-api-provider-%
29+
30+
$(PROVIDER_TARGETS): bin/$(TARGET_OS_ARCH)/cluster-api-provider-%: providers/%/go.mod
31+
cd providers/$*; \
32+
if [ -f main.go ]; then path="."; else path=./vendor/`grep _ tools.go|awk '{ print $$2 }'|sed 's|"||g'`; fi; \
33+
go build -gcflags $(GCFLAGS) -ldflags $(LDFLAGS) -o ../../bin/$(TARGET_OS_ARCH)/cluster-api-provider-$* "$$path";
34+
35+
.PHONY: go-build-cluster-api
36+
go-build-cluster-api: bin/$(TARGET_OS_ARCH)/cluster-api
37+
38+
.PHONY: go-build-cluster-api
39+
go-mod-tidy-vendor-cluster-api:
40+
cd cluster-api; go mod tidy && go mod vendor
41+
42+
bin/$(TARGET_OS_ARCH)/cluster-api: cluster-api/go.mod
43+
cd cluster-api; \
44+
go build -gcflags $(GCFLAGS) -ldflags $(LDFLAGS) -o ../bin/$(TARGET_OS_ARCH)/cluster-api ./vendor/sigs.k8s.io/cluster-api
45+
46+
.PHONY: go-clean
47+
go-clean: go-clean-providers go-clean-cluster-api
48+
49+
$(GO_CLEAN_TARGETS): go-clean.%:
50+
rm -f bin/*/cluster-api-provider-$*
51+
52+
go-clean-providers:
53+
rm -f bin/*/cluster-api-provider-*
54+
55+
go-clean-cluster-api:
56+
rm -f bin/*/cluster-api
57+
58+
.PHONY: clean
59+
clean: go-clean

cluster-api/README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Cluster API
2+
3+
The OpenShift installer project leverages Cluster API and its infrastructure providers
4+
to create resources needed by an OpenShift cluster.
5+

cluster-api/cluster-api/go.mod

Lines changed: 117 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
1+
module openshift/installer/cluster-api/providers/core
2+
3+
go 1.20
4+
5+
require sigs.k8s.io/cluster-api v1.5.2
6+
7+
require (
8+
github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 // indirect
9+
github.com/MakeNowJust/heredoc v1.0.0 // indirect
10+
github.com/Masterminds/goutils v1.1.1 // indirect
11+
github.com/Masterminds/semver/v3 v3.2.0 // indirect
12+
github.com/Masterminds/sprig/v3 v3.2.3 // indirect
13+
github.com/antlr/antlr4/runtime/Go/antlr v1.4.10 // indirect
14+
github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a // indirect
15+
github.com/beorn7/perks v1.0.1 // indirect
16+
github.com/blang/semver v3.5.1+incompatible // indirect
17+
github.com/blang/semver/v4 v4.0.0 // indirect
18+
github.com/cespare/xxhash/v2 v2.2.0 // indirect
19+
github.com/chai2010/gettext-go v1.0.2 // indirect
20+
github.com/coredns/caddy v1.1.0 // indirect
21+
github.com/coredns/corefile-migration v1.0.21 // indirect
22+
github.com/davecgh/go-spew v1.1.1 // indirect
23+
github.com/docker/distribution v2.8.2+incompatible // indirect
24+
github.com/emicklei/go-restful/v3 v3.9.0 // indirect
25+
github.com/evanphx/json-patch v5.6.0+incompatible // indirect
26+
github.com/evanphx/json-patch/v5 v5.6.0 // indirect
27+
github.com/exponent-io/jsonpath v0.0.0-20151013193312-d6023ce2651d // indirect
28+
github.com/fsnotify/fsnotify v1.6.0 // indirect
29+
github.com/go-errors/errors v1.4.2 // indirect
30+
github.com/go-logr/logr v1.2.4 // indirect
31+
github.com/go-logr/zapr v1.2.4 // indirect
32+
github.com/go-openapi/jsonpointer v0.19.6 // indirect
33+
github.com/go-openapi/jsonreference v0.20.1 // indirect
34+
github.com/go-openapi/swag v0.22.3 // indirect
35+
github.com/gobuffalo/flect v1.0.2 // indirect
36+
github.com/gogo/protobuf v1.3.2 // indirect
37+
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
38+
github.com/golang/protobuf v1.5.3 // indirect
39+
github.com/google/btree v1.0.1 // indirect
40+
github.com/google/cel-go v0.12.6 // indirect
41+
github.com/google/gnostic v0.6.9 // indirect
42+
github.com/google/go-cmp v0.5.9 // indirect
43+
github.com/google/gofuzz v1.2.0 // indirect
44+
github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect
45+
github.com/google/uuid v1.3.0 // indirect
46+
github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7 // indirect
47+
github.com/huandu/xstrings v1.3.3 // indirect
48+
github.com/imdario/mergo v0.3.13 // indirect
49+
github.com/inconshreveable/mousetrap v1.1.0 // indirect
50+
github.com/josharian/intern v1.0.0 // indirect
51+
github.com/json-iterator/go v1.1.12 // indirect
52+
github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de // indirect
53+
github.com/mailru/easyjson v0.7.7 // indirect
54+
github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect
55+
github.com/mitchellh/copystructure v1.2.0 // indirect
56+
github.com/mitchellh/go-wordwrap v1.0.0 // indirect
57+
github.com/mitchellh/mapstructure v1.5.0 // indirect
58+
github.com/mitchellh/reflectwalk v1.0.2 // indirect
59+
github.com/moby/spdystream v0.2.0 // indirect
60+
github.com/moby/term v0.0.0-20221205130635-1aeaba878587 // indirect
61+
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
62+
github.com/modern-go/reflect2 v1.0.2 // indirect
63+
github.com/monochromegane/go-gitignore v0.0.0-20200626010858-205db1a8cc00 // indirect
64+
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
65+
github.com/onsi/gomega v1.27.8 // indirect
66+
github.com/opencontainers/go-digest v1.0.0 // indirect
67+
github.com/peterbourgon/diskv v2.0.1+incompatible // indirect
68+
github.com/pkg/errors v0.9.1 // indirect
69+
github.com/prometheus/client_golang v1.16.0 // indirect
70+
github.com/prometheus/client_model v0.4.0 // indirect
71+
github.com/prometheus/common v0.42.0 // indirect
72+
github.com/prometheus/procfs v0.10.1 // indirect
73+
github.com/russross/blackfriday/v2 v2.1.0 // indirect
74+
github.com/shopspring/decimal v1.3.1 // indirect
75+
github.com/spf13/cast v1.5.1 // indirect
76+
github.com/spf13/cobra v1.7.0 // indirect
77+
github.com/spf13/pflag v1.0.5 // indirect
78+
github.com/stoewer/go-strcase v1.2.0 // indirect
79+
github.com/valyala/fastjson v1.6.4 // indirect
80+
github.com/xlab/treeprint v1.1.0 // indirect
81+
go.starlark.net v0.0.0-20200306205701-8dd3e2ee1dd5 // indirect
82+
go.uber.org/atomic v1.9.0 // indirect
83+
go.uber.org/multierr v1.8.0 // indirect
84+
go.uber.org/zap v1.24.0 // indirect
85+
golang.org/x/crypto v0.11.0 // indirect
86+
golang.org/x/net v0.13.0 // indirect
87+
golang.org/x/oauth2 v0.10.0 // indirect
88+
golang.org/x/sys v0.10.0 // indirect
89+
golang.org/x/term v0.10.0 // indirect
90+
golang.org/x/text v0.11.0 // indirect
91+
golang.org/x/time v0.3.0 // indirect
92+
gomodules.xyz/jsonpatch/v2 v2.3.0 // indirect
93+
google.golang.org/appengine v1.6.7 // indirect
94+
google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 // indirect
95+
google.golang.org/protobuf v1.31.0 // indirect
96+
gopkg.in/inf.v0 v0.9.1 // indirect
97+
gopkg.in/yaml.v2 v2.4.0 // indirect
98+
gopkg.in/yaml.v3 v3.0.1 // indirect
99+
k8s.io/api v0.27.2 // indirect
100+
k8s.io/apiextensions-apiserver v0.27.2 // indirect
101+
k8s.io/apimachinery v0.27.2 // indirect
102+
k8s.io/apiserver v0.27.2 // indirect
103+
k8s.io/cli-runtime v0.27.2 // indirect
104+
k8s.io/client-go v0.27.2 // indirect
105+
k8s.io/cluster-bootstrap v0.27.2 // indirect
106+
k8s.io/component-base v0.27.2 // indirect
107+
k8s.io/klog/v2 v2.90.1 // indirect
108+
k8s.io/kube-openapi v0.0.0-20230501164219-8b0f38b5fd1f // indirect
109+
k8s.io/kubectl v0.27.2 // indirect
110+
k8s.io/utils v0.0.0-20230209194617-a36077c30491 // indirect
111+
sigs.k8s.io/controller-runtime v0.15.1 // indirect
112+
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
113+
sigs.k8s.io/kustomize/api v0.13.2 // indirect
114+
sigs.k8s.io/kustomize/kyaml v0.14.1 // indirect
115+
sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect
116+
sigs.k8s.io/yaml v1.3.0 // indirect
117+
)

0 commit comments

Comments
 (0)