Skip to content

Commit

Permalink
fix: update to new API, remove now improper link commands
Browse files Browse the repository at this point in the history
Fixes #74, #75
  • Loading branch information
metacosm committed Feb 27, 2020
1 parent 67eb0e7 commit bbbc65f
Show file tree
Hide file tree
Showing 10 changed files with 168 additions and 305 deletions.
9 changes: 4 additions & 5 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ require (
github.com/fatih/color v1.7.0
github.com/frankban/quicktest v1.5.0 // indirect
github.com/ghodss/yaml v1.0.0
github.com/googleapis/gnostic v0.3.1 // indirect
github.com/imdario/mergo v0.3.7 // indirect
github.com/mattn/go-colorable v0.1.1
github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b
Expand All @@ -19,10 +18,10 @@ require (
github.com/spf13/pflag v1.0.5
golang.org/x/crypto v0.0.0-20191107222254-f4817d981bb6
gopkg.in/AlecAivazis/survey.v1 v1.8.4
halkyon.io/api v1.0.0-rc.3
k8s.io/api v0.0.0-20190831074750-7364b6bdad65
k8s.io/apimachinery v0.0.0-20190831074630-461753078381
k8s.io/client-go v11.0.1-0.20190409021438-1a26190bd76a+incompatible
halkyon.io/api v1.0.0-rc.4.0.20200207214728-573979f07f11
k8s.io/api v0.0.0-20190918195907-bd6ac527cfd2
k8s.io/apimachinery v0.17.0
k8s.io/client-go v11.0.1-0.20190805182715-88a2adca7e76+incompatible
k8s.io/kubectl v0.0.0-20190831163037-3b58a944563f
)

Expand Down
158 changes: 158 additions & 0 deletions go.sum

Large diffs are not rendered by default.

3 changes: 0 additions & 3 deletions pkg/cmdutil/descriptor.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import (
halkyon "halkyon.io/api"
capability "halkyon.io/api/capability/v1beta1"
component "halkyon.io/api/component/v1beta1"
link "halkyon.io/api/link/v1beta1"
"io/ioutil"
v1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/runtime"
Expand Down Expand Up @@ -57,8 +56,6 @@ func (hd *HalkyonDescriptor) add(object runtime.Object, path string) {
hd.addNewEntity(t, t.Name, path)
case *component.Component:
hd.addNewEntity(t, t.Name, path)
case *link.Link:
hd.addNewEntity(t, t.Name, path)
default:
panic(fmt.Errorf("unknown object %T", t))
}
Expand Down
6 changes: 3 additions & 3 deletions pkg/hal/cli/component/push.go
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ func (o *pushOptions) getComponentBinaryPath() (string, error) {
}

func (o *pushOptions) waitUntilReady(c *component.Component) (*component.Component, error) {
if component.ComponentReady == c.Status.Phase || component.ComponentRunning == c.Status.Phase {
if component.ComponentReady == c.Status.Reason || component.ComponentRunning == c.Status.Reason {
return c, nil
}

Expand All @@ -237,9 +237,9 @@ func (o *pushOptions) waitUntilReady(c *component.Component) (*component.Compone
}

func errorIfFailedOrUnknown(c *component.Component) error {
switch c.Status.Phase {
switch c.Status.Reason {
case component.ComponentFailed, component.ComponentUnknown:
return errors.Errorf("status of component %s is %s: %s", c.Name, c.Status.Phase, c.Status.Message)
return errors.Errorf("status of component %s is %s: %s", c.Name, c.Status.Reason, c.Status.Message)
default:
return nil
}
Expand Down
2 changes: 0 additions & 2 deletions pkg/hal/cli/hal.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import (
"github.com/spf13/cobra"
"halkyon.io/hal/pkg/hal/cli/capability"
"halkyon.io/hal/pkg/hal/cli/component"
"halkyon.io/hal/pkg/hal/cli/link"
"halkyon.io/hal/pkg/hal/cli/version"
ktemplates "k8s.io/kubectl/pkg/util/templates"
)
Expand All @@ -29,7 +28,6 @@ Easily create and manage Kubernetes applications using Dekorate and the Halkyon
hal.AddCommand(
capability.NewCmdCapability(commandName),
component.NewCmdComponent(commandName),
link.NewCmdLink(commandName),
version.NewCmdVersion(commandName),
)

Expand Down
192 changes: 0 additions & 192 deletions pkg/hal/cli/link/create.go

This file was deleted.

16 changes: 0 additions & 16 deletions pkg/hal/cli/link/delete.go

This file was deleted.

44 changes: 0 additions & 44 deletions pkg/hal/cli/link/entity.go

This file was deleted.

32 changes: 0 additions & 32 deletions pkg/hal/cli/link/link.go

This file was deleted.

Loading

0 comments on commit bbbc65f

Please sign in to comment.