Skip to content

Commit

Permalink
fixup! Allow having 2 or more of kanvas.yaml, kanvas.jsonnet, kanvas.…
Browse files Browse the repository at this point in the history
…template.jsonnet
  • Loading branch information
mumoshu committed Jun 7, 2024
1 parent 6503ef7 commit e3e45c7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions driver.go
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
4 changes: 2 additions & 2 deletions kanvas.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit e3e45c7

Please sign in to comment.