bug(helm) Fix tolerations and affinity mishandling in Helm template #1373
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hello,
This pull request addresses a significant issue found in the Helm template for Dragonfly deployment related to the mishandling of 'tolerations' and 'affinity'.
Problem:
The problem was that the Helm template incorrectly concatenated values within 'tolerations' and 'affinity', which led to erroneous YAML outputs. Specifically, the rendered YAML for the tolerations would incorrectly join the last toleration and 'affinity', as evidenced by the resulting YAML.
Change:
The change primarily involves updating the Helm chart's handling of 'tolerations', 'nodeSelector', and 'affinity' values. The adjustment lies in the removal of the dash (-) in the 'with' statement for each of the three values. The changes are as follows:
With the proposed changes, the issue with the incorrect concatenation of values in 'tolerations' and 'affinity' is resolved. The generated YAML now correctly separates each section, ensuring the successful application of the Helm chart.
I have provided the changes in values for testing:
Here is an example of how the previous code used to parse the values:
Please consider merging this fix as it greatly improves the usability and robustness of the Dragonfly deployment Helm chart.