-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
[DOC] Update external configuration to include DirectoryConfigProvider #4841
Conversation
Signed-off-by: prmellor <pmellor@redhat.com>
Can one of the admins verify this patch? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is nothing wrong per-se with the changes. I just wonder if readers will really understand the difference.
* `FileConfigProvider` loads configuration values from properties in a file. | ||
* `DirectoryConfigProvider` loads configuration values from separate files within a directory structure. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if this would make it clear to the readers ... should we have an example for both?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@scholzj Yes. We can add examples for both.
Something like this?
Secret:
apiVersion: v1
kind: Secret
metadata:
name: mysecret
labels:
strimzi.io/kind: KafkaUser
strimzi.io/cluster: my-cluster
type: Opaque
data:
ca.crt: # Public key of the client CA
user.crt: # User certificate that contains the public key of the user
user.key: # Private key of the user
user.p12: # PKCS #12 archive file for storing certificates and keys
user.password: # Password for protecting the PKCS #12 archive file
Config for Kafka Connect:
config:
config.providers: directory
config.providers.directory.class: org.apache.kafka.common.config.provider.DirectoryConfigProvider
#...
externalConfiguration:
volumes:
- name: connector-config
secret:
secretName: mysecret
Connector:
kind: KafkaConnector
metadata:
name: my-source-connector
labels:
strimzi.io/cluster: my-connect-cluster
spec:
class: io.debezium.connector.mysql.MySqlConnector
tasksMax: 2
config:
security.protocol: SSL
ssl.truststore.type: PEM
ssl.truststore.location: "${directory:/opt/kafka/external-configuration/connector-config/ca.crt}"
ssl.keystore.type: PEM
ssl.keystore.location: ${directory:/opt/kafka/external-configuration/connector-config/user.key}"
#...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@PaulRMellor your ${directory:...}
should looks like directory:dir:file
, so I think you need to change the last /
to a :
. See the example in https://cwiki.apache.org/confluence/display/KAFKA/KIP-632%3A+Add+DirectoryConfigProvider
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tombentley Thanks Tom
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, that is a nice example.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. I've added the new example, so we have examples for both providers now. I'v shown the connector config for both.
Signed-off-by: prmellor <pmellor@redhat.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A couple of nits, but LGTM.
documentation/api/io.strimzi.api.kafka.model.connect.ExternalConfiguration.adoc
Outdated
Show resolved
Hide resolved
documentation/api/io.strimzi.api.kafka.model.connect.ExternalConfiguration.adoc
Outdated
Show resolved
Hide resolved
Signed-off-by: prmellor <pmellor@redhat.com>
#4841) * [DOC] Update external configuration to include DirectoryConfigProvider Signed-off-by: prmellor <pmellor@redhat.com> * new example, connector configs, and split for provider types Signed-off-by: prmellor <pmellor@redhat.com> * review edits TB Signed-off-by: prmellor <pmellor@redhat.com>
Signed-off-by: prmellor pmellor@redhat.com
Type of change
Documentation
Updates the ExternalConfiguration schema reference section in the Using guide to describe how
DirectoryConfigProvider
can be used instead ofFileConfigProvider
Checklist
Please go through this checklist and make sure all applicable tasks have been done