Skip to content

Commit

Permalink
move the quay image expiration value to a setting in rickshaw-setting…
Browse files Browse the repository at this point in the history
…s.json

- this allows for the value to be easily changed in a trackable manner
  • Loading branch information
k-rister committed Jun 10, 2024
1 parent b6bc0b3 commit dfbae45
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
10 changes: 9 additions & 1 deletion rickshaw-run
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ my $roadblock_exit_abort_waiting = 6;
my $abort_via_roadblock = 0;
my $workshop_base_cmd;
my $workshop_force_builds;
my $quay_image_expiration;
my $cs_conf_file;
my %cs_conf;

Expand Down Expand Up @@ -1723,6 +1724,13 @@ sub load_settings_info() {
print "load_settings_info(): failed to load workshop force\n";
exit 1;
}

($rc, $quay_image_expiration) = get_json_setting("quay.image-expiration", $jsonsettings);
if ($rc != 0) {
print "load_settings_info(): failed to load quay image-expiration\n";
exit 1;
}

printf "Finished loading json settings\n";
}

Expand Down Expand Up @@ -2835,7 +2843,7 @@ $cs_conf_file = $config_dir . "/cs-conf.json";
},
'config' => {
'entrypoint' => [ "/bin/sh", "-c", "/usr/local/bin/bootstrap" ],
'labels' => [ 'quay.expires-after=2w' ],
'labels' => [ 'quay.expires-after=' . $quay_image_expiration ],
'envs' => [ 'TOOLBOX_HOME=/opt/toolbox' ]
}
);
Expand Down
3 changes: 3 additions & 0 deletions rickshaw-settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,8 @@
},
"workshop": {
"force-builds": "false"
},
"quay": {
"image-expiration": "2w"
}
}

0 comments on commit dfbae45

Please sign in to comment.