Skip to content

Commit

Permalink
Merge pull request pmorie#27 from pmorie/openshift-template
Browse files Browse the repository at this point in the history
Add openshift template
  • Loading branch information
pmorie authored Jan 31, 2018
2 parents 2571070 + 91884ee commit 69931d3
Show file tree
Hide file tree
Showing 3 changed files with 90 additions and 2 deletions.
9 changes: 8 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,19 @@ linux:

image: linux
cp servicebroker image/
docker build image/ -t osb-skeleton/servicebroker
docker build image/ -t quay.io/osb-starter-pack/servicebroker

clean:
rm -f servicebroker

push: image
docker push quay.io/osb-starter-pack/servicebroker:latest

deploy-helm: image
helm install charts/servicebroker \
--name broker-skeleton --namespace broker-skeleton \
--set imagePullPolicy=Never

deploy-openshift: image
oc new-project osb-starter-pack
oc process -f openshift/broker-skeleton.yaml | oc create -f -
2 changes: 1 addition & 1 deletion charts/servicebroker/values.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Default values for the broker-skeleton
# Image to use
image: osb-skeleton/servicebroker:latest
image: quay.io/osb-starter-pack/servicebroker:latest
# ImagePullPolicy; valid values are "IfNotPresent", "Never", and "Always"
imagePullPolicy: Always
# Certificate details to use for TLS. Leave blank to not use TLS
Expand Down
81 changes: 81 additions & 0 deletions openshift/broker-skeleton.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
apiVersion: v1
kind: Template
metadata:
name: osb-starter-pack
objects:

- apiVersion: servicecatalog.k8s.io/v1beta1
kind: ClusterServiceBroker
metadata:
name: osb-starter-pack
spec:
url: http://osb-starter-pack.osb-starter-pack.svc.cluster.local

- kind: ServiceAccount
apiVersion: v1
metadata:
name: osb-starter-pack

- kind: Service
apiVersion: v1
metadata:
name: osb-starter-pack
labels:
app: osb-starter-pack
spec:
selector:
app: osb-starter-pack
ports:
- protocol: TCP
port: 80
targetPort: 8080
- kind: Deployment
apiVersion: extensions/v1beta1
metadata:
name: osb-starter-pack
labels:
app: osb-starter-pack
spec:
replicas: 1
selector:
matchLabels:
app: osb-starter-pack
template:
metadata:
labels:
app: osb-starter-pack
spec:
containers:
- name: service-osb-starter-pack
image: ${IMAGE}
imagePullPolicy: Always
command:
- /opt/servicebroker/servicebroker
args:
- --port
- "8080"
ports:
- containerPort: 8080
readinessProbe:
tcpSocket:
port: 8080
failureThreshold: 1
initialDelaySeconds: 10
periodSeconds: 10
successThreshold: 1
timeoutSeconds: 2
livenessProbe:
tcpSocket:
port: 8080
failureThreshold: 3
initialDelaySeconds: 10
periodSeconds: 10
successThreshold: 1
timeoutSeconds: 2

parameters:
- description: Name of the image to use
displayName: Image name
name: IMAGE
required: true
value: quay.io/osb-starter-pack/servicebroker:latest

0 comments on commit 69931d3

Please sign in to comment.