Skip to content
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

Added automatic provisioning of Kafka when its operator is available #713

Merged
merged 4 commits into from
Oct 23, 2019

Conversation

jpkrohling
Copy link
Contributor

Signed-off-by: Juraci Paixão Kröhling [email protected]

Copy link
Contributor

@objectiser objectiser left a comment

Choose a reason for hiding this comment

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

Partial review - will look at rest soon.

deploy/examples/auto-provision-kafka.yaml Show resolved Hide resolved
image: jaegertracing/jaeger-ingester:latest # TLS configuration is supported starting from 1.15
options:
ingester:
deadlockInterval: 0
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this temporary - although hasn't the new default been merged and therefore in latest?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, tracked here: #717 . Once we have a released version, this is ready to be removed.

@@ -0,0 +1,56 @@
package v1beta1
Copy link
Contributor

Choose a reason for hiding this comment

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

Is it not possible to import this from the strimzi project?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No, they are a Java operator and do not generate Go artifacts.

pkg/autodetect/main_test.go Outdated Show resolved Hide resolved
pkg/cmd/start/main.go Show resolved Hide resolved
Copy link
Contributor

@objectiser objectiser left a comment

Choose a reason for hiding this comment

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

More of the review - still a few files to go :)

pkg/autodetect/main_test.go Outdated Show resolved Hide resolved
pkg/autodetect/main_test.go Outdated Show resolved Hide resolved
pkg/autodetect/main_test.go Outdated Show resolved Hide resolved
pkg/controller/jaeger/kafka_test.go Show resolved Hide resolved
pkg/kafka/streaming.go Outdated Show resolved Hide resolved
"strimzi.io/cluster": jaeger.Name,

// workaround for https://github.com/strimzi/strimzi-kafka-operator/issues/2107
"app.kubernetes.io/managed---by": "jaeger-operator",
Copy link
Contributor

Choose a reason for hiding this comment

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

Just wondering if there will be migration issues when it is fixed? i.e. dealing with existing deployed instances with this modified key?

Copy link
Contributor Author

@jpkrohling jpkrohling Oct 22, 2019

Choose a reason for hiding this comment

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

I'm hoping they will have a new master release by the time we have a 1.15. An alternative is to require Strimzi 0.15.0 and provide instructions on how to use Strimzi from their master while 0.15.0 isn't out.

pkg/strategy/streaming.go Show resolved Hide resolved
jaeger.Annotations = map[string]string{}
}
// mark that we auto provisioned a kafka for this instance
jaeger.Annotations[v1.AnnotationProvisionedKafkaKey] = v1.AnnotationProvisionedKafkaValue
Copy link
Contributor

Choose a reason for hiding this comment

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

I see the purpose here - but if required, then need to change the key so that it is kafka specific. This also implies that the newStreamingStrategy is called multiple times? is it per reconciliation cycle?

Copy link
Contributor

Choose a reason for hiding this comment

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

But then why create new kafka and kafkauser if already provisioned? Sorry possibly lack of understanding of the mechanism.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Perhaps the comment I left for the previous item clarified this already, but if not, let me know.

pkg/strategy/streaming.go Outdated Show resolved Hide resolved
pkg/strategy/streaming.go Outdated Show resolved Hide resolved
{
Name: "volume-a",
MountPath: "/user/path",
}, {
Copy link
Contributor

Choose a reason for hiding this comment

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

Just out of curiosity, what is the reason for replacing two entries?

Copy link
Contributor Author

@jpkrohling jpkrohling Oct 23, 2019

Choose a reason for hiding this comment

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

The volume mounts are quite specific, with the contents being provided by the secret that is created by Strimzi based on the KafkUser resource. The names were quite generic, so, I prefixed the volumes/volume mounts with "kafkauser-". I opened a doc issue, to document that users should avoid creating a volume/volume mount prefixed with "kafkauser-", otherwise it might get overridden by the operator.

pkg/strategy/streaming.go Outdated Show resolved Hide resolved
@jpkrohling jpkrohling force-pushed the 698-AutoProvision-Kafka branch from aa0dc6a to 7b38638 Compare October 23, 2019 08:43
Signed-off-by: Juraci Paixão Kröhling <[email protected]>
@jpkrohling
Copy link
Contributor Author

jpkrohling commented Oct 23, 2019

I think this PR is now ready for another review round. I believe all items were addressed and I did a full manual test using the new example file.

Copy link
Contributor

@objectiser objectiser left a comment

Choose a reason for hiding this comment

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

LGTM - good job!

@objectiser
Copy link
Contributor

@jpkrohling Should an e2e test be added as part of this PR, similar to the self_provisioned_elasticsearch_test.go alongside the elasticsearch_test.go? Or do it in a separate PR?

@jpkrohling
Copy link
Contributor Author

It's part of #714, I understand that @kevinearls will work on it soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants