-
Notifications
You must be signed in to change notification settings - Fork 47
Add --project-name option to init, add the name to .appsody-config.yaml, and validate it against k8s rules #287
Comments
This needs discussion - @neeraj-laad and @kyle. |
@skoh7645 - we had some discussions around this. We'd like to make the following changes:
@kylegc - feel free to add/edit... @skoh7645 - let us know if questions. Thanks. |
I agree this above is the best approach, I will add our reasoning:
|
sounds good to me. In the default case, would an error be produced if the folder name doesn't match the regex? |
@chilanti In case 2 we would still need to check the project dir against the regex and convert it if necessary? |
@mtamboli we have to make sure the project name starts with an alphabetic char an ends on an alphanumeric char. |
Right - @mtamboli - it's K8S that's really fussy with names.
|
More details on the design:
|
"If not set, default to using the dir name" --> "If not set, default to using the sanitized dir name" Avoid prefix-suffix games. |
We have renamed the template published for nodejs-express from 'skaffold' to 'scaffold' so that it uses proper spelling. This PR updates doc references to match the change. Signed-off-by: Neeraj Laad <neeraj.laad@gmail.com>
Describe the bug
If the name of the appsody directory is not what Kubernetes service likes, pod will not come up during deployment. Directory name for the appsody project is used for the service.
AppsodyApplication or KnativeService create ServiceSpec objects that must conform to RFC-1123 naming
https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.15/
appsody init should check that the name conforms
https://github.com/kubernetes/kubernetes/blob/v1.15.3/staging/src/k8s.io/apimachinery/pkg/util/validation/validation.go
To Reproduce
Steps to reproduce the behavior:
Then the application was used with Kabanero pipeline, application pod did not start.
because of the deployment failure:
Expected behavior
I would expect error to be displayed during
appsody init
if directory name is going to be a problem. If not during appsody init, then definitely during `deploy --generate-only'. Need to catch the error earlier.Environment Details (please complete the following information):
OpenShift 3.1.1
Kabanero release 0.1.2
If applicable please specify:
Screenshots
If applicable, add screenshots to help explain your problem.
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: