Skip to content

Commit

Permalink
hack: add standard application labels
Browse files Browse the repository at this point in the history
This adds standard application labels to the contour deployment file.
It adds the label at file generation.
To edit yaml yq is used (https://github.com/mikefarah/yq).

Fixes projectcontour#1821

Signed-off-by: Tim Gretler gretler.tim@gmail.com
  • Loading branch information
tthebst committed Jul 16, 2020
1 parent d17b4ee commit 04278eb
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions hack/generate-deployment.sh
Expand Up @@ -34,6 +34,10 @@ for y in "${REPO}/examples/contour/"*.yaml ; do
*/02-job-certgen.yaml)
cat "$y"
;;
*/*contour*.yaml)
echo "---"
sed 's/imagePullPolicy: Always/imagePullPolicy: IfNotPresent/g' < "$y" | yq write - metadata.labels[kubernetes.io/version] $1 | yq write - metadata.labels[kubernetes.io/app] $2
;;
*)
sed 's/imagePullPolicy: Always/imagePullPolicy: IfNotPresent/g' < "$y"
;;
Expand Down

0 comments on commit 04278eb

Please sign in to comment.