diff --git a/internal/broker/bind_create.go b/internal/broker/bind_create.go index 04938e3504..416f2d8573 100644 --- a/internal/broker/bind_create.go +++ b/internal/broker/bind_create.go @@ -26,6 +26,7 @@ type BindingConfig struct { ExpirationSeconds int `envconfig:"default=600"` MaxExpirationSeconds int `envconfig:"default=7200"` MinExpirationSeconds int `envconfig:"default=600"` + MaxBindingsCount int `envconfig:"default=10"` } type BindEndpoint struct { @@ -114,7 +115,7 @@ func (b *BindEndpoint) Bind(ctx context.Context, instanceID, bindingID string, d bindingCount := len(bindingList) // dont forget expired bindings, talk with WW - if bindingCount >= 10 { + if bindingCount >= b.config.MaxBindingsCount { message := fmt.Sprintf("maximum number of bindings reached: %d", bindingCount) return domain.Binding{}, apiresponses.NewFailureResponse(fmt.Errorf(message), http.StatusBadRequest, message) } diff --git a/resources/keb/templates/deployment.yaml b/resources/keb/templates/deployment.yaml index 4f41b171cc..8ba3e81b7a 100644 --- a/resources/keb/templates/deployment.yaml +++ b/resources/keb/templates/deployment.yaml @@ -92,6 +92,8 @@ spec: value: "{{ .Values.binding.expirationSeconds}}" - name: APP_BROKER_BINDING_MAX_EXPIRATION_SECONDS value: "{{ .Values.binding.maxExpirationSeconds}}" + - name: APP_BROKER_BINDING_MAX_BINDINGS_COUNT + value: "{{ .Values.binding.maxBindingsCount}}" - name: APP_BROKER_ONLY_SINGLE_TRIAL_PER_GA value: "{{ .Values.onlySingleTrialPerGA }}" - name: APP_BROKER_URL diff --git a/resources/keb/values.yaml b/resources/keb/values.yaml index 21b89262dc..03c362e07e 100644 --- a/resources/keb/values.yaml +++ b/resources/keb/values.yaml @@ -251,6 +251,7 @@ binding: maxExpirationSeconds: 7200 # minExpirationSeconds can't be lower than 600 seconds. Forced by Gardener minExpirationSeconds: 600 + maxBindingsCount: 10 service: type: ClusterIP