From b47eb3865fb089149a1ba8164859e7e685bf3f15 Mon Sep 17 00:00:00 2001 From: Mike Lang Date: Sun, 20 Sep 2020 17:15:19 +1000 Subject: [PATCH] Fix segment_coverage -> segment-coverage because _ is illegal in k8s names. However the image name does contain a _ so we replace - with _ when constructing the image name. --- k8s.jsonnet | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/k8s.jsonnet b/k8s.jsonnet index 2c55f32..e91bf3c 100644 --- a/k8s.jsonnet +++ b/k8s.jsonnet @@ -111,7 +111,8 @@ containers: [ { name: name, - image: "quay.io/ekimekim/wubloader-%s:%s" % [name, $.config.image_tag], + // segment-coverage is called segment_coverage in the image, so replace - with _ + image: "quay.io/ekimekim/wubloader-%s:%s" % [std.strReplace(name, "-", "_"), $.config.image_tag], args: args, volumeMounts: [{name: "data", mountPath: "/mnt"}], env: $.env_list + env, // main env list combined with any deployment-specific ones @@ -176,7 +177,7 @@ // Segment coverage is a monitoring helper that periodically scans available segments // and reports stats. It also creates a "coverage map" image to represent this info. // It puts this in the segment directory where nginx will serve it. - $.deployment("segment_coverage", args=$.clean_channels + [ + $.deployment("segment-coverage", args=$.clean_channels + [ "--base-dir", "/mnt", "--qualities", std.join(",", $.config.qualities), "--metrics-port", "80", @@ -193,7 +194,7 @@ $.service("backfiller"), $.service("nginx"), $.service("restreamer"), - $.service("segment_coverage"), + $.service("segment-coverage"), // Ingress to direct requests to the correct services. { kind: "Ingress", @@ -221,7 +222,7 @@ // Map /metrics/NAME to each service (except restreamer) metric_rule("downloader"), metric_rule("backfiller"), - metric_rule("segment_coverage"), + metric_rule("segment-coverage"), // Map /segments and /thrimbletrimmer to the static content nginx rule("nginx", "/segments", "Prefix"), rule("nginx", "/thrimbletrimmer", "Prefix"),