Skip to content

Commit acb52d7

Browse files
authored
Merge pull request #346 from SteeltoeOSS/main-to-v4
Main to v4
2 parents 9aa5752 + 910b4c2 commit acb52d7

File tree

1 file changed

+43
-1
lines changed

1 file changed

+43
-1
lines changed

api/v3/connectors/usage.md

Lines changed: 43 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,4 +98,46 @@ return Host.CreateDefaultBuilder(args)
9898

9999
## Kubernetes
100100

101-
Kubernetes doesn't currently have any built-in tooling or conventions that is quite the same as `VCAP_SERVICES` on Cloud Foundry. As the ecosystem continues to develop, the Steeltoe team will be monitoring the progress of the [Service Catalog](https://kubernetes.io/docs/concepts/extend-kubernetes/service-catalog/) and [Service Bindings](https://github.com/k8s-service-bindings/spec) projects.
101+
While enhanced support will be provided in the next major version of Steeltoe, preliminary support for the [Service Binding Specification for Kubernetes](https://github.com/servicebinding/spec) was [added in the 3.2.2 release](../../../articles/steeltoe-3-2-2-adds-kube-service-bindings.md) with a new `IConfigurationProvider`.
102+
103+
The current version of `Steeltoe.Extensions.Configuration.Kubernetes.ServiceBinding` can read [many types of bindings](https://github.com/SteeltoeOSS/Steeltoe/blob/release/3.2/src/Configuration/src/Kubernetes.ServiceBinding/PostProcessors.cs) into configuration and will transform the bindings for MongoDb, MySQL, PostgreSQL, RabbitMQ and Redis into the formats required to work automatically with Steeltoe Connectors.
104+
105+
In order to use Steeltoe's Service Bindings for Kubernetes, you need to do the following:
106+
107+
1. Add the NuGet package reference to your project.
108+
1. Enable service binding support in configuration.
109+
1. Add the provider to the configuration builder
110+
111+
### Add NuGet Reference
112+
113+
Add a `PackageReference` to `Steeltoe.Extensions.Configuration.Kubernetes.ServiceBinding`.
114+
115+
### Configure Settings
116+
117+
Due to the experimental nature of this feature, bindings must be enabled in the application's configuration before they are applied.
118+
119+
```json
120+
{
121+
"Steeltoe": {
122+
"Kubernetes": {
123+
"Bindings": {
124+
"Enable": true
125+
}
126+
}
127+
}
128+
}
129+
```
130+
131+
### Add Configuration Provider
132+
133+
```csharp
134+
using Steeltoe.Extensions.Configuration.Kubernetes.ServiceBinding;
135+
136+
WebApplicationBuilder builder = WebApplication.CreateBuilder(args);
137+
138+
builder.Configuration.AddKubernetesServiceBindings();
139+
```
140+
141+
### Additional Resources
142+
143+
To see the binding support in action, review the [Steeltoe PostgreSql EF Core Connector sample](https://github.com/SteeltoeOSS/Samples/tree/main/Connectors/src/PostgreSqlEFCore).

0 commit comments

Comments
 (0)