-
Notifications
You must be signed in to change notification settings - Fork 301
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
[CLOUD-1167] - Remove deploymentConfig label from all templates #334
base: master
Are you sure you want to change the base?
Conversation
amq/amq62-basic.json
Outdated
@@ -102,13 +102,13 @@ | |||
} | |||
], | |||
"selector": { | |||
"deploymentConfig": "${APPLICATION_NAME}-amq" | |||
"application": "${APPLICATION_NAME}-amq" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
@@ -551,7 +547,7 @@ | |||
"metadata": { | |||
"name": "${APPLICATION_NAME}-drainer", | |||
"labels": { | |||
"application": "${APPLICATION_NAME}" | |||
"application": "${APPLICATION_NAME}-drainer" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@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
@@ -368,7 +364,7 @@ | |||
"metadata": { | |||
"name": "${APPLICATION_NAME}-drainer", | |||
"labels": { | |||
"application": "${APPLICATION_NAME}" | |||
"application": "${APPLICATION_NAME}-drainer" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see comment above about application label.
@@ -377,13 +377,13 @@ | |||
} | |||
], | |||
"selector": { | |||
"deploymentConfig": "${APPLICATION_NAME}-mysql" | |||
"application": "${APPLICATION_NAME}-mysql" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We discussed adding a component
label for identifying other deployments in the template.
amq/amq62-persistent-ssl.json
Outdated
"template": { | ||
"metadata": { | ||
"name": "${APPLICATION_NAME}-drainer", | ||
"labels": { | ||
"deploymentConfig": "${APPLICATION_NAME}-drainer", | ||
"application": "${APPLICATION_NAME}" | ||
"application": "${APPLICATION_NAME}-drainer" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
correct
1243241
to
9e430e7
Compare
Signed-off-by: Filippe Spolti <[email protected]>
No description provided.