Peripli / service-broker-proxy-k8s

K8S Specific Implementation for Service Broker Proxy Module
Apache License 2.0
6 stars 13 forks source link

Error during broker creation #107

Closed polskikiel closed 3 years ago

polskikiel commented 4 years ago

service-manager-proxy is using obtained broker_name directly as part of ClusterServiceBroker .metadata.name. This could be error prone, as not all broker_name passes below regex validation

'[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*'

Sample error in log (when broker name has upper case alphanumeric characters):

time="2020-09-23T21:02:45Z" level=error msg="Error during broker creation" broker_guid=5f97481e-8a2a-4f4b-b43b-2d158f230e31 broker_name=it-broker-rt-IAT-2f277b69-db54-49c2-92b9-e48a748a69e3 broker_url="https://it-broker-rt-iat.cfapps.eu20.hana.ondemand.com" component="reconcile/reconcile_brokers.go:210" correlation_id=9b4f1acc-8e84-4c87-9b0b-ee9914f99b01 error="ClusterServiceBroker.servicecatalog.k8s.io \"sm-it-broker-rt-IAT-2f277b69-db54-49c2-92b9-e48a748a69e3-5f97481e-8a2a-4f4b-b43b-2d158f230e31\" is invalid: metadata.name: Invalid value: \"sm-it-broker-rt-IAT-2f277b69-db54-49c2-92b9-e48a748a69e3-5f97481e-8a2a-4f4b-b43b-2d158f230e31\": a DNS-1123 subdomain must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character (e.g. 'example.com', regex used for validation is '[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*')"

we're using the v0.8.4 version of the sb-proxy

evyaffe commented 3 years ago

Fix in #109, see v0.8.10