Update naming convention
Subtask of https://gitlab.cern.ch/webservices/webframeworks-planning/issues/1 in preparation for https://gitlab.cern.ch/webservices/webframeworks-planning/issues/2
We need unique values for applicationIdentifier
and DisplayName
We'll need well-defined naming convention to prevent name collisions:
- with other user-defined Application (for anything not running in Openshift)
- between our Openshift clusters
For (1), Paolo agreed to enforce a naming convention in a way that only our operator can use it (see https://gitlab.cern.ch/webservices/webframeworks-planning/issues/2). This means other users won't be able to create Applications in the portal with a name that follows our naming convention.
For (2), a first idea was to use a UID but Paolo remarked that it would be much better to have a meaningful human-readable name.
Here's a new proposal:
-
applicationIdentifier
:webframeworks-<instance>-<sitename>
. sitename must already be unique within a cluster. instance must uniquely identify an instance of the authz operator. E.g. could bewebeos-prod
,webeos-dev
,paas
etc. We may initially re-use the existing "cluster name" defined at Openshift 4 installation, but we may also need to decouple it (e.g. if we move all webeos sites to a new cluster, this might be the same instance but a different cluster name). -
Displayname
:Web frameworks site <sitename> (<instance>)
NB: we (admins) will almost certainly need the flexibility to override the generated values if necessary (typically if we move sites across clusters) without creating inconsistencies. This means the "authoritative" values are always whatever we have in the CR's status
. Only in the case that the operator sees a CR without status.applicationIdentifier
/status.displayName
(e.g. typically when a new CR is created), should the operator generate "default values" based on the above convention and then persist them in the status
. From that moment on, only the values in the status
will be used, regardless of whether they are still consistent with the naming convention or not.