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

Add compaction, rules, dynamic configurations, nativeSpec #197

Merged
merged 2 commits into from
Jan 23, 2025

Conversation

jmcwilliams-te
Copy link
Contributor

Description

I have a Druid cluster managed with this operator and wanted to change compaction settings, retention rules, dynamic configurations, and define ingestion specs with native kubernetes manifests instead of json to enable further configuration with Infrastructure as Code.

These settings are incorporated into existing Druid and DruidIngestion CRs. Common API logic has been moved into a common module in pkg/ for access across the operator. This includes URL building and Auth logic.

Compaction settings and dynamic configurations are updated based on GET requests to the Druid API rather than storing expected settings in the status section of cluster objects. This ensures settings are properly applied even if the Druid cluster state changes or if the Druid cluster doesn't properly persist the values.

Documentation has been added for the new features mentioned but also for the existing authentication configuration logic.


This PR has:

  • been tested on a real K8S cluster to ensure creation of a brand new Druid cluster works.
  • been tested for backward compatibility on a real K*S cluster by applying the changes introduced here on an existing Druid cluster. If there are any backward incompatible changes then they have been noted in the PR description.
  • added comments explaining the "why" and the intent of the code wherever would not be obvious for an unfamiliar reader.
  • added documentation for new or modified features or behaviors.

Key changed/added files in this PR
  • apis/druid/v1alpha1/druidingestion_types.go
  • controllers/druid/druid_controller.go
  • controllers/druid/dynamic_config.go
  • controllers/ingestion/reconciler.go
  • pkg/druidapi/druidapi.go
  • pkg/util/util.go

@AdheipSingh
Copy link
Contributor

Thank you, this is really great and helpful.

if err != nil {
emitEvent.EmitEventGeneric(
druid,
"GetAuthCredsFailed",
Copy link
Contributor

Choose a reason for hiding this comment

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

where ever emitEventGeneric is called can you use constants.
Refer to https://github.com/datainfrahq/druid-operator/blob/master/controllers/druid/interface.go#L25

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I updated to use new constants. Let me know if it looks good to you. Good callout.

In this same commit I also pinned the version of MinIO being installed in the integration tests. They failed running locally for me and I noticed version 7.0.0 was released < 24h ago https://github.com/minio/operator/releases/tag/v7.0.0

…o use constants, set MinIO version to avoid unexpected breaking upgrades
@AdheipSingh AdheipSingh merged commit bb03624 into datainfrahq:master Jan 23, 2025
1 check passed
TessaIO pushed a commit to TessaIO/druid-operator that referenced this pull request Jan 26, 2025
…, nativeSpec (datainfrahq#197)

* Add compaction, rules, dynamic configurations, nativeSpec

* update strings in EmitEventGeneric() calls within dynamic_config.go to use constants, set MinIO version to avoid unexpected breaking upgrades
TessaIO pushed a commit to TessaIO/druid-operator that referenced this pull request Jan 26, 2025
…, nativeSpec (datainfrahq#197)

* Add compaction, rules, dynamic configurations, nativeSpec

* update strings in EmitEventGeneric() calls within dynamic_config.go to use constants, set MinIO version to avoid unexpected breaking upgrades
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