Skip to content

Commit c2ba401

Browse files
authored
Merge pull request #88 from zalando-nakadi/document-k8s
Documented how to run the library in a k8s environment.
2 parents d875277 + 55dc3ab commit c2ba401

File tree

1 file changed

+15
-4
lines changed

1 file changed

+15
-4
lines changed

README.md

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -98,16 +98,13 @@ The configuration in the next section is then not needed at all.
9898

9999
#### Letting this library set things up
100100

101-
If you want Nakadi-Producer-Spring-Boot-Starter to configure the connection to Nakadi, you'll need to set some properties
102-
(and/or create beans).
103-
104101
You must tell the library, where it can reach your Nakadi instance:
105102
```yaml
106103
nakadi-producer:
107104
nakadi-base-uri: https://nakadi.example.org
108105
```
109106
110-
Since the communication between your application and Nakadi is secured using OAuth2, you must also provide a OAuth2
107+
Since the communication between your application and Nakadi is secured using OAuth2, you must also provide an OAuth2
111108
token. The easiest way to do so is to include the [Zalando Tokens library](https://github.com/zalando/tokens) into your classpath:
112109
113110
```xml
@@ -124,6 +121,20 @@ nakadi-producer:
124121
access-token-uri: https://token.auth.example.org/oauth2/access_token
125122
```
126123
124+
If your application is running in Zalando's Kubernetes environment, you also have to configure the credential rotation:
125+
```yaml
126+
apiVersion: "zalando.org/v1"
127+
kind: PlatformCredentialsSet
128+
metadata:
129+
name: {{{APPLICATION}}}-credentials
130+
spec:
131+
application: {{{KIO_NAME}}}
132+
token_version: v2
133+
tokens:
134+
nakadi:
135+
privileges: []
136+
```
137+
127138
Since [July 2017](https://github.com/zalando/nakadi/pull/692), Nakadi (at least in the version operated at Zalando) doesn't require any scopes other than the pseudo-scope `uid` for writing events, [the authorization is instead based on event-type configuration using the service's uid](https://nakadi.io/manual.html#using_authorization).
128139

129140
If your Nakadi installation needs real scopes for submitting events, you can provide them via configuration, too (as a comma-separated list):

0 commit comments

Comments
 (0)