Skip to content

Commit a8219d9

Browse files
committed
docs: add Jikkou CLI commands, provider sections
1 parent a4a6daf commit a8219d9

32 files changed

Lines changed: 1716 additions & 148 deletions

docs/content/en/docs/Concepts/extensions.md

Lines changed: 0 additions & 24 deletions
This file was deleted.
Lines changed: 146 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,146 @@
1+
---
2+
tags: [ "concept", "feature", "extension" ]
3+
title: "Providers"
4+
linkTitle: "Providers"
5+
weight: 11
6+
---
7+
8+
{{% pageinfo color="info" %}}
9+
**Providers** are pluggable modules that supply Jikkou with extensions and resource definitions for a specific
10+
platform or service (e.g., Apache Kafka, Schema Registry, Aiven).
11+
{{% /pageinfo %}}
12+
13+
## What is a Provider?
14+
15+
A provider is a pluggable module that registers a cohesive set of
16+
extensions (controllers, collectors, transformations, validations, actions, health
17+
indicators) and [resource]({{% relref "./resource" %}}) types into Jikkou at runtime.
18+
19+
Each provider targets a specific platform and is responsible for:
20+
21+
- **Registering extensions** such as controllers, collectors, transformations, validations, and actions.
22+
- **Registering resource types** that describe the API resources it manages.
23+
- **Accepting configuration** specific to its platform (e.g., Kafka bootstrap servers, Schema Registry URL).
24+
25+
## Configuration
26+
27+
Providers are configured in the Jikkou configuration file under the `jikkou.provider` namespace. Each provider entry
28+
has a unique name and includes its type, an `enabled` flag, and a `config` block.
29+
30+
```hocon
31+
jikkou {
32+
provider.kafka {
33+
enabled = true
34+
type = io.streamthoughts.jikkou.kafka.KafkaExtensionProvider
35+
config = {
36+
client {
37+
bootstrap.servers = "localhost:9092"
38+
}
39+
}
40+
}
41+
}
42+
```
43+
44+
### Configuration Properties
45+
46+
| Property | Type | Description |
47+
|-----------|---------|----------------------------------------------------------------------------------|
48+
| `enabled` | Boolean | Whether this provider is active. Defaults to `true`. |
49+
| `type` | String | Fully qualified class name of the provider implementation. |
50+
| `default` | Boolean | Mark this instance as the default for its provider type. Defaults to `false`. |
51+
| `config` | Object | Provider-specific configuration (e.g., connection settings). |
52+
53+
## Multiple Instances
54+
55+
You can configure multiple instances of the same provider type by giving each a unique name. This is useful when you
56+
need to manage resources across different environments (e.g., dev vs. production Kafka clusters) from a single Jikkou
57+
installation.
58+
59+
Use `default = true` to mark one instance as the default for its provider type:
60+
61+
```hocon
62+
jikkou {
63+
provider.kafka-prod {
64+
enabled = true
65+
type = io.streamthoughts.jikkou.kafka.KafkaExtensionProvider
66+
default = true
67+
config = {
68+
client.bootstrap.servers = "kafka-prod:9092"
69+
}
70+
}
71+
provider.kafka-staging {
72+
enabled = true
73+
type = io.streamthoughts.jikkou.kafka.KafkaExtensionProvider
74+
config = {
75+
client.bootstrap.servers = "kafka-staging:9092"
76+
}
77+
}
78+
}
79+
```
80+
81+
Use the `--provider` flag to target a specific provider instance when running commands:
82+
83+
```bash
84+
# Uses the default provider (kafka-prod)
85+
jikkou get kafkatopics
86+
87+
# Explicitly target the staging provider
88+
jikkou get kafkatopics --provider kafka-staging
89+
90+
# Apply resources to staging
91+
jikkou apply -f my-resources.yaml --provider kafka-staging
92+
```
93+
94+
### Provider Resolution
95+
96+
The `--provider` flag is **always optional**. Jikkou resolves the target provider using the following fallback chain:
97+
98+
1. **Single provider of a given type**: It is used automatically — no `--provider` flag needed, no `default` property
99+
needed. If you only have one Kafka provider configured, everything works exactly as before.
100+
2. **Multiple providers, one marked `default = true`**: The default is used when `--provider` is omitted. You only need
101+
the flag when targeting a non-default instance.
102+
3. **Multiple providers, no default**: You **must** specify `--provider` on every command. Omitting it results in an
103+
error: *"No default configuration defined, and multiple configurations found for provider type"*.
104+
105+
{{% alert title="Note" color="info" %}}
106+
Existing single-provider configurations continue to work without any changes. The `default` property and `--provider`
107+
flag only matter once you add a second instance of the same provider type.
108+
{{% /alert %}}
109+
110+
Provider selection works across all commands — `apply`, `create`, `update`, `delete`, `diff`, `validate`, `replace`,
111+
`patch`, `get`, `action`, and `health` — and extends to the REST API server with a `provider` field in reconciliation
112+
request bodies.
113+
114+
## Built-in Providers
115+
116+
Jikkou ships with the following built-in extension providers:
117+
118+
| Provider | Description |
119+
|------------------------------------------------------------------|-----------------------------------------------------------------|
120+
| [Apache Kafka]({{< ref "/docs/providers/kafka" >}}) | Manage Kafka Topics, ACLs, Quotas, and Consumer Groups |
121+
| [Schema Registry]({{< ref "/docs/providers/schema registry" >}}) | Manage Schema Registry subjects and schemas |
122+
| [Kafka Connect]({{< ref "/docs/providers/kafka connect" >}}) | Manage Kafka Connect connectors |
123+
| [Aiven]({{< ref "/docs/providers/aiven" >}}) | Manage Aiven-specific resources (ACLs, Quotas, Schema Registry) |
124+
| [AWS]({{< ref "/docs/providers/aws" >}}) | Manage AWS Glue Schema Registry resources |
125+
| [Core]({{< ref "/docs/providers/core" >}}) | Core resource types (e.g., ConfigMap) |
126+
127+
## Discovering Providers
128+
129+
You can inspect providers and the extensions they contribute using the CLI:
130+
131+
```bash
132+
# List all registered extensions with their provider
133+
jikkou api-extensions list
134+
135+
# List extensions for a specific provider
136+
jikkou api-extensions list --provider kafka
137+
138+
# List API resources and their supported verbs
139+
jikkou api-resources
140+
```
141+
142+
## SEE ALSO
143+
144+
- [Controllers]({{% relref "./controller" %}}) - Extensions that reconcile resources
145+
- [Collectors]({{% relref "./collector" %}}) - Extensions that collect resource state
146+
- [Configuration]({{% relref "../Jikkou CLI/CLI-Configuration" %}}) - How to configure providers via contexts

0 commit comments

Comments
 (0)