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

Database names should be DNS Subdomain Names #31

Closed
MarieSaphira opened this issue Apr 9, 2020 · 3 comments · Fixed by #40
Closed

Database names should be DNS Subdomain Names #31

MarieSaphira opened this issue Apr 9, 2020 · 3 comments · Fixed by #40
Assignees

Comments

@MarieSaphira
Copy link
Contributor

Since the names of the databases defined in the ML model are used for service discovery (see here), they have to be valid in Kubernetes. The services in Kubernetes require a name that can be used as a DNS subdomain name (see here), i.e.

  • contain no more than 253 characters
  • contain only lowercase alphanumeric characters, ‘-’ or ‘.’
  • start with an alphanumeric character
  • end with an alphanumeric character

We tried adding

terminal DNS_NAME:
	('a'..'z'|'0'..'9') ('a'..'z'|'A'..'Z'|'0'..'9'|'.'|'-')* ('a'..'z'|'0'..'9')
;

to the grammar but it produces conflicts with ID. Another way would be to put this in validation (e.g. here). What is your opinion? It would be nice to have the same solution in DL and ML.

@MarieSaphira
Copy link
Contributor Author

After discussing with @DavyLandman another possibility is to use the ML-database names for the DL-databases and for the container names all invalid characters get replaced. The API sends both values to QL

            "host": <containerName>,
            "dbName": <databaseName>

right @OrfenCLMS ?

@MarieSaphira MarieSaphira transferred this issue from typhon-project/typhonml Apr 14, 2020
@Bitico
Copy link

Bitico commented May 5, 2020

@MarieSaphira
How important it is that there is a "." In the names of the entities or a "-"? because these are reserved symbols in xtext and (in the first instance) it does not seem possible to insert them in the regex for checking names.
If you can omit them in the entities names, then the other 3 bullet points will be resolved in the next commit.

@MarieSaphira
Copy link
Contributor Author

@Bitico
It is not important at all, since the container names (defined in DL) can be different to the database names (defined in ML). So all invalid characters can be replaced when creating the container names. Nothing has to be changed in ML. Sorry if that wasn't clear enough from my previous post.

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 a pull request may close this issue.

4 participants