Skip to content
This repository has been archived by the owner on Jan 28, 2020. It is now read-only.

Commit

Permalink
Merge pull request #311 from csrwng/merge_cluster_api_command
Browse files Browse the repository at this point in the history
Merge cluster API commands into cluster-operator binary
  • Loading branch information
openshift-merge-robot authored Aug 2, 2018
2 parents 24e7660 + 647f9de commit ae319de
Show file tree
Hide file tree
Showing 2,238 changed files with 277,100 additions and 13,418 deletions.
15 changes: 2 additions & 13 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -202,9 +202,6 @@ $(BINDIR)/e2e.test: .init
sed "s/GO_VERSION/$(GO_VERSION)/g" < build/build-image/Dockerfile | \
docker build -t clusteroperatorbuildimage -

.apiServerBuilderImage: .clusterOperatorBuildImage build/apiserver-builder/Dockerfile
docker build -t apiserverbuilderimage ./build/apiserver-builder

# Util targets
##############
.PHONY: verify verify-generated verify-client-gen verify-mocks
Expand Down Expand Up @@ -284,7 +281,7 @@ test-unit: .init build .generate_mocks

test-integration: .init build
@echo Running integration tests:
$(DOCKER_CMD) go test -race $(TEST_FLAGS) \
$(DOCKER_CMD) go test -parallel 1 -race $(TEST_FLAGS) \
$(addprefix $(CLUSTER_OPERATOR_PKG)/,$(INT_TEST_DIRS)) $(TEST_LOG_FLAGS)

clean-e2e:
Expand Down Expand Up @@ -372,6 +369,7 @@ OA_ANSIBLE_BRANCH ?= release-3.10
define build-cluster-operator-ansible-image #(repo, branch, imagename, tag, clusterapi_playbook)
cp build/cluster-operator-ansible/playbooks/cluster-api-prep/$5 build/cluster-operator-ansible/playbooks/cluster-api-prep/deploy-cluster-api.yaml
cp bin/aws-machine-controller build/cluster-operator-ansible/playbooks/cluster-api-prep/files
cp bin/cluster-operator build/cluster-operator-ansible/playbooks/cluster-api-prep/files
docker build -t "$3:$4" --build-arg=CO_ANSIBLE_URL=$1 --build-arg=CO_ANSIBLE_BRANCH=$2 build/cluster-operator-ansible
endef

Expand Down Expand Up @@ -399,15 +397,6 @@ playbook-mock-image: build/playbook-mock/Dockerfile $(BINDIR)/coutil
docker tag $(PLAYBOOK_MOCK_IMAGE) $(REGISTRY)playbook-mock:$(VERSION)
docker tag $(PLAYBOOK_MOCK_MUTABLE_IMAGE) $(REGISTRY)playbook-mock:$(MUTABLE_TAG)

.PHONY: $(CLUSTERAPI_BIN)/apiserver
$(CLUSTERAPI_BIN)/apiserver: .apiServerBuilderImage
mkdir -p $(PWD)/$(CLUSTERAPI_BIN) && docker run --security-opt label:disable -v $(PWD)/$(CLUSTERAPI_BIN):/output --entrypoint=/bin/bash apiserverbuilderimage -c "export GOPATH=/go && mkdir -p /go/src/sigs.k8s.io/cluster-api && cd /go/src/sigs.k8s.io/cluster-api && git clone https://github.com/kubernetes-sigs/cluster-api.git . && apiserver-boot build executables --generate=false && touch /output/controller-manager /output/apiserver && cp bin/* /output"

.PHONY: kubernetes-cluster-api
kubernetes-cluster-api: $(CLUSTERAPI_BIN)/apiserver build/clusterapi-image/Dockerfile
cp build/clusterapi-image/Dockerfile $(CLUSTERAPI_BIN)
docker build -t clusterapi ./$(CLUSTERAPI_BIN)

.PHONY: aws-machine-controller-image
aws-machine-controller-image: build/aws-machine-controller/Dockerfile $(BINDIR)/aws-machine-controller
$(call build-and-tag,"aws-machine-controller",$(AWS_MACHINE_CONTROLLER_IMAGE),$(AWS_MACHINE_CONTROLLER_MUTABLE_IMAGE))
Expand Down
20 changes: 0 additions & 20 deletions build/apiserver-builder/Dockerfile

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@

- name: copy main template over
copy:
src: files/cluster-api-template.yaml
src: "files/{{ cluster_api_template }}"
dest: "{{ temp_dir.path }}/cluster-api-template.yaml"

- name: copy machine controller template over
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,18 @@
dest: /usr/bin/aws-machine-controller
setype: container_file_t
mode: 0755

- name: copy cluster operator binary to master
copy:
src: files/cluster-operator
dest: /usr/bin/cluster-operator
setype: container_file_t
mode: 0755
- hosts: masters[0]
gather_facts: no
tasks:
- name: set machine controller template
set_fact:
machine_controller_template: machine-controller-template-dev.yaml
cluster_api_template: cluster-api-template-dev.yaml

- import_playbook: deploy-cluster-api-common.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,6 @@
- name: set machine controller template
set_fact:
machine_controller_template: machine-controller-template.yaml
cluster_api_template: cluster-api-template.yaml

- import_playbook: deploy-cluster-api-common.yaml
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
aws-machine-controller
cluster-operator
Loading

0 comments on commit ae319de

Please sign in to comment.