fix: Ident podLabels on deployments#3153
Merged
Merged
Conversation
During [this change](https://github.com/open-policy-agent/gatekeeper/pull/2788/files#diff-8418507fa48b71204028eeb671810c5e5c5e999cb23af3bbdceb06bc26bdc92dL39) the indentation was removed from the template but not added to the deployment manifest. Signed-off-by: Joao Pedro Silva <jp.silva15@gmail.com>
|
|
||
| if kind == DeploymentKind { | ||
| obj = strings.Replace(obj, " labels:", " labels:\n{{- include \"gatekeeper.podLabels\" . }}", 1) | ||
| obj = strings.Replace(obj, " labels:", " labels:\n{{- include \"gatekeeper.podLabels\" . | nindent 8 }}", 1) |
There was a problem hiding this comment.
Suggested change
| obj = strings.Replace(obj, " labels:", " labels:\n{{- include \"gatekeeper.podLabels\" . | nindent 8 }}", 1) | |
| obj = strings.Replace(obj, " labels:", " labels:\n {{- include \"gatekeeper.podLabels\" . | nindent 8 }}", 1) |
based on #3145 (comment) isn't this missing here to fix the intendation of the templating var?
Contributor
Author
There was a problem hiding this comment.
The indent is not needed as the function indents the whole block. You can test it on the template.
I believe the space would be removed by the - at the beginning of the template block so it will not change anything.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #3153 +/- ##
==========================================
+ Coverage 53.73% 53.78% +0.04%
==========================================
Files 136 136
Lines 12198 12198
==========================================
+ Hits 6555 6561 +6
+ Misses 5140 5136 -4
+ Partials 503 501 -2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
|
when is this change likely to be included in a release? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What this PR does / why we need it:
During this
change the indentation was removed from the template but not added to the deployment manifest.
Which issue(s) this PR fixes (optional, using
fixes #<issue number>(, fixes #<issue_number>, ...)format, will close the issue(s) when the PR gets merged):Fixes #3145
Special notes for your reviewer: