This repository has been archived on 2020-03-24. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
quay/deploy/quay-app/lib/quay.libsonnet
2017-07-20 13:50:22 +02:00

16 lines
479 B
Jsonnet

local appr = import 'appr.libsonnet';
{
# Read all files in a directory
# @todo(ant31): replace walk by listdir
load_stack_files(path):: (
if appr.path_exists(path)
then {[appr.path.basename(file)]: appr.readfile(file, encode=true) for file in appr.walkdir(path)}
else {}
),
# Create a patch to add/update annotation with a rand value.
# Use to force a Deployment rolling-update
rand_label():: {metadata+: {annotations+: {'resource.appr/rand': appr.randAlphaNum()}}},
}