Skip to content

Commit

Permalink
Added debugging (for resolving #45)
Browse files Browse the repository at this point in the history
  • Loading branch information
Lewis Marshall committed Apr 18, 2018
1 parent aa26e42 commit 0126105
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ func run(c *cli.Context) error {
// Check if all files exist first - fail early on building up a list of files
var files []string
for _, fn := range c.StringSlice("file") {
logDebug.Printf("about to open file:%s\n", fn)
stat, err := os.Stat(fn)
if err != nil {
return err
Expand All @@ -167,6 +168,7 @@ func run(c *cli.Context) error {
// Iterate the list of files and add rendered templates to resources list - fail early.
resources := []*ObjectResource{}
for _, fn := range files {
logDebug.Printf("parsing file:%s\n", fn)
data, err := ioutil.ReadFile(fn)
if err != nil {
return err
Expand Down Expand Up @@ -251,6 +253,7 @@ func splitYamlDocs(data string) []string {
}

func deploy(c *cli.Context, r *ObjectResource) error {
logDebug.Printf("about to deploy resource %s/%s (from file:%q)", r.Kind, r.Name, r.FileName)
args := []string{"apply", "-f", "-"}
cmd, err := newKubeCmd(c, args)
if err != nil {
Expand Down

0 comments on commit 0126105

Please sign in to comment.