Skip to content

Commit

Permalink
Merge pull request pmorie#34 from pmorie/lili/add-to-makefile
Browse files Browse the repository at this point in the history
Add provision and bind targets to Makefile
  • Loading branch information
pmorie authored Feb 7, 2018
2 parents 0f248fd + 30dd585 commit 93a4860
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 6 deletions.
18 changes: 16 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ ifdef USE_SUDO_FOR_DOCKER
SUDO_CMD = sudo
endif

IMAGE ?= quay.io/osb-starter-pack/servicebroker
TAG ?= $(shell git describe --tags --always)

build:
go build -i github.com/pmorie/osb-starter-pack/cmd/servicebroker

Expand All @@ -15,13 +18,13 @@ linux:

image: linux
cp servicebroker image/
$(SUDO_CMD) docker build image/ -t quay.io/osb-starter-pack/servicebroker
$(SUDO_CMD) docker build image/ -t "$(IMAGE):$(TAG)"

clean:
rm -f servicebroker

push: image
$(SUDO_CMD) docker push quay.io/osb-starter-pack/servicebroker:latest
$(SUDO_CMD) docker push "$(IMAGE):$(TAG)"

deploy-helm: image
helm install charts/servicebroker \
Expand All @@ -31,3 +34,14 @@ deploy-helm: image
deploy-openshift: image
oc new-project osb-starter-pack
oc process -f openshift/starter-pack.yaml | oc create -f -

create-ns:
kubectl create ns test-ns

provision: create-ns
kubectl apply -f manifests/service-instance.yaml

bind:
kubectl apply -f manifests/service-binding.yaml

.PHONY: build test linux image clean push deploy-help deploy-openshift create-ns provision bind
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
apiVersion: servicecatalog.k8s.io/v1beta1
kind: ServiceBinding
metadata:
name: skeleton-service-binding
name: example-starter-pack-service-binding
namespace: test-ns
spec:
instanceRef:
name: skeleton-service-instance
name: example-starter-pack-service
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
apiVersion: servicecatalog.k8s.io/v1beta1
kind: ServiceInstance
metadata:
name: skeleton-service-instance
name: example-starter-pack-service
namespace: test-ns
spec:
clusterServiceClassExternalName: skeleton-example-service
clusterServiceClassExternalName: example-starter-pack-service
clusterServicePlanExternalName: default
parameters:
param-1: value-1
Expand Down

0 comments on commit 93a4860

Please sign in to comment.