diff --git a/cmd/controller/main.go b/cmd/controller/main.go index eb2b011e021..89ce541f04e 100644 --- a/cmd/controller/main.go +++ b/cmd/controller/main.go @@ -59,7 +59,9 @@ func main() { flag.BoolVar(&opts.ExperimentalDisableResolution, "experimental-disable-in-tree-resolution", false, "Disable resolution of taskrun and pipelinerun refs by the taskrun and pipelinerun reconcilers.") + // This parses flags. cfg := injection.ParseAndGetRESTConfigOrDie() + if err := opts.Images.Validate(); err != nil { log.Fatal(err) } diff --git a/pkg/apis/pipeline/images.go b/pkg/apis/pipeline/images.go index e0c81c9869c..1f4950d4087 100644 --- a/pkg/apis/pipeline/images.go +++ b/pkg/apis/pipeline/images.go @@ -52,15 +52,15 @@ func (i Images) Validate() error { for _, f := range []struct { v, name string }{ - {i.EntrypointImage, "entrypoint"}, - {i.NopImage, "nop"}, - {i.GitImage, "git"}, - {i.KubeconfigWriterImage, "kubeconfig-writer"}, - {i.ShellImage, "shell"}, - {i.ShellImageWin, "windows-shell"}, - {i.GsutilImage, "gsutil"}, - {i.PRImage, "pr"}, - {i.ImageDigestExporterImage, "imagedigest-exporter"}, + {i.EntrypointImage, "entrypoint-image"}, + {i.NopImage, "nop-image"}, + {i.GitImage, "git-image"}, + {i.KubeconfigWriterImage, "kubeconfig-writer-image"}, + {i.ShellImage, "shell-image"}, + {i.ShellImageWin, "shell-image-win"}, + {i.GsutilImage, "gsutil-image"}, + {i.PRImage, "pr-image"}, + {i.ImageDigestExporterImage, "imagedigest-exporter-image"}, } { if f.v == "" { unset = append(unset, f.name) diff --git a/pkg/reconciler/pipelinerun/pipelinerun_test.go b/pkg/reconciler/pipelinerun/pipelinerun_test.go index d11ec5c4c86..7a7c85b2a5f 100644 --- a/pkg/reconciler/pipelinerun/pipelinerun_test.go +++ b/pkg/reconciler/pipelinerun/pipelinerun_test.go @@ -70,7 +70,6 @@ import ( ) var ( - namespace = "" ignoreLastTransitionTime = cmpopts.IgnoreTypes(apis.Condition{}.LastTransitionTime.Inner.Time) images = pipeline.Images{ EntrypointImage: "override-with-entrypoint:latest", diff --git a/pkg/reconciler/taskrun/taskrun_test.go b/pkg/reconciler/taskrun/taskrun_test.go index 4b6bd596f36..cfb42144a2c 100644 --- a/pkg/reconciler/taskrun/taskrun_test.go +++ b/pkg/reconciler/taskrun/taskrun_test.go @@ -76,7 +76,6 @@ const ( ) var ( - namespace = "" // all namespaces defaultActiveDeadlineSeconds = int64(config.DefaultTimeoutMinutes * 60 * 1.5) images = pipeline.Images{ EntrypointImage: "override-with-entrypoint:latest",