Skip to content

Commit

Permalink
[v2] enable skafffold delete in kpt v2 deployer
Browse files Browse the repository at this point in the history
Also update v2beta20.
  • Loading branch information
yuwenma committed Aug 9, 2021
1 parent 8544d9a commit f5f9364
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion pkg/skaffold/deploy/v2/kpt/kpt.go
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,9 @@ func (k *Deployer) Cleanup(ctx context.Context, out io.Writer) error {
instrumentation.AddAttributesToCurrentSpanFromContext(ctx, map[string]string{
"DeployerType": deployerName,
})

if err := kptInitFunc(ctx, out, k); err != nil {
return err
}
cmd := exec.CommandContext(ctx, "kpt", k.kptArgs("live", "destroy", k.applyDir)...)
cmd.Stdout = out
cmd.Stderr = out
Expand Down
2 changes: 1 addition & 1 deletion pkg/skaffold/schema/v2beta20/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -1397,7 +1397,7 @@ type ContainerHook struct {
// NamedContainerHook describes a lifecycle hook definition to execute on a named container.
type NamedContainerHook struct {
// ContainerHook describes a lifecycle hook definition to execute on a container.
ContainerHook `yaml:",inline"`
ContainerHook `yaml:",inline" yamltags:"skipTrim"`
// PodName is the name of the pod to execute the command in.
PodName string `yaml:"podName" yamltags:"required"`
// ContainerName is the name of the container to execute the command in.
Expand Down

0 comments on commit f5f9364

Please sign in to comment.