Skip to content
This repository has been archived by the owner on Nov 18, 2019. It is now read-only.

Commit

Permalink
Don't create ClusterServiceBroker if not used with svc catalog (#55)
Browse files Browse the repository at this point in the history
Signed-off-by: Tamal Saha <tamal@appscode.com>
  • Loading branch information
tamalsaha authored Mar 28, 2019
1 parent f35b822 commit 0772097
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions chart/service-broker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ The following table lists the configurable parameters of the AppsCode Service Br
| `monitoring.serviceMonitor.labels` | Specify the labels for ServiceMonitor. Prometheus crd will select ServiceMonitor using these labels. Only usable when monitoring agent is `prometheus.io/coreos-operator`. | `app: <generated app name>` and `release: <release name>` |
| `catalog.names` | List of catalog | `["kubedb"]` |
| `catalog.path` | The path where catalog for different service plans are mounted | `/etc/config/catalog` |
| `catalog.controller.enabled` | Specify `false` if used without service catalog (eg CloudFoundry) | `true` |
| `catalog.controller.serviceAccount.namespace` | Namespace of service catalog manager controller service account | `catalog` |
| `catalog.controller.serviceAccount.name` | Name of service catalog controller manager service account | `service-catalog-controller-manager` |
| `defaultNamespace` | The default namespace for brokers when the request doesn't specify | `default` |
Expand Down
2 changes: 2 additions & 0 deletions chart/service-broker/templates/cluster-service-broker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
{{- $altName1 := printf "%s.%s" $cn .Release.Namespace }}
{{- $altName2 := printf "%s.%s.svc" $cn .Release.Namespace }}
{{- $cert := genSignedCert $cn nil (list $altName1 $altName2) 3650 $ca }}
{{ if .Values.catalog.controller.enabled }}
apiVersion: servicecatalog.k8s.io/v1beta1
kind: ClusterServiceBroker
metadata:
Expand Down Expand Up @@ -43,6 +44,7 @@ metadata:
annotations:
kubernetes.io/service-account.name: {{ .Values.catalog.controller.serviceAccount.name }}
type: kubernetes.io/service-account-token
{{ end }}
---
apiVersion: v1
kind: Secret
Expand Down
2 changes: 2 additions & 0 deletions chart/service-broker/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,8 @@ catalog:
# The path where catalog for different database service plans are stored
path: /etc/config/catalog
controller:
# set enabled=false, if not used with service catalog
enabled: true
serviceAccount:
namespace: catalog
name: service-catalog-controller-manager
Expand Down

0 comments on commit 0772097

Please sign in to comment.