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

Supporting NATS as Datastore #442

Merged

Conversation

thecodeassassin
Copy link
Contributor

@thecodeassassin thecodeassassin commented Apr 19, 2024

This pull request aims to add basic NATS support.

*** NOTE ***

In it's current state, this only adds single-tenant support for NATS as NATS currently does not have an easy programmatic way of managing users via their API.

implements #400

Copy link

netlify bot commented Apr 19, 2024

Deploy Preview for kamaji-documentation canceled.

Name Link
🔨 Latest commit 8b4dc1a
🔍 Latest deploy log https://app.netlify.com/sites/kamaji-documentation/deploys/66265664b7f0550008a85eb8

@prometherion prometherion changed the title Feature/nats integration Supporting NATS as Datastore Apr 19, 2024
@prometherion prometherion added this to the v0.6.0 milestone Apr 19, 2024
Copy link
Member

@prometherion prometherion left a comment

Choose a reason for hiding this comment

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

Let's clean up also the generated files for the NATS kine certs.

.gitignore Show resolved Hide resolved
api/v1alpha1/datastore_types.go Outdated Show resolved Hide resolved
deploy/kind/kind-kamaji.yaml Outdated Show resolved Hide resolved
deploy/kind/kind-kamaji.yaml Outdated Show resolved Hide resolved
@@ -867,6 +867,8 @@ func (d Deployment) buildKine(podSpec *corev1.PodSpec, tcp kamajiv1alpha1.Tenant
args["--endpoint"] = "mysql://$(DB_USER):$(DB_PASSWORD)@tcp($(DB_CONNECTION_STRING))/$(DB_SCHEMA)"
case kamajiv1alpha1.KinePostgreSQLDriver:
args["--endpoint"] = "postgres://$(DB_USER):$(DB_PASSWORD)@$(DB_CONNECTION_STRING)/$(DB_SCHEMA)"
case kamajiv1alpha1.KineNatsDriver:
args["--endpoint"] = "nats://$(DB_USER):$(DB_PASSWORD)@$(DB_CONNECTION_STRING)?bucket=$(DB_SCHEMA)"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

So the problem lies here, these environment variables are currently generated per control plane.

.gitignore Show resolved Hide resolved
@thecodeassassin
Copy link
Contributor Author

Let's clean up also the generated files for the NATS kine certs.

done

deploy/kind/kind-kamaji.yaml Outdated Show resolved Hide resolved
internal/resources/datastore/datastore_storage_config.go Outdated Show resolved Hide resolved
internal/resources/datastore/datastore_storage_config.go Outdated Show resolved Hide resolved
internal/resources/datastore/datastore_storage_config.go Outdated Show resolved Hide resolved
Copy link
Member

@prometherion prometherion left a comment

Choose a reason for hiding this comment

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

CI complains, let's commit changes of make apidoc

@thecodeassassin
Copy link
Contributor Author

CI complains, let's commit changes of make apidoc

Done

@prometherion
Copy link
Member

golangci-lint is complaining about some styling things, it would be perfect if you could address them with make golint

@thecodeassassin
Copy link
Contributor Author

golangci-lint is complaining about some styling things, it would be perfect if you could address them with make golint

fixed

@prometherion prometherion added the enhancement New feature or request label Apr 22, 2024
@prometherion prometherion merged commit 28a098a into clastix:master Apr 22, 2024
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants