-
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.
Make Helm chart cleanup job container image configurable
We `parameters.backup_k8up.images.kubectl` and add a postprocessing filter which patches the cleanup job to use the image location specified in that image parameter.
- Loading branch information
Showing
4 changed files
with
36 additions
and
1 deletion.
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
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,28 @@ | ||
local com = import 'lib/commodore.libjsonnet'; | ||
local kube = import 'lib/kube.libjsonnet'; | ||
|
||
local inv = com.inventory(); | ||
local params = inv.parameters.backup_k8up; | ||
|
||
local chart_output_dir = std.extVar('output_path'); | ||
|
||
local patch_registry(obj) = | ||
if obj.kind == 'Job' then | ||
obj { | ||
spec+: { | ||
template+: { | ||
spec+: { | ||
containers: [ | ||
c { | ||
image: '%(registry)s/%(repository)s:%(tag)s' % params.images.kubectl, | ||
} | ||
for c in super.containers | ||
], | ||
}, | ||
}, | ||
}, | ||
} | ||
else | ||
obj; | ||
|
||
com.fixupDir(chart_output_dir, patch_registry) |
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