[CLOUD-1167] - Remove deploymentConfig label from all templates#334
[CLOUD-1167] - Remove deploymentConfig label from all templates#334spolti wants to merge 1 commit intojboss-openshift:masterfrom
Conversation
amq/amq62-basic.json
Outdated
| ], | ||
| "selector": { | ||
| "deploymentConfig": "${APPLICATION_NAME}-amq" | ||
| "application": "${APPLICATION_NAME}-amq" |
There was a problem hiding this comment.
I think these should just be ${APPLICATION_NAME}, without the -amq. If we want amq in the name, we should change the default.
There was a problem hiding this comment.
@rcernich OK, I kept with "-amq" because it was there already.
I'll update this, test and update this PR.
Thanks.
There was a problem hiding this comment.
Hmm, the "-amq" suffix needs to stay there or an additional label like "component: amq" needs to be added, otherwise there's going to be overlap between different components that are part of the same application (e.g. EAP and mysql in the eap-mysql template).
That said, I believe I filed an issue once saying that we should use a multidimensional label system (multiple labels instead of a single label per resource), as that makes it easier for the ops team to select resources across different dimensions (e.g. all pods belonging to the same application, regardless of component; or selecting all database pods, regardless of application, etc.).
There was a problem hiding this comment.
perhaps, but we use application name for everything, which should prevent two applications from using the same name as the resources can't be instantiated. That said, I'm assuming that we're consistent in how we apply this. A simple test case would be to instantiate one of the eap-amq templates, then instantiate an amq template twice using "eap-app" and "eap-app-amq" for the application name and see what happens. I suspect the deployment configs will fail to be created because they will conflict with what's already running in eap (either the eap deployment or the amq deployment).
I agree that using multiple labels for selectors would be an improvement, but maybe we should save that for 2.0. I think that change might be a bit too much of a change in structure at this point in time.
|
Hey @spolti, it looks like these changes are out of date and can't be merged. Also, we need to address the eap-amq templates (and probably the decision/process server-amq templates too). The label application= identifies the application (i.e. all these resources were created for, say, eap-app). Because of this, we need to use different identifiers for the service selectors, perhaps using multiple labels as @luksa recommended (e.g. application=, component=amq; or application=, component=eap). |
f874c8e to
a30c0ef
Compare
rcernich
left a comment
There was a problem hiding this comment.
There are a number of other templates that need the component label applied, as well as areas where the application label is not consistent across resources created by the template.
amq/amq62-persistent-ssl.json
Outdated
| "name": "${APPLICATION_NAME}-drainer", | ||
| "labels": { | ||
| "application": "${APPLICATION_NAME}" | ||
| "application": "${APPLICATION_NAME}-drainer" |
There was a problem hiding this comment.
@spolti, we need to change this back to just ${APPLICATION_NAME}. The application label is intended to be used to identify all resources created by this template so they can be easily accessed via -l application=xyz.
amq/amq62-persistent.json
Outdated
| "name": "${APPLICATION_NAME}-drainer", | ||
| "labels": { | ||
| "application": "${APPLICATION_NAME}" | ||
| "application": "${APPLICATION_NAME}-drainer" |
There was a problem hiding this comment.
see comment above about application label.
| ], | ||
| "selector": { | ||
| "deploymentConfig": "${APPLICATION_NAME}-mysql" | ||
| "application": "${APPLICATION_NAME}-mysql" |
There was a problem hiding this comment.
We discussed adding a component label for identifying other deployments in the template.
amq/amq62-persistent-ssl.json
Outdated
| "labels": { | ||
| "deploymentConfig": "${APPLICATION_NAME}-drainer", | ||
| "application": "${APPLICATION_NAME}" | ||
| "application": "${APPLICATION_NAME}-drainer" |
There was a problem hiding this comment.
1243241 to
9e430e7
Compare
Signed-off-by: Filippe Spolti <fspolti@redhat.com>
No description provided.