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
Copy file name to clipboardExpand all lines: toc/rfc/rfc-draft-service-binding-rotation.md
+14-6Lines changed: 14 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -74,12 +74,20 @@ An application restart or restage as today will be required to activate the new
74
74
75
75
### CF CLI
76
76
77
-
Users can create multiple service credential bindings by invoking the `bind-service` command multiple times. Example:
77
+
Users can create multiple service credential bindings by invoking the `bind-service` command with a `--strategy multiple` option. The default strategy `single` ensures backward compatibility of the `cf bind-service` command.
78
+
79
+
Example:
78
80
```
79
-
cf bind-service myApp myService # initial binding
80
-
cf bind-service myApp myService # additional binding to the same service instance
cf bind-service myApp myService # succeeds with message "App myApp is already bound to service instance myService." No secondary binding is added.
83
+
cf bind-service myApp myService --strategy single # same as previous command, 'single' is the default strategy
84
+
85
+
cf bind-service myApp myService --strategy multiple # adds a secondary binding to the same service instance
86
+
cf bind-service myApp myService --strategy multiple # adds a third binding to the same service instance
81
87
```
82
88
89
+
The exact parameter naming can be finalized at implementation time. A `strategy` parameter allows future extension, e.g. for OSBAPI 2.17 support mention in section "Possible Future Work".
90
+
83
91
`cf unbind-service myApp myService` shall delete all existing service credential bindings for `myApp` to `myService`.
84
92
An additional parameter `cf unbind-service --guid <guid>` should support the deletion of a single service credential binding.
85
93
@@ -89,13 +97,13 @@ The cleanup of old service credential bindings should be supported by a new CF C
The CLI will use the CF API `GET /v3/service_credential_bindings?app_guids=:guid` to list the service instance bindings for an application and should delete all old bindings based on the creation date leaving the newest service bindings. With the `keep-last` parameter, users can keep the x newest bindings per app and service instance. If no service instance name is provided, the CLI should delete the old bindings of all services currently bound to the application.
100
+
The CLI will use the CF API `GET /v3/service_credential_bindings?app_guids=:guid` to list the service instance bindings for an application and should delete all old bindings based on the creation date leaving the newest service bindings. With the `keep-last` parameter, users can keep the x newest bindings per app and service instance. If no service instance name is provided, the CLI should delete the old bindings of all services currently bound to the application.
93
101
It is in the responsibility of the user to invoke `cf cleanup-outdated-service-bindings myApp` only after a successfully restage/restart of the app, i.e. when old service credential bindings are not used anymore by any app container.
94
102
95
103
A full service binding rotation flow with the CF CLI could look like:
0 commit comments