Enable the detector
Configure endpoints on thePulsarCoordinator CR:
Configure a projected ServiceAccount token
Upgrade to StreamNative Operator Helm chart 0.20.6 (Operator v0.20.18) and update its CRDs before using this example. This release supports detector-specific resources, ServiceAccounts, volumes, and volume mounts underspec.detector.pod, and preserves custom volumes and mounts alongside broker authentication volumes. See Upgrade StreamNative Operator.
The detector also needs a runtime that supports token-file authentication and reloads the file when it changes. These are separate requirements from the Operator’s Pod configuration support.
The detector packaged in Private Cloud Pulsar 4.2.1.17 still fails with
No token provided when given the JSON file parameter below. Upgrading the Operator to v0.20.18 does not fix that detector runtime. Select a detector image whose token-file behavior you have verified before using this configuration for rotating tokens.system:serviceaccount:<namespace>:pulsar-detector when the OIDC provider uses sub. Configure the permissions required by the detector’s HTTP and messaging checks. See OIDC authentication.
spec.detector.pod takes precedence over the Coordinator’s top-level spec.pod for the detector. When the detector-specific policy is absent, the Operator uses the top-level policy as a fallback. If you omit detector resource settings, the Operator keeps its detector resource defaults.
The Go detector uses authPlugin: token with JSON authParams. This differs from the Java client’s AuthenticationToken plugin and file:///... parameter. Do not copy Java authentication parameters into the detector configuration.
Verify authentication and token rotation
- Inspect the generated detector Deployment. Check its image, ServiceAccount, projected volume, mount path, and authentication arguments. Avoid copying bearer tokens into logs or diagnostics.
- With valid credentials, confirm that both availability gauges become
1and that successful messaging latency samples increase over several detection rounds. - For an isolated test, compare the file parameter with a short-lived literal token from the same identity, using
authParams: '{"token":"<short-lived-token>"}'. The detector expects JSON parameters, so a raw JWT string is not valid here. A literal-token success with file-parameter failure identifies a file-authentication problem; it does not provide a rotating-token solution. - With an image that supports file authentication, replace a test token file atomically with an invalid token and confirm detection failures. Restore a valid token and require the same detector process to resume successful rounds.
- Observe a real Kubernetes projected-token rotation and confirm that detection continues after the token changes. Kubernetes rotates the volume’s contents; a literal token in a process argument does not rotate with that volume.
0.
Metrics
Check the metrics exposed by your deployed detector image. The 4.2.1.17 runtime exposes the following names:
Latency summaries include a
success label and _count and _sum series. Verify successful samples as well as the gauges. Historical dashboards may use shorter SLA metric names; align queries with the names returned by your runtime.