Skip to content
This repository was archived by the owner on Sep 6, 2025. It is now read-only.
Open
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
2 changes: 0 additions & 2 deletions OWNERS
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
approvers:
- jberkhahn
- mhbauer
- piotrmiskiewicz
- jhvhs
2 changes: 1 addition & 1 deletion charts/catalog/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: v1
name: catalog
description: service-catalog webhook server and controller-manager helm chart
version: 0.3.1
version: 0.3.2
4 changes: 4 additions & 0 deletions charts/catalog/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,13 @@ chart and their default values.
| `rbacEnable` | If true, create & use RBAC resources | `true` |
| `originatingIdentityEnabled` | Whether the OriginatingIdentity feature should be enabled | `true` |
| `persistence.storageClass` | Define the storageclass use by pvc | `null` |
| `affinity` | Affinity settings ([docs](https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#affinity-and-anti-affinity)) | `{}` |
| `asyncBindingOperationsEnabled` | Whether or not alpha support for async binding operations is enabled | `false` |
| `namespacedServiceBrokerDisabled` | Whether or not alpha support for namespace scoped brokers is disabled | `false` |
| `nodeSelector` | Node labels for pod assignment (global parameter for all pods) | `{}` |
| `podLabels` | Additional pod labels to include for all pods | `{}` |
| `priorityClassName` | Define PriorityClass for pods | "" |
| `tolerations` | Tolerations for pod assignment | `[]` |

Specify each parameter using the `--set key=value[,key=value]` argument to
`helm install`.
Expand Down
17 changes: 17 additions & 0 deletions charts/catalog/templates/cleaner-job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -90,12 +90,18 @@ spec:
template:
metadata:
labels:
{{- if .Values.podLabels }}
{{- tpl (toYaml .Values.podLabels) $ | nindent 8 }}
{{- end }}
cleaner-job: "true"
app: {{ template "fullname" . }}-clean-job
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
release: "{{ .Release.Name }}"
heritage: "{{ .Release.Service }}"
spec:
{{- if .Values.priorityClassName }}
priorityClassName: {{ .Values.priorityClassName | quote }}
{{- end }}
{{- with .Values.securityContext }}
securityContext:
{{ toYaml . | indent 8 }}
Expand All @@ -118,3 +124,14 @@ spec:
- {{ template "fullname" . }}-controller-manager
- --webhook-configurations
- {{ template "fullname" . }}-webhook {{ template "fullname" . }}-validating-webhook
{{- with .Values.affinity }}
affinity: {{- tpl (toYaml .) $ | nindent 8 }}
{{- end }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{ toYaml . | indent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{ toYaml . | indent 8 }}
{{- end }}
18 changes: 14 additions & 4 deletions charts/catalog/templates/controller-manager-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,13 @@ spec:
metadata:
annotations:
prometheus.io/scrape: "{{ .Values.controllerManager.enablePrometheusScrape }}"
{{ if .Values.controllerManager.annotations }}
{{- if .Values.controllerManager.annotations }}
{{ toYaml .Values.controllerManager.annotations | indent 8 }}
{{- end }}
labels:
{{- if .Values.podLabels }}
{{- tpl (toYaml .Values.podLabels) $ | nindent 8 }}
{{- end }}
app: {{ template "fullname" . }}-controller-manager
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
release: "{{ .Release.Name }}"
Expand Down Expand Up @@ -131,7 +134,14 @@ spec:
successThreshold: 1
timeoutSeconds: 5
{{- end }}
{{ if .Values.controllerManager.nodeSelector }}
{{- with .Values.affinity }}
affinity: {{- tpl (toYaml .) $ | nindent 8 }}
{{- end }}
{{- if or .Values.controllerManager.nodeSelector .Values.nodeSelector }}
nodeSelector:
{{ toYaml .Values.controllerManager.nodeSelector | indent 8 }}
{{ end }}
{{ toYaml (mustMerge .Values.controllerManager.nodeSelector .Values.nodeSelector) | indent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{ toYaml . | indent 8 }}
{{- end }}
17 changes: 17 additions & 0 deletions charts/catalog/templates/migration-job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -106,12 +106,18 @@ spec:
template:
metadata:
labels:
{{- if .Values.podLabels }}
{{- tpl (toYaml .Values.podLabels) $ | nindent 8 }}
{{- end }}
migration-job: "true"
app: {{ template "fullname" . }}-migration-job
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
release: "{{ .Release.Name }}"
heritage: "{{ .Release.Service }}"
spec:
{{- if .Values.priorityClassName }}
priorityClassName: {{ .Values.priorityClassName | quote }}
{{- end }}
{{- with .Values.securityContext }}
securityContext:
{{ toYaml . | indent 8 }}
Expand Down Expand Up @@ -146,3 +152,14 @@ spec:
volumeMounts:
- name: storage
mountPath: /data
{{- with .Values.affinity }}
affinity: {{- tpl (toYaml .) $ | nindent 8 }}
{{- end }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{ toYaml . | indent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{ toYaml . | indent 8 }}
{{- end }}
17 changes: 17 additions & 0 deletions charts/catalog/templates/pre-migration-job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -120,12 +120,18 @@ spec:
template:
metadata:
labels:
{{- if .Values.podLabels }}
{{- tpl (toYaml .Values.podLabels) $ | nindent 8 }}
{{- end }}
migration-job: "true"
app: {{ template "fullname" . }}-pre-migration-job
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
release: "{{ .Release.Name }}"
heritage: "{{ .Release.Service }}"
spec:
{{- if .Values.priorityClassName }}
priorityClassName: {{ .Values.priorityClassName | quote }}
{{- end }}
{{- with .Values.securityContext }}
securityContext:
{{ toYaml . | indent 8 }}
Expand Down Expand Up @@ -156,3 +162,14 @@ spec:
volumeMounts:
- name: storage
mountPath: /data
{{- with .Values.affinity }}
affinity: {{- tpl (toYaml .) $ | nindent 8 }}
{{- end }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{ toYaml . | indent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{ toYaml . | indent 8 }}
{{- end }}
18 changes: 14 additions & 4 deletions charts/catalog/templates/webhook-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,15 @@ spec:
template:
metadata:
labels:
{{- if .Values.podLabels }}
{{- tpl (toYaml .Values.podLabels) $ | nindent 8 }}
{{- end }}
app: {{ template "fullname" . }}-webhook
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
release: "{{ .Release.Name }}"
releaseRevision: "{{ .Release.Revision }}"
heritage: "{{ .Release.Service }}"
{{ if .Values.webhook.annotations }}
{{- if .Values.webhook.annotations }}
annotations:
{{ toYaml .Values.webhook.annotations | indent 8 }}
{{- end }}
Expand Down Expand Up @@ -87,10 +90,17 @@ spec:
successThreshold: 1
timeoutSeconds: 5
{{- end }}
{{ if .Values.webhook.nodeSelector }}
{{- with .Values.affinity }}
affinity: {{- tpl (toYaml .) $ | nindent 8 }}
{{- end }}
{{- if or .Values.webhook.nodeSelector .Values.nodeSelector }}
nodeSelector:
{{ toYaml .Values.webhook.nodeSelector | indent 8 }}
{{ end }}
{{ toYaml (mustMerge .Values.webhook.nodeSelector .Values.nodeSelector) | indent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{ toYaml . | indent 8 }}
{{- end }}
volumes:
- name: service-catalog-webhook-cert
secret:
Expand Down
13 changes: 11 additions & 2 deletions charts/catalog/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ webhook:
# annotations is a collection of annotations to add to the webhook pods.
annotations: {}
# nodeSelector to apply to the webhook pods
nodeSelector:
nodeSelector: {}
# healthcheck configures the readiness and liveliness probes for the webhook pod.
healthcheck:
enabled: true
Expand Down Expand Up @@ -59,7 +59,7 @@ controllerManager:
# annotations is a collection of annotations to add to the controllerManager pod.
annotations: {}
# nodeSelector to apply to the controllerManager pods
nodeSelector:
nodeSelector: {}
# healthcheck configures the readiness and liveliness probes for the controllerManager pod.
healthcheck:
enabled: true
Expand Down Expand Up @@ -108,6 +108,9 @@ controllerManager:
# Available port in allowable range (e.g. 30000 - 32767 on minikube)
# The TLS-enabled endpoint will be exposed here
securePort: 30444

affinity: {}

# Whether the OriginatingIdentity feature should be enabled
originatingIdentityEnabled: true
# Whether the AsyncBindingOperations alpha feature should be enabled
Expand All @@ -132,7 +135,13 @@ persistence:
##
storageClass:

nodeSelector: {}

podLabels: {}

# Leverage a PriorityClass to ensure your pods survive resource shortages
# ref: https://kubernetes.io/docs/concepts/configuration/pod-priority-preemption/
# PriorityClass: system-cluster-critical
priorityClassName: ""

tolerations: []
16 changes: 15 additions & 1 deletion docs/walkthrough.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,13 @@ Otherwise, to install with sensible defaults, run the following command:

```console
helm repo add minibroker https://minibroker.blob.core.windows.net/charts
```
If you are using Helm v3, run this command:
```console
helm install minibroker minibroker/minibroker --namespace minibroker --create-namespace
```
For older versions of Helm, use the --name option:
```console
helm install --name minibroker --namespace minibroker minibroker/minibroker
```

Expand Down Expand Up @@ -459,7 +466,14 @@ No resources found.

# Step 9 - Final Cleanup

To clean up minibroker deployment, delete the helm release:
To clean up minibroker deployment, delete the helm release.

If you are using Helm v3, run this command:

```console
helm delete minibroker
```
For older versions of Helm, use the --purge option:

```console
helm delete --purge minibroker
Expand Down
5 changes: 4 additions & 1 deletion pkg/controller/controller_instance.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ const (
asyncDeprovisioningReason string = "Deprovisioning"
asyncDeprovisioningMessage string = "The instance is being deprovisioned asynchronously"
serviceBindingsDeletionReason string = "ServiceBindingsDeletion"
serviceBindingsDeletionMessage string = "The instance's service bindings is beaing deleted"
serviceBindingsDeletionMessage string = "The instance's service bindings are being deleted"
provisioningInFlightReason string = "ProvisionRequestInFlight"
provisioningInFlightMessage string = "Provision request for ServiceInstance in-flight to Broker"
instanceUpdatingInFlightReason string = "UpdateInstanceRequestInFlight"
Expand Down Expand Up @@ -3007,6 +3007,9 @@ func (c *controller) triggerServiceBindingReconciliation(instance *v1beta1.Servi
}
klog.V(4).Infof("ServiceBinding %s/%s triggered to reconciliation", binding.Namespace, binding.Name)
toUpdate := binding.DeepCopy()
if toUpdate.Annotations == nil {
toUpdate.Annotations = make(map[string]string, 0)
}
toUpdate.ObjectMeta.Annotations["reconciliationTriggered"] = metav1.Now().String()
if _, err := c.serviceCatalogClient.ServiceBindings(toUpdate.Namespace).Update(context.Background(), toUpdate, metav1.UpdateOptions{}); err != nil {
klog.Errorf("Couldn't update ServiceBinding %q status for instance %q. Bindings will be triggered after set delay. error: %v", binding.Name, binding.Spec.InstanceRef.Name, err)
Expand Down
5 changes: 4 additions & 1 deletion pkg/controller/controller_instance_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -624,6 +624,8 @@ func TestReconcileServiceInstanceWithParameters(t *testing.T) {
sharedInformers.ClusterServiceBrokers().Informer().GetStore().Add(getTestClusterServiceBroker())
sharedInformers.ClusterServiceClasses().Informer().GetStore().Add(getTestClusterServiceClass())
sharedInformers.ClusterServicePlans().Informer().GetStore().Add(getTestClusterServicePlan())
credentials := getTestServiceBinding()
sharedInformers.ServiceBindings().Informer().GetStore().Add(credentials)

for _, s := range tc.secrets {
fakeKubeClient.PrependReactor("get", "secrets", func(action clientgotesting.Action) (bool, runtime.Object, error) {
Expand Down Expand Up @@ -739,7 +741,8 @@ func TestReconcileServiceInstanceWithParameters(t *testing.T) {
})

actions = fakeCatalogClient.Actions()
assertNumberOfActions(t, actions, 1)
assertNumberOfActions(t, actions, 2)
assertUpdate(t, actions[1], credentials)
updatedServiceInstance = assertUpdateStatus(t, actions[0], instance)
assertServiceInstanceOperationSuccessWithParameters(t,
updatedServiceInstance,
Expand Down