Skip to content
This repository has been archived by the owner on Mar 24, 2023. It is now read-only.

Add logging and better templating to kubectl step #793

Merged
merged 3 commits into from
Jan 10, 2019

Conversation

dexhorthy
Copy link
Member

@dexhorthy dexhorthy commented Jan 10, 2019

What I Did

Add logging and full templating to kubectl step

How I Did it

  • lots of debug logging
  • use a FullBuilder instead of a BaseBuilder so we can access ConfigOptions
  • use the builtPath instead of step.Path
  • handle builder.BuildString() errors
  • refactored out the cmd preparation into a separate method, (in a separate commit )

How to verify it

  • tailf .ship/debug.log
  • Use a ConfigOption in the kubeconfig path template:
 - kubectlApply:
     path: base/
     kubeconfig: '{{repl GoogleGKE (ConfigOption "gcp_cluster_name")}}'

Description for the Changelog

Add logging and full templating to kubectl step

Picture of a Boat (not required but encouraged)

@dexhorthy dexhorthy requested a review from Rob0h January 10, 2019 00:37

return d.awaitMessageConfirmed(ctx, confirmedChan)
}

func (d *DaemonlessKubectl) prepareCmd(release api.Release, step api.KubectlApply) (*exec.Cmd, error) {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Method DaemonlessKubectl.prepareCmd has 6 return statements (exceeds 4 allowed).

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ehhhhh I think I'm okay with this one

@dexhorthy dexhorthy merged commit 6296283 into replicatedhq:master Jan 10, 2019
@dexhorthy dexhorthy deleted the built-kube branch March 13, 2019 14:47
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants