Skip to content

[SRVKE-1687] Unify KafkaChannel and KafkaBroker secret format #95471

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 21, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 5 additions & 10 deletions modules/serverless-kafka-broker-sasl-default-config.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -31,17 +31,12 @@ $ oc create secret -n knative-eventing generic <secret_name> \
--from-literal=password="SecretPassword" \
--from-literal=user="my-sasl-user"
----
** Use the key names `ca.crt`, `password`, and `sasl.mechanism`. Do not change them.
** If you want to use SASL with public CA certificates, you must use the `tls.enabled=true` flag, rather than the `ca.crt` argument, when creating the secret. For example:
** Use the key names `protocol`, `sasl.mechanism`, `ca.crt`, `password`, and `user`. Do not change them.
+
[source,terminal]
----
$ oc create secret -n <namespace> generic <kafka_auth_secret> \
--from-literal=tls.enabled=true \
--from-literal=password="SecretPassword" \
--from-literal=saslType="SCRAM-SHA-512" \
--from-literal=user="my-sasl-user"
----
[NOTE]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Kafka is a product name, so you might want to consider creating an attribute for Kafka.

====
The `ca.crt` key is optional if the Kafka cluster uses a certificate signed by a public CA whose certificate is already in the system truststore.
====

. Edit the `KnativeKafka` CR and add a reference to your secret in the `broker` spec:
+
Expand Down
18 changes: 7 additions & 11 deletions modules/serverless-kafka-sasl-channels.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -25,22 +25,18 @@ _Simple Authentication and Security Layer_ (SASL) is used by Apache Kafka for au
[source,terminal]
----
$ oc create secret -n <namespace> generic <kafka_auth_secret> \
--from-literal=protocol="SASL_SSL"
--from-literal=sasl.mechanism="SCRAM-SHA-512" \
--from-file=ca.crt=caroot.pem \
--from-literal=password="SecretPassword" \
--from-literal=saslType="SCRAM-SHA-512" \
--from-literal=user="my-sasl-user"
----
** Use the key names `ca.crt`, `password`, and `sasl.mechanism`. Do not change them.
** If you want to use SASL with public CA certificates, you must use the `tls.enabled=true` flag, rather than the `ca.crt` argument, when creating the secret. For example:
** Use the key names `protocol`, `sasl.mechanism`, `ca.crt`, `password`, and `user`. Do not change them.
+
[source,terminal]
----
$ oc create secret -n <namespace> generic <kafka_auth_secret> \
--from-literal=tls.enabled=true \
--from-literal=password="SecretPassword" \
--from-literal=saslType="SCRAM-SHA-512" \
--from-literal=user="my-sasl-user"
----
[NOTE]
====
The `ca.crt` key is optional if the Kafka cluster uses a certificate signed by a public CA whose certificate is already in the system truststore.
====

. Start editing the `KnativeKafka` custom resource:
+
Expand Down