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

Multi tenant #79

Merged
merged 12 commits into from
Aug 28, 2017
Merged

Multi tenant #79

merged 12 commits into from
Aug 28, 2017

Conversation

brycekahle
Copy link
Contributor

Fixes #54

- Summary

Add multi-tenant support. Changes config to environment variables only.

- Test plan

Existing tests pass. A few tests/assertions added.

- Description for the changelog

Add multi-tenant support.

@brycekahle brycekahle requested a review from rybit August 23, 2017 22:24
return internalServerError("Database error deleting instance").WithInternalError(err)
}

// TODO do we delete everything associated with an instance too?
Copy link
Member

Choose a reason for hiding this comment

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

file a ticket

Copy link
Contributor

Choose a reason for hiding this comment

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

Let's do hard remove for now. If we want to change it to soft delete later, we can do that all at once.

Copy link
Contributor

Choose a reason for hiding this comment

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

#85

if globalConfig.OperatorToken == "" {
logrus.Fatal("Operator token secret is required")
}
if globalConfig.DB.Namespace != "" {
Copy link
Member

Choose a reason for hiding this comment

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

that isn't required right? The namespace corresponds to the name of the tables, which can be empty. We can use a single set of tables regardless of tenancy

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Did you misread something? This is the code:

if globalConfig.DB.Namespace != "" {
	models.Namespace = globalConfig.DB.Namespace
}

@calavera
Copy link
Contributor

LGTM

@brycekahle brycekahle merged commit 678f6e1 into master Aug 28, 2017
@brycekahle brycekahle deleted the multi-tenant branch August 28, 2017 18:36
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.

None yet

4 participants