Skip to content

Commit

Permalink
use openshift service catalog in cluster up
Browse files Browse the repository at this point in the history
  • Loading branch information
bparees committed Jul 19, 2017
1 parent 20e72f7 commit 8c4ba94
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 14 deletions.
14 changes: 9 additions & 5 deletions examples/service-catalog/service-catalog.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,9 @@ objects:
spec:
serviceAccountName: service-catalog-apiserver
containers:
- args:
- command:
- apiserver
args:
- --admission-control
- KubernetesNamespaceLifecycle
- --storage-type
Expand All @@ -212,7 +214,7 @@ objects:
- "10"
- --cors-allowed-origins
- ${CORS_ALLOWED_ORIGIN}
image: quay.io/kubernetes-service-catalog/apiserver:${SERVICE_CATALOG_TAG}
image: openshift/origin-service-catalog:${SERVICE_CATALOG_TAG}
imagePullPolicy: IfNotPresent
name: apiserver
ports:
Expand Down Expand Up @@ -299,7 +301,9 @@ objects:
spec:
serviceAccountName: service-catalog-controller
containers:
- args:
- command:
- controller-manager
args:
- -v
- "5"
- --service-catalog-api-server-url
Expand All @@ -308,7 +312,7 @@ objects:
- service-catalog
- --broker-relist-interval
- "5m"
image: quay.io/kubernetes-service-catalog/controller-manager:${SERVICE_CATALOG_TAG}
image: openshift/origin-service-catalog:${SERVICE_CATALOG_TAG}
imagePullPolicy: IfNotPresent
name: controller-manager
ports:
Expand Down Expand Up @@ -356,7 +360,7 @@ parameters:
displayName: Service catalog image tag
name: SERVICE_CATALOG_TAG
required: true
value: canary
value: latest
- description: Cluster ip address for the service catalog service
displayName: Service Catalog Service IP
name: SERVICE_CATALOG_SERVICE_IP
Expand Down
14 changes: 9 additions & 5 deletions pkg/bootstrap/bindata.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions pkg/bootstrap/docker/openshift/servicecatalog.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const (
)

// InstallServiceCatalog checks whether the service catalog is installed and installs it if not already installed
func (h *Helper) InstallServiceCatalog(f *clientcmd.Factory, publicMaster, catalogHost string) error {
func (h *Helper) InstallServiceCatalog(f *clientcmd.Factory, publicMaster, catalogHost string, tag string) error {
osClient, kubeClient, err := f.Clients()
if err != nil {
return errors.NewError("cannot obtain API clients").WithCause(err).WithDetails(h.OriginLog())
Expand Down Expand Up @@ -81,8 +81,9 @@ func (h *Helper) InstallServiceCatalog(f *clientcmd.Factory, publicMaster, catal
params := map[string]string{
"SERVICE_CATALOG_SERVICE_IP": ServiceCatalogServiceIP,
"CORS_ALLOWED_ORIGIN": publicMaster,
"SERVICE_CATALOG_TAG": tag,
}
glog.V(2).Infof("instantiating service catalog template")
glog.V(2).Infof("instantiating service catalog template with parameters %v", params)

// Stands up the service catalog apiserver, etcd, and controller manager
err = instantiateTemplate(osClient, clientcmd.ResourceMapper(f), OpenshiftInfraNamespace, catalogTemplate, catalogNamespace, params)
Expand Down
4 changes: 2 additions & 2 deletions pkg/bootstrap/docker/up.go
Original file line number Diff line number Diff line change
Expand Up @@ -1033,8 +1033,8 @@ func (c *ClientStartConfig) InstallServiceCatalog(out io.Writer) error {
if len(publicMaster) == 0 {
publicMaster = c.ServerIP
}

return c.OpenShiftHelper().InstallServiceCatalog(f, publicMaster, openshift.CatalogHost(c.RoutingSuffix, c.ServerIP))
tag := c.ImageVersion
return c.OpenShiftHelper().InstallServiceCatalog(f, publicMaster, openshift.CatalogHost(c.RoutingSuffix, c.ServerIP), tag)
}

// Login logs into the new server and sets up a default user and project
Expand Down

0 comments on commit 8c4ba94

Please sign in to comment.