From e3e45c7ecdde68180d277134b6e77e35d5f03b0d Mon Sep 17 00:00:00 2001 From: Yusuke Kuoka Date: Fri, 7 Jun 2024 01:08:30 +0000 Subject: [PATCH] fixup! Allow having 2 or more of kanvas.yaml, kanvas.jsonnet, kanvas.template.jsonnet --- driver.go | 6 +++--- kanvas.go | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/driver.go b/driver.go index b170677..3700073 100644 --- a/driver.go +++ b/driver.go @@ -232,10 +232,10 @@ func newDriver(id, dir string, c Component, opts Options) (*Driver, error) { dockerBuildXCheckAvailability, ) - if c.Docker.PushToKind != nil { + if c.Docker.Kind != nil { args := []interface{}{"load", "docker-image"} - if c.Docker.PushToKind.ClusterName != "" { - args = append(args, "--name", c.Docker.PushToKind.ClusterName) + if c.Docker.Kind.ClusterName != "" { + args = append(args, "--name", c.Docker.Kind.ClusterName) } args = append(args, image) kindLoadImageCmd := cmd.New( diff --git a/kanvas.go b/kanvas.go index 403ab5e..57993db 100644 --- a/kanvas.go +++ b/kanvas.go @@ -76,11 +76,11 @@ type Docker struct { ArgsFrom map[string]string `yaml:"argsFrom"` // TagsFrom is a list of tags to be added to the image, derived from the outputs of other components TagsFrom []string `yaml:"tagsFrom"` - // PushToKind configures kanvas's behavior when pushing the image to a local kind cluster + // Kind configures kanvas's behavior when pushing the image to a local kind cluster // An non-nil value means that the image will be pushed to a local kind cluster. // We don't auto-determine the necessity of pushing to kind, so you need to set this explicitly. // This is to give you freedom to push to a remote registry even when you are using kind. - PushToKind *Kind `yaml:"pushToKind,omitempty"` + Kind *Kind `yaml:"kind,omitempty"` } // Kind contains settings for pushing the image to a local kind cluster