-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add postprocessing filter to keep supporting `driver_daemonset_tolera…
…tions` parameter We can't simply pass the parameter to the `node.tolerations` Helm value, since that value expects an array of regular tolerations while the component parameter is structured to allow users to overwrite tolerations. Note that the postprocessing filter will retain tolerations configured through the Helm value and will simply append any tolerations configured in `driver_daemonset_tolerations`.
- Loading branch information
Showing
4 changed files
with
45 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
local com = import 'lib/commodore.libjsonnet'; | ||
|
||
local inv = com.inventory(); | ||
local params = inv.parameters.csi_cloudscale; | ||
local tolerations = params.driver_daemonset_tolerations; | ||
|
||
local chartDir = std.extVar('output_path'); | ||
|
||
com.fixupDir( | ||
chartDir, | ||
function(obj) | ||
if obj.kind == 'DaemonSet' then | ||
obj { | ||
spec+: { | ||
template+: { | ||
spec+: { | ||
[if std.length(tolerations) > 0 then 'tolerations']+: [ | ||
tolerations[name] { | ||
key: name, | ||
} | ||
for name in std.objectFields(tolerations) | ||
], | ||
}, | ||
}, | ||
}, | ||
} | ||
else | ||
obj | ||
) |
This file contains 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
This file contains 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