Skip to content
This repository has been archived by the owner on Mar 11, 2021. It is now read-only.

Validation for Environment #20

Open
nurali-techie opened this issue Dec 18, 2018 · 5 comments
Open

Validation for Environment #20

nurali-techie opened this issue Dec 18, 2018 · 5 comments
Assignees

Comments

@nurali-techie
Copy link
Contributor

For namespaceName,

  • Create env gets namespaceName in payload, we need to validate if that namespace belongs to chosen cluster using oso.isExists(clusterApiURL, namesapceName)
  • Create env namespaceName is blank, how to auto-generate namespaceName
  • Reuse existing namespaceName only for deploy (test, stage, prod, custom etc.) but definitely not for build, dev

For clusterApiURL,

  • Create env gets clusterApiURL, we need to check with cluster_service.isValid(usertoken, clusterApiURL)
@alexeykazakov
Copy link
Contributor

In the first version we will probably auto-generate namespaces. It will simplify managing namespaces in tenant service. Not sure when we would want to generate them. We could do it during env creation if lazy provisioning is tricky.

@nurali-techie
Copy link
Contributor Author

@alexeykazakov For namespaceName, so it seems that we want to postpone this for now.

@nurali-techie
Copy link
Contributor Author

@alexeykazakov @dipak-pawar For clusterApiURL, when we creating new_env we also get clusterURL in create_payload. We should check that the clusterURL in create_payload is valid cluster_url and the user who is creating new_env has access (or linked) the given cluster_url. Do we have have any API in cluster_service to check the same ??

@dipak-pawar
Copy link

dipak-pawar commented Jan 4, 2019

@nurali-techie, We have GET /user/clusters -H "Authorization: Bearer $USER_TOKEN" which will give all clusters available to user . you can find more details at http://swagger.goa.design/?url=github.com%2Ffabric8-services%2Ffabric8-cluster%2Fdesign#!/user/user_clusters

@MatousJobanek
Copy link
Contributor

Create env gets namespaceName in payload, we need to validate if that namespace belongs to chosen cluster using oso.isExists(clusterApiURL, namesapceName)

That should be easy to do by asking tenant service - there is already such an endpoint: http://swagger.goa.design/?url=github.com%2Ffabric8-services%2Ffabric8-tenant%2Fdesign#!/tenants/tenants_search

Create env namespaceName is blank, how to auto-generate namespaceName

This has to be done in tenant service - to avoid conflicts. There is already a logic that generates the names - it uses information from tenant DB. The tricky thing is that newly the namespaceName can change, for more information see this issue and PR

@xcoulon xcoulon changed the title Validation for Environemnt Validation for Environment Jan 9, 2019
@nurali-techie nurali-techie reopened this Jan 16, 2019
@xcoulon xcoulon modified the milestone: Sprint 161 Jan 16, 2019
@nurali-techie nurali-techie added this to the Sprint 161 milestone Jan 22, 2019
@xcoulon xcoulon modified the milestones: Sprint 161, Sprint 162 Feb 7, 2019
@alexeykazakov alexeykazakov removed this from the Sprint 162 milestone Feb 8, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants