Skip to content

Commit

Permalink
Squashed 'cmd/service-catalog/go/src/github.com/kubernetes-incubator/…
Browse files Browse the repository at this point in the history
…service-catalog/' changes from aa27078754..510060232e

510060232e origin build: add origin tooling
de45e94 v0.1.0 chart changes (#1468)
0bb9982 Modify Makefile to only specify ldflags once (#1471)
5d6afac Fixes #735: Add repo-sync script for charts (#1453)
630f13f fix lingering unversioned client API (#1466)
6f49128 Fix several logging errors (#1464)
2aece61 Delete removed serviceClasses when they have no instances left (#1450)
179d302 Uncommenting UID field after updating to k8s 1.8 (#1457)
b70c076 Reorder class and plan creation; test plan conflict handling (#1459)
4bea012 Use versioned client APIs (#1458)
ff4af30 clean up logic for 410 gone deprovision poll (#1452)
3fddf27 clean up logic and fix message for failed poll (#1451)
40926cd Fix typo from #1354 (#1456)
ff86ef2 Delete removed serviceplans when they have no instances left (#1444)
8411a16 tweak binding setAndUpdateOrphanMitigation function (#1448)
ce28252 Combine apiserver and controller-manager into a single service-catalog image (#1343)
7bbc8ee Check service class / plan before allowing provisioning or plan changes. (#1439)
baf28de Create listers before adding event handlers in controller (#1446)
294157d remove setServiceBindingCondition dependency on controller (#1441)
118a0f7 Fix typo in validation (#1447)
117bfbd clean up error logging (#1443)
dff470f Move "External" around in some resource names/properties (#1354)
0885edb Adding expectedGot function and using it. (#1440)
a7d582e Pretty controller broker (#1442)
c5edfaf Set apimachinery build variables with semver info (#1429)
0e90d82 Add a pretty formatter for ClusterService[Class|Plan] (#1408)
fb874df Remove deprecated basic auth config support (#1431)
f4cd181 Migrate to metav1 methods for manipulating controllerRefs (#1433)
96b286e Make service/plan reference fields on instance spec selectable (#1422)
33f2b04 First example using the pretty context builder. (#1403)
7852917 Stop using corev1.ObjectReference and corev1.LocalObjectReference (#1417)
fcf9480 Add tests for plan updates (#1412)
819332e Add root CAs (#1419)
b49a76a Clean Makefile a little (#1399)
d681da0 Use a separate etcd prefix for each integration test to keep tests isolated (#1415)
314a622 Wire etcd prefix to storage and call complete with options (#1394)
REVERT: aa27078754 origin build: add origin tooling

git-subtree-dir: cmd/service-catalog/go/src/github.com/kubernetes-incubator/service-catalog
git-subtree-split: 510060232e54eb64b294213bb5d7847e169a2fac
  • Loading branch information
jpeeler committed Oct 24, 2017
1 parent f5e4c52 commit ee4ff3f
Show file tree
Hide file tree
Showing 107 changed files with 4,196 additions and 1,744 deletions.
70 changes: 25 additions & 45 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ SRC_DIRS = $(shell sh -c "find $(TOP_SRC_DIRS) -name \\*.go \
TEST_DIRS ?= $(shell sh -c "find $(TOP_SRC_DIRS) -name \\*_test.go \
-exec dirname {} \\; | sort | uniq")
VERSION ?= $(shell git describe --always --abbrev=7 --dirty)
BUILD_LDFLAGS = $(shell build/version.sh $(ROOT) $(SC_PKG))

# Run stat against /dev/null and check if it has any stdout output.
# If stdout is blank, we are detecting bsd-stat because stat it has
Expand Down Expand Up @@ -73,15 +74,13 @@ $(error Unsupported platform to compile for)
endif

GO_BUILD = env GOOS=$(PLATFORM) GOARCH=$(ARCH) go build -i $(GOFLAGS) \
-ldflags "-X $(SC_PKG)/pkg.VERSION=$(VERSION)"
-ldflags "-X $(SC_PKG)/pkg.VERSION=$(VERSION) $(BUILD_LDFLAGS)"
BASE_PATH = $(ROOT:/src/github.com/kubernetes-incubator/service-catalog/=)
export GOPATH = $(BASE_PATH):$(ROOT)/vendor

MUTABLE_TAG ?= canary
APISERVER_IMAGE = $(REGISTRY)apiserver-$(ARCH):$(VERSION)
APISERVER_MUTABLE_IMAGE = $(REGISTRY)apiserver-$(ARCH):$(MUTABLE_TAG)
CONTROLLER_MANAGER_IMAGE = $(REGISTRY)controller-manager-$(ARCH):$(VERSION)
CONTROLLER_MANAGER_MUTABLE_IMAGE = $(REGISTRY)controller-manager-$(ARCH):$(MUTABLE_TAG)
SERVICE_CATALOG_IMAGE = $(REGISTRY)service-catalog-$(ARCH):$(VERSION)
SERVICE_CATALOG_MUTABLE_IMAGE = $(REGISTRY)service-catalog-$(ARCH):$(MUTABLE_TAG)
USER_BROKER_IMAGE = $(REGISTRY)user-broker-$(ARCH):$(VERSION)
USER_BROKER_MUTABLE_IMAGE = $(REGISTRY)user-broker-$(ARCH):$(MUTABLE_TAG)

Expand Down Expand Up @@ -109,11 +108,10 @@ NON_VENDOR_DIRS = $(shell $(DOCKER_CMD) glide nv)

# This section builds the output binaries.
# Some will have dedicated targets to make it easier to type, for example
# "apiserver" instead of "bin/apiserver".
# "service-catalog" instead of "bin/service-catalog".
#########################################################################
build: .init .generate_files \
$(BINDIR)/apiserver \
$(BINDIR)/controller-manager \
$(BINDIR)/service-catalog \
$(BINDIR)/user-broker

user-broker: $(BINDIR)/user-broker
Expand All @@ -122,14 +120,10 @@ $(BINDIR)/user-broker: .init contrib/cmd/user-broker \
$(shell find contrib/pkg/broker -type f)
$(DOCKER_CMD) $(GO_BUILD) -o $@ $(SC_PKG)/contrib/cmd/user-broker

# We'll rebuild apiserver if any go file has changed (ie. NEWEST_GO_FILE)
apiserver: $(BINDIR)/apiserver
$(BINDIR)/apiserver: .init .generate_files cmd/apiserver $(NEWEST_GO_FILE)
$(DOCKER_CMD) $(GO_BUILD) -o $@ $(SC_PKG)/cmd/apiserver

controller-manager: $(BINDIR)/controller-manager
$(BINDIR)/controller-manager: .init .generate_files cmd/controller-manager $(NEWEST_GO_FILE)
$(DOCKER_CMD) $(GO_BUILD) -o $@ $(SC_PKG)/cmd/controller-manager
# We'll rebuild service-catalog if any go file has changed (ie. NEWEST_GO_FILE)
service-catalog: $(BINDIR)/service-catalog
$(BINDIR)/service-catalog: .init .generate_files cmd/service-catalog $(NEWEST_GO_FILE)
$(DOCKER_CMD) $(GO_BUILD) -o $@ $(SC_PKG)/cmd/service-catalog

# This section contains the code generation stuff
#################################################
Expand Down Expand Up @@ -220,8 +214,9 @@ $(BINDIR)/e2e.test: .init $(NEWEST_E2ETEST_SOURCE) $(NEWEST_GO_FILE)
verify: .init .generate_files verify-client-gen
@echo Running gofmt:
@$(DOCKER_CMD) gofmt -l -s $(TOP_TEST_DIRS) $(TOP_SRC_DIRS)>.out 2>&1||true
@bash -c '[ "`cat .out`" == "" ] || \
(echo -e "\n*** Please 'gofmt' the following:" ; cat .out ; echo ; false)'
@[ ! -s .out ] || \
(echo && echo "*** Please 'gofmt' the following:" && \
cat .out && echo && rm .out && false)
@rm .out
@#
@echo Running golint and go vet:
Expand All @@ -240,7 +235,7 @@ verify: .init .generate_files verify-client-gen
$(DOCKER_CMD) go vet $(NON_VENDOR_DIRS)
@echo Running repo-infra verify scripts
@$(DOCKER_CMD) vendor/github.com/kubernetes/repo-infra/verify/verify-boilerplate.sh --rootdir=. | grep -v generated > .out 2>&1 || true
@bash -c '[ "`cat .out`" == "" ] || (cat .out ; false)'
@[ ! -s .out ] || (cat .out && rm .out && false)
@rm .out
@#
@echo Running href checker:
Expand Down Expand Up @@ -328,7 +323,7 @@ clean-coverage:

# Building Docker Images for our executables
############################################
images: user-broker-image controller-manager-image apiserver-image
images: user-broker-image service-catalog-image

images-all: $(addprefix arch-image-,$(ALL_ARCH))
arch-image-%:
Expand Down Expand Up @@ -357,24 +352,17 @@ ifeq ($(ARCH),amd64)
docker tag $(USER_BROKER_MUTABLE_IMAGE) $(REGISTRY)user-broker:$(MUTABLE_TAG)
endif

apiserver-image: build/apiserver/Dockerfile $(BINDIR)/apiserver
$(call build-and-tag,"apiserver",$(APISERVER_IMAGE),$(APISERVER_MUTABLE_IMAGE))
ifeq ($(ARCH),amd64)
docker tag $(APISERVER_IMAGE) $(REGISTRY)apiserver:$(VERSION)
docker tag $(APISERVER_MUTABLE_IMAGE) $(REGISTRY)apiserver:$(MUTABLE_TAG)
endif

controller-manager-image: build/controller-manager/Dockerfile $(BINDIR)/controller-manager
$(call build-and-tag,"controller-manager",$(CONTROLLER_MANAGER_IMAGE),$(CONTROLLER_MANAGER_MUTABLE_IMAGE))
service-catalog-image: build/service-catalog/Dockerfile $(BINDIR)/service-catalog
$(call build-and-tag,"service-catalog",$(SERVICE_CATALOG_IMAGE),$(SERVICE_CATALOG_MUTABLE_IMAGE))
ifeq ($(ARCH),amd64)
docker tag $(CONTROLLER_MANAGER_IMAGE) $(REGISTRY)controller-manager:$(VERSION)
docker tag $(CONTROLLER_MANAGER_MUTABLE_IMAGE) $(REGISTRY)controller-manager:$(MUTABLE_TAG)
docker tag $(SERVICE_CATALOG_IMAGE) $(REGISTRY)service-catalog:$(VERSION)
docker tag $(SERVICE_CATALOG_MUTABLE_IMAGE) $(REGISTRY)service-catalog:$(MUTABLE_TAG)
endif


# Push our Docker Images to a registry
######################################
push: user-broker-push controller-manager-push apiserver-push
push: user-broker-push service-catalog-push

user-broker-push: user-broker-image
docker push $(USER_BROKER_IMAGE)
Expand All @@ -384,20 +372,12 @@ ifeq ($(ARCH),amd64)
docker push $(REGISTRY)user-broker:$(MUTABLE_TAG)
endif

controller-manager-push: controller-manager-image
docker push $(CONTROLLER_MANAGER_IMAGE)
docker push $(CONTROLLER_MANAGER_MUTABLE_IMAGE)
ifeq ($(ARCH),amd64)
docker push $(REGISTRY)controller-manager:$(VERSION)
docker push $(REGISTRY)controller-manager:$(MUTABLE_TAG)
endif

apiserver-push: apiserver-image
docker push $(APISERVER_IMAGE)
docker push $(APISERVER_MUTABLE_IMAGE)
service-catalog-push: service-catalog-image
docker push $(SERVICE_CATALOG_IMAGE)
docker push $(SERVICE_CATALOG_MUTABLE_IMAGE)
ifeq ($(ARCH),amd64)
docker push $(REGISTRY)apiserver:$(VERSION)
docker push $(REGISTRY)apiserver:$(MUTABLE_TAG)
docker push $(REGISTRY)service-catalog:$(VERSION)
docker push $(REGISTRY)service-catalog:$(MUTABLE_TAG)
endif


Expand Down
214 changes: 0 additions & 214 deletions ORIGIN-SYNC-README.txt

This file was deleted.

20 changes: 0 additions & 20 deletions build/apiserver/Dockerfile

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@

FROM BASEIMAGE

ADD controller-manager /opt/services/
RUN export DEBIAN_FRONTEND=noninteractive && \
apt-get update && \
apt-get install ca-certificates -y && \
rm -rf /var/lib/apt/lists/*

ENTRYPOINT ["/opt/services/controller-manager" ]
ADD service-catalog opt/services/

ENTRYPOINT ["/opt/services/service-catalog"]
Loading

0 comments on commit ee4ff3f

Please sign in to comment.