Skip to content

use openshift service catalog in cluster up #15316

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 21, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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