Skip to content

Commit 60b1426

Browse files
authored
Merge pull request #8760 from aniruddha2000/ani/capi-book-runtimesdk-doc
📖 Update Runtime Extension CAPI Book
2 parents 3433393 + a0100a7 commit 60b1426

File tree

2 files changed

+29
-0
lines changed

2 files changed

+29
-0
lines changed

docs/book/src/tasks/experimental-features/runtime-sdk/deploy-runtime-extension.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ controllers. The recommended deployment model is to deploy a Runtime Extension i
1515
- Using a Kubernetes Deployment to run the above container inside the Management Cluster.
1616
- Using a Cluster IP Service to make the Runtime Extension instances accessible via a stable DNS name.
1717
- Using a cert-manager generated Certificate to protect the endpoint.
18+
- Register the Runtime Extension using ExtensionConfig.
1819

1920
For an example, please see our [test extension](https://github.com/kubernetes-sigs/cluster-api/tree/main/test/extension)
2021
which follows, as closely as possible, the kubebuilder setup used for controllers in Cluster API.

docs/book/src/tasks/experimental-features/runtime-sdk/implement-extensions.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -291,6 +291,34 @@ controllers processing those resource that might impact system stability.
291291

292292
</aside>
293293

294+
### ExtensionConfig
295+
296+
To register your runtime extension apply the ExtensionConfig resource in the management cluster, including your CA
297+
certs, ClusterIP service associated with the app and namespace, and the target namespace for the given extension. Once
298+
created, the extension will detect the associated service and discover the associated Hooks. For clarification, you can
299+
check the status of the ExtensionConfig. Below is an example of `ExtensionConfig` -
300+
301+
```yaml
302+
apiVersion: runtime.cluster.x-k8s.io/v1alpha1
303+
kind: ExtensionConfig
304+
metadata:
305+
annotations:
306+
runtime.cluster.x-k8s.io/inject-ca-from-secret: default/test-runtime-sdk-svc-cert
307+
name: test-runtime-sdk-extensionconfig
308+
spec:
309+
clientConfig:
310+
service:
311+
name: test-runtime-sdk-svc
312+
namespace: default # Note: this assumes the test extension get deployed in the default namespace
313+
port: 443
314+
namespaceSelector:
315+
matchExpressions:
316+
- key: kubernetes.io/metadata.name
317+
operator: In
318+
values:
319+
- default # Note: this assumes the test extension is used by Cluster in the default namespace only
320+
```
321+
294322
### Settings
295323
296324
Settings can be added to the ExtensionConfig object in the form of a map with string keys and values. These settings are

0 commit comments

Comments
 (0)