-
Notifications
You must be signed in to change notification settings - Fork 7
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
Add Kafka Credentials to ProviderConfig Secret #19
Merged
jaylevin
merged 2 commits into
crossplane-contrib:main
from
dmvariphy:add-kafka-creds-to-providerconfig-secret
Aug 7, 2024
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,4 +10,5 @@ cover.out | |
|
||
# ignore IDE folders | ||
.vscode/ | ||
.idea/ | ||
.idea/ | ||
kubeconfig |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
apiVersion: confluent.crossplane.io/v1alpha1 | ||
kind: KafkaACL | ||
metadata: | ||
name: kafka-acl-confluent-cloud | ||
spec: | ||
deletionPolicy: Delete | ||
forProvider: | ||
host: '*' | ||
kafkaCluster: | ||
- id: ${data.confluent_kafka_cluster_id} | ||
operation: READ | ||
patternType: PREFIXED | ||
permission: ALLOW | ||
principal: ${data.confluent_principal} | ||
resourceName: test- | ||
resourceType: TOPIC | ||
providerConfigRef: | ||
name: default |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 noticed the confluent terraform docs also have a
kafka_id
field in the provider auth block for single-cluster management option. Did you happen to know anything about that and if it's required or not?ref: https://registry.terraform.io/providers/confluentinc/confluent/latest/docs#static-credentials
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.
That's a good question.
I noticed
kafka_id
on the terraform docs as well, but the specific error I was seeing withKafkaACL
s (and what @drneo-mehdi was seeing withKafkaTopic
s) only indicated that the key and secret were missing:cannot run refresh: refresh failed: error reading Kafka Topic: one of (provider.kafka_api_key, provider.kafka_api_secret), (KAFKA_API_KEY, KAFKA_API_SECRET environment variables) or (resource.credentials.key, resource.credentials.secret) must be set:
That being said, I could try adding a
kafka_id
/kafkaID
field to the ProviderConfig secret just in case I'm missing something. Let me know if you think that's warranted here.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 personally haven't ran into any scenarios where I needed the kafka ID, but my team is only using the multi-cluster authentication method, which is why we never prioritized the other authentication method using kafka_rest_endpoint.
I'd say as long as it works we can get this merged and look into what role kafka_id plays at a later point 👍