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
docs: show how to mount GitHub App private key in Kubernetes
BATON_APP_PRIVATEKEY_PATH was documented without showing how the key
file actually gets onto the container filesystem. Add a Secret +
volume mount example, consistent with the pattern already used in
other connector docs.
# ...or pass the raw PEM contents directly (takes precedence when both are set):
392
392
# BATON_APP_PRIVATEKEY: <Raw PEM contents of the private key for the GitHub app>
393
393
BATON_ORGS: <Name of the single GitHib org the app was created for>
@@ -401,8 +401,21 @@ stringData:
401
401
# Optional: enable for orgs with thousands of repos or members to reduce sync time.
402
402
# See "Optimize sync for large organizations" below for trade-offs.
403
403
BATON_DIRECT_COLLABORATORS_ONLY: true
404
+
405
+
---
406
+
# baton-github-app-key-secret.yaml
407
+
apiVersion: v1
408
+
kind: Secret
409
+
metadata:
410
+
name: baton-github-app-key
411
+
type: Opaque
412
+
stringData:
413
+
private-key.pem: |
414
+
<Contents of the GitHub app's private key (.pem) file>
404
415
```
405
416
417
+
If you're using `BATON_APP_PRIVATEKEY_PATH`, the private key must be mounted into the container as a file rather than passed as an environment variable. The manifest above stores the key in its own Secret so it can be mounted as a volume in the deployment configuration below. Set `BATON_APP_PRIVATEKEY_PATH` to the path where the key will be mounted. If you use `BATON_APP_PRIVATEKEY` instead, the raw PEM contents are passed directly and no volume mount is needed.
418
+
406
419
See the connector's README or run `--help` to see all available configuration flags and environment variables.
407
420
408
421
#### Deployment configuration
@@ -436,8 +449,18 @@ spec:
436
449
envFrom:
437
450
- secretRef:
438
451
name: baton-github-secrets
452
+
volumeMounts:
453
+
- name: github-app-key
454
+
mountPath: /etc/baton-github/keys
455
+
readOnly: true
456
+
volumes:
457
+
- name: github-app-key
458
+
secret:
459
+
secretName: baton-github-app-key
439
460
```
440
461
462
+
The `volumeMounts` and `volumes` entries above are only needed if you're configuring the connector with a GitHub app using `BATON_APP_PRIVATEKEY_PATH`. Omit them if you're using an access token or `BATON_APP_PRIVATEKEY` instead.
0 commit comments