Uplift cli-utils to 1.18.1
Change-Id: Ib1f066f897735387c99a9ee99004ea2284c1a55a
This commit is contained in:
parent
17bf4c77e8
commit
52153fc65d
3
go.mod
3
go.mod
@ -28,7 +28,7 @@ require (
|
||||
k8s.io/kubectl v0.17.4
|
||||
opendev.org/airship/go-redfish v0.0.0-20200318103738-db034d1d753a
|
||||
opendev.org/airship/go-redfish/client v0.0.0-20200318103738-db034d1d753a
|
||||
sigs.k8s.io/cli-utils v0.15.0
|
||||
sigs.k8s.io/cli-utils v0.18.1
|
||||
sigs.k8s.io/cluster-api v0.3.5
|
||||
sigs.k8s.io/controller-runtime v0.5.2
|
||||
sigs.k8s.io/kustomize/api v0.5.1
|
||||
@ -41,4 +41,5 @@ replace (
|
||||
github.com/russross/blackfriday => github.com/russross/blackfriday v1.5.2
|
||||
k8s.io/client-go => k8s.io/client-go v0.0.0-20191114101535-6c5935290e33
|
||||
k8s.io/kubectl => k8s.io/kubectl v0.0.0-20191219154910-1528d4eea6dd
|
||||
sigs.k8s.io/kustomize/kyaml => sigs.k8s.io/kustomize/kyaml v0.4.1
|
||||
)
|
||||
|
6
go.sum
6
go.sum
@ -1527,8 +1527,8 @@ opendev.org/airship/go-redfish/client v0.0.0-20200318103738-db034d1d753a h1:S1dm
|
||||
opendev.org/airship/go-redfish/client v0.0.0-20200318103738-db034d1d753a/go.mod h1:s0hwuUpBsRXOrhN0NR+fNVivXGyWgHKpqtyq7qYjpew=
|
||||
rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8=
|
||||
rsc.io/letsencrypt v0.0.3/go.mod h1:buyQKZ6IXrRnB7TdkHP0RyEybLx18HHyOSoTyoOLqNY=
|
||||
sigs.k8s.io/cli-utils v0.15.0 h1:QiGX8wfBaegKQhejZg2EsqCPYGtyavIpEjNTMdpzUlY=
|
||||
sigs.k8s.io/cli-utils v0.15.0/go.mod h1:H35YA5iJIM7EVNgqDTjX2dgt4wE23zmnXOTSTlyD+PE=
|
||||
sigs.k8s.io/cli-utils v0.18.1 h1:K4usJmMlI98mL+z+TdAnKfzng64/m8bRXZKPwy3ZCWw=
|
||||
sigs.k8s.io/cli-utils v0.18.1/go.mod h1:B7KdqkSkHNIUn3cFbaR4aKUZMKtr+Benboi1w/HW/Fg=
|
||||
sigs.k8s.io/cluster-api v0.3.5 h1:XPCuwrGL73x82a6spCHwkHHeGiQF+L4zntaoDg2qMzo=
|
||||
sigs.k8s.io/cluster-api v0.3.5/go.mod h1:IoP66q4g92I/2f/9hltbE/FWG3RakIwRdYpY+6mqvtE=
|
||||
sigs.k8s.io/controller-runtime v0.4.0/go.mod h1:ApC79lpY3PHW9xj/w9pj+lYkLgwAAUZwfXkME1Lajns=
|
||||
@ -1541,8 +1541,6 @@ sigs.k8s.io/kustomize v2.0.3+incompatible h1:JUufWFNlI44MdtnjUqVnvh29rR37PQFzPbL
|
||||
sigs.k8s.io/kustomize v2.0.3+incompatible/go.mod h1:MkjgH3RdOWrievjo6c9T245dYlB5QeXV4WCbnt/PEpU=
|
||||
sigs.k8s.io/kustomize/api v0.5.1 h1:iHGTs5LcnJGqHstUSxWD/kX6XZgmd82x79LLlZwDU0I=
|
||||
sigs.k8s.io/kustomize/api v0.5.1/go.mod h1:LGqJ9ZWOnWDqlECqrFgNUyEqSJc6ooA9ZiWZ4KFZv+I=
|
||||
sigs.k8s.io/kustomize/kyaml v0.1.4 h1:cDG2u7v6CTAZmWKzCjk0hKG7AIN+2mCHx2ifwPbvKrs=
|
||||
sigs.k8s.io/kustomize/kyaml v0.1.4/go.mod h1:461i94nj0h0ylJ6w83jLkR4SqqVhn1iY6fjD0JSTQeE=
|
||||
sigs.k8s.io/kustomize/kyaml v0.4.1 h1:NEqA/35upoAjb+I5vh1ODUqxoX4DOrezeQa9BhhG5Co=
|
||||
sigs.k8s.io/kustomize/kyaml v0.4.1/go.mod h1:XJL84E6sOFeNrQ7CADiemc1B0EjIxHo3OhW4o1aJYNw=
|
||||
sigs.k8s.io/structured-merge-diff v0.0.0-20190525122527-15d366b2352e/go.mod h1:wWxsB5ozmmv/SG7nM11ayaAW51xMvak/t1r0CSlcokI=
|
||||
|
@ -17,6 +17,8 @@ package events
|
||||
import (
|
||||
"k8s.io/cli-runtime/pkg/genericclioptions"
|
||||
"sigs.k8s.io/cli-utils/cmd/printers"
|
||||
"sigs.k8s.io/cli-utils/pkg/common"
|
||||
|
||||
applyevent "sigs.k8s.io/cli-utils/pkg/apply/event"
|
||||
|
||||
"opendev.org/airship/airshipctl/pkg/log"
|
||||
@ -36,7 +38,7 @@ type DefaultProcessor struct {
|
||||
// NewDefaultProcessor returns instance of DefaultProcessor as interface Implementation
|
||||
func NewDefaultProcessor(streams genericclioptions.IOStreams) EventProcessor {
|
||||
applyCh := make(chan applyevent.Event)
|
||||
go printers.GetPrinter(printers.EventsPrinter, streams).Print(applyCh, false)
|
||||
go printers.GetPrinter(printers.EventsPrinter, streams).Print(applyCh, common.DryRunNone)
|
||||
return &DefaultProcessor{
|
||||
errors: []error{},
|
||||
applierChan: applyCh,
|
||||
|
@ -171,7 +171,7 @@ func cliApplyOptions(ao ApplyOptions) cliapply.Options {
|
||||
EmitStatusEvents: emitStatusEvents,
|
||||
ReconcileTimeout: ao.WaitTimeout,
|
||||
NoPrune: !ao.Prune,
|
||||
DryRun: ao.DryRun,
|
||||
DryRunStrategy: ao.DryRunStrategy,
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -26,6 +26,7 @@ import (
|
||||
"k8s.io/cli-runtime/pkg/genericclioptions"
|
||||
"sigs.k8s.io/cli-utils/pkg/apply/event"
|
||||
"sigs.k8s.io/cli-utils/pkg/apply/poller"
|
||||
"sigs.k8s.io/cli-utils/pkg/common"
|
||||
|
||||
"opendev.org/airship/airshipctl/pkg/document"
|
||||
"opendev.org/airship/airshipctl/pkg/events"
|
||||
@ -123,7 +124,7 @@ func TestApplierRun(t *testing.T) {
|
||||
opts := applier.ApplyOptions{
|
||||
WaitTimeout: time.Second * 5,
|
||||
BundleName: "test-bundle",
|
||||
DryRun: true,
|
||||
DryRunStrategy: common.DryRunClient,
|
||||
}
|
||||
if tt.driver != nil {
|
||||
a.Driver = tt.driver
|
||||
|
@ -15,13 +15,15 @@
|
||||
package applier
|
||||
|
||||
import (
|
||||
"sigs.k8s.io/cli-utils/pkg/common"
|
||||
|
||||
"time"
|
||||
)
|
||||
|
||||
// ApplyOptions struct that hold options for apply operation
|
||||
type ApplyOptions struct {
|
||||
WaitTimeout time.Duration
|
||||
DryRun bool
|
||||
DryRunStrategy common.DryRunStrategy
|
||||
Prune bool
|
||||
BundleName string
|
||||
}
|
||||
|
@ -18,6 +18,8 @@ import (
|
||||
"fmt"
|
||||
"time"
|
||||
|
||||
"sigs.k8s.io/cli-utils/pkg/common"
|
||||
|
||||
"opendev.org/airship/airshipctl/pkg/document"
|
||||
"opendev.org/airship/airshipctl/pkg/environment"
|
||||
"opendev.org/airship/airshipctl/pkg/events"
|
||||
@ -49,10 +51,14 @@ func (o *Options) Initialize() {
|
||||
// Run apply subcommand logic
|
||||
func (o *Options) Run() error {
|
||||
ao := applier.ApplyOptions{
|
||||
DryRun: o.DryRun,
|
||||
DryRunStrategy: common.DryRunNone,
|
||||
Prune: o.Prune,
|
||||
WaitTimeout: o.WaitTimeout,
|
||||
}
|
||||
if o.DryRun {
|
||||
ao.DryRunStrategy = common.DryRunClient
|
||||
}
|
||||
|
||||
globalConf := o.RootSettings.Config
|
||||
|
||||
if err := globalConf.EnsureComplete(); err != nil {
|
||||
|
Loading…
Reference in New Issue
Block a user