Repository navigation
add selector matchLabels - #7441
Conversation
|
/assign @prydonius |
|
@mostafahussein you need to bump the version in the Chart.yaml and also sign off your commit (https://www.helm.sh/blog/helm-dco/index.html) thanks! |
Signed-off-by: Mostafa Hussein <[email protected]>
444f0ef to
e41b4f0
Compare
|
/ok-to-test |
|
Is |
|
@juan131 I have not tested it on different versions of APIs but the same syntax is already written in other templates in mongodb chart - the replicaSet setup - e.g. mongodb/templates/poddisruptionbudget-primary-rs.yaml, So I think it's already supported but was missed in the standalone deployment. |
|
The main difference on those other templates is that they're using statefulsets instead of deployments. I barely remember that there were some issues with that field on some APIs versions with deployments. However, I can't tell you what version was. |
|
Anyway, I don't want to block you. I tested and it's working on version 1.11 and 1.10 so it's fine to me. |
|
Did that appear on an upgrade of an existing Release? If so, I would suggest NOT adding matchLabels as it will NOT fix your issue. For the record, matchLabels is automatically generated from |
|
I have not updated an existing mongo installation. I was using an old version of the chart for testing purposes then I have deleted mongodb then tried to use a higher version of the chart. I got this issue after adding |
|
To be honest, I just deployed a new mongodb (helm install stable/mongodb) and can't reproduce. Can you describe how to reproduce? |
|
Hello, Same problem here. Thanks for the PR @mostafahussein @desaintmartin try to install an older chart version and then do "helm upgrade" to the latest one. Like this: and check the error Error: UPGRADE FAILED: Deployment.apps "to-delete-mongodb" is invalid: spec.template.metadata.labels: Invalid value: map[string]string{"release":"to-delete", "app":"mongodb", "chart":"mongodb-4.2.2"}: |
|
the upgrade problem is (unfortunately) well known (see my previous comments), but is anyone able to reproduce without upgrade? For the upgrade problem, I would suggest reverting the commit I pointed in an earlier comment. @javsalgar, can you elaborate on this commit or point me to a reference? |
|
In fact I am using rancher which i can only repeat the same steps as i mentioned before, i am not sure if this considered fresh installation for the chart or not but i am sure that i am not deploying it as an upgrade for an existing installation. I will try to deploy |
Signed-off-by: Adnan Abdulhussein <[email protected]>
Signed-off-by: Adnan Abdulhussein <[email protected]>
Signed-off-by: Adnan Abdulhussein <[email protected]>
|
As far as I can tell, this is a fairly recent regression because we accidentally added a mutable label to the Pod Template labels: https://github.com/helm/charts/pull/6895/files. Thanks for the fix @mostafahussein, I made some changes to remove the mutable label. |
|
/lgtm |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: mostafahussein, prydonius The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
Thanks for removing the chart label! |
|
@desaintmartin didn't see you also pointed to the introduction of the issue in #6895, thanks! |
* add selector matchLabels Signed-off-by: Mostafa Hussein <[email protected]> * remove immutable label from selector Signed-off-by: Adnan Abdulhussein <[email protected]> * bump chart version Signed-off-by: Adnan Abdulhussein <[email protected]> Signed-off-by: jenkin-x <[email protected]>
* add selector matchLabels Signed-off-by: Mostafa Hussein <[email protected]> * remove immutable label from selector Signed-off-by: Adnan Abdulhussein <[email protected]> * bump chart version Signed-off-by: Adnan Abdulhussein <[email protected]> Signed-off-by: Jakob Niggel <[email protected]>
What this PR does / why we need it:
This PR fixes the following issue that appeared when I tried to deploy the latest release of mongodb chart 4.2.1