You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Allows operators to set the number of allowed service bindings via parameter `max_service_credential_bindings_per_app_service_instance`.
This will be set to 1 in capi-release to not change the current behaviour.
If set to >1 developers can create multiple bindings for the same app and service instance.
This is useful e.g. for rotating the binding credentials without pushing the app again. Restart/restage is sufficient to put the latest binding into the app.
Further details can be found in RFC-0040:
https://github.com/cloudfoundry/community/blob/main/toc/rfc/rfc-0040-service-binding-rotation.md
raiseUnprocessableCreate.new("The binding name is invalid. App binding names must be unique. The app already has a binding with name '#{message.name}'.")
49
-
elsife.message.include?('service_instance_guid and app_guid unique')
50
-
raiseUnprocessableCreate.new('The app is already bound to the service instance.')
raiseUnprocessableCreate.new('No app was specified')
92
117
end
@@ -95,6 +120,27 @@ def not_supported!
95
120
raiseUnimplemented.new('Cannot create credential bindings for managed service instances')
96
121
end
97
122
123
+
defbinding_in_progress!(binding_guid)
124
+
raiseUnprocessableCreate.new("There is already a binding in progress for this service instance and app (binding guid: #{binding_guid})")
125
+
end
126
+
127
+
deftoo_many_bindings!
128
+
raiseUnprocessableCreate.new(
129
+
"The app has too many bindings to this service instance (limit: #{max_bindings_per_app_service_instance}). Consider deleting existing/orphaned bindings."
130
+
)
131
+
end
132
+
133
+
defname_cannot_be_changed!
134
+
raiseUnprocessableCreate.new('The binding name cannot be changed for the same app and service instance')
135
+
end
136
+
137
+
defname_uniqueness_violation!(name)
138
+
msg='The binding name is invalid. Binding names must be unique for a given service instance and app.'
139
+
msg += " The app already has a binding with name '#{name}'."unlessname.nil? || name.empty?
140
+
141
+
raiseUnprocessableCreate.new(msg)
142
+
end
143
+
98
144
defalready_bound!
99
145
raiseUnprocessableCreate.new('The app is already bound to the service instance')
validates_unique%i[app_guidservice_instance_guid],message: Sequel.lit('The app is already bound to the service.')
58
-
validates_unique%i[app_guidname],message: Sequel.lit("The binding name is invalid. App binding names must be unique. The app already has a binding with name '#{name}'.")
raiseIncompatibleBindings.new("Bindings exceed the maximum allowed bytesize of #{MAX_ALLOWED_BYTESIZE}: #{total_bytesize}")iftotal_bytesize > MAX_ALLOWED_BYTESIZE
0 commit comments