Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump Knative/K8s dependencies #1198

Merged
merged 1 commit into from
Oct 7, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 2 additions & 2 deletions docs/cmd/tkn_eventlistener_logs.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ Show EventListener logs
### Examples


Show logs of EventListener pods:
Show logs of EventListener pods:

tkn eventlistener logs eventlistenerName

Show 2 lines of most recent logs from all EventListener pods:
Expand Down
26 changes: 13 additions & 13 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -9,29 +9,29 @@ require (
github.com/cpuguy83/go-md2man v1.0.10
github.com/fatih/color v1.9.0
github.com/ghodss/yaml v1.0.0
github.com/google/go-cmp v0.5.0
github.com/google/go-cmp v0.5.2
github.com/hako/durafmt v0.0.0-20191009132224-3f39dc1ed9f4
github.com/hinshun/vt10x v0.0.0-20180809195222-d55458df857c
github.com/jonboulle/clockwork v0.1.1-0.20190114141812-62fb9bc030d1
github.com/ktr0731/go-fuzzyfinder v0.2.0
github.com/pkg/errors v0.9.1
github.com/spf13/cobra v1.0.0
github.com/spf13/pflag v1.0.5
github.com/tektoncd/pipeline v0.16.3
github.com/tektoncd/pipeline v0.17.1-0.20201007165454-9611f3e4509e
github.com/tektoncd/plumbing v0.0.0-20200430135134-e53521e1d887
github.com/tektoncd/triggers v0.8.2-0.20200918191024-8cef2e8b8c64
github.com/tektoncd/triggers v0.8.2-0.20201007153255-cb1879311818
github.com/tidwall/gjson v1.6.0 // indirect
go.opencensus.io v0.22.4
go.uber.org/multierr v1.5.0
golang.org/x/crypto v0.0.0-20200510223506-06a226fb4e37
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543
golang.org/x/crypto v0.0.0-20200820211705-5c72a883971a
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1
gopkg.in/yaml.v2 v2.3.0
gotest.tools/v3 v3.0.1
k8s.io/api v0.18.2
k8s.io/apimachinery v0.18.2
k8s.io/api v0.18.9
k8s.io/apimachinery v0.19.0
k8s.io/cli-runtime v0.17.6
k8s.io/client-go v11.0.1-0.20190805182717-6502b5e7b1b5+incompatible
knative.dev/pkg v0.0.0-20200702222342-ea4d6e985ba0
knative.dev/pkg v0.0.0-20200922164940-4bf40ad82aab
sigs.k8s.io/yaml v1.2.0
)

Expand All @@ -42,10 +42,10 @@ replace (
github.com/spf13/cobra => github.com/chmouel/cobra v0.0.0-20200107083527-379e7a80af0c
)

// Pin k8s deps to 0.17.6
// Pin k8s deps to 0.18.9
replace (
k8s.io/api => k8s.io/api v0.17.6
k8s.io/apimachinery => k8s.io/apimachinery v0.17.6
k8s.io/cli-runtime => k8s.io/cli-runtime v0.17.6
k8s.io/client-go => k8s.io/client-go v0.17.6
k8s.io/api => k8s.io/api v0.18.9
k8s.io/apimachinery => k8s.io/apimachinery v0.18.9
k8s.io/cli-runtime => k8s.io/cli-runtime v0.18.9
k8s.io/client-go => k8s.io/client-go v0.18.9
)
235 changes: 209 additions & 26 deletions go.sum

Large diffs are not rendered by default.

28 changes: 28 additions & 0 deletions hack/update-deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,34 @@ source $(git rev-parse --show-toplevel)/vendor/github.com/tektoncd/plumbing/scri

cd ${REPO_ROOT_DIR}


VERSION="release-0.18"

# The list of dependencies that we track at HEAD and periodically
# float forward in this repository.
FLOATING_DEPS=(
"knative.dev/pkg@${VERSION}"
"github.com/tektoncd/pipeline@master"
"github.com/tektoncd/triggers@master"
)

# Parse flags to determine any we should pass to dep.
GO_GET=0
while [[ $# -ne 0 ]]; do
parameter=$1
case ${parameter} in
--upgrade) GO_GET=1 ;;
*) abort "unknown option ${parameter}" ;;
esac
shift
done
readonly GO_GET

if (( GO_GET )); then
go get -d ${FLOATING_DEPS[@]}
fi


# Ensure we have everything we need under vendor/
go mod tidy
go mod vendor
Expand Down
2 changes: 1 addition & 1 deletion internal/builder/v1beta1/pipeline.go
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ func PipelineRunResult(name, value string) PipelineRunStatusOp {
}

// PipelineTaskSpec sets the TaskSpec on a PipelineTask.
func PipelineTaskSpec(spec *v1beta1.TaskSpec) PipelineTaskOp {
func PipelineTaskSpec(spec v1beta1.TaskSpec) PipelineTaskOp {
return func(pt *v1beta1.PipelineTask) {
if pt.TaskSpec == nil {
pt.TaskSpec = &v1beta1.EmbeddedTask{}
Expand Down
4 changes: 2 additions & 2 deletions internal/builder/v1beta1/pipeline_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -454,8 +454,8 @@ func TestPipelineRunWithFinalTask(t *testing.T) {
}
}

func getTaskSpec() *v1beta1.TaskSpec {
return &v1beta1.TaskSpec{
func getTaskSpec() v1beta1.TaskSpec {
return v1beta1.TaskSpec{
Steps: []v1beta1.Step{{Container: corev1.Container{
Name: "step",
Image: "myimage",
Expand Down
4 changes: 3 additions & 1 deletion pkg/actions/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
package actions

import (
"context"

"github.com/tektoncd/cli/pkg/cli"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
Expand All @@ -26,7 +28,7 @@ func Create(gr schema.GroupVersionResource, clients *cli.Clients, object *unstru
if err != nil {
return nil, err
}
obj, err := clients.Dynamic.Resource(*gvr).Namespace(ns).Create(object, op)
obj, err := clients.Dynamic.Resource(*gvr).Namespace(ns).Create(context.Background(), object, op)
if err != nil {
return nil, err
}
Expand Down
6 changes: 4 additions & 2 deletions pkg/actions/delete.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,20 @@
package actions

import (
"context"

"github.com/tektoncd/cli/pkg/cli"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime/schema"
)

func Delete(gr schema.GroupVersionResource, clients *cli.Clients, objname, ns string, op *metav1.DeleteOptions) error {
func Delete(gr schema.GroupVersionResource, clients *cli.Clients, objname, ns string, op metav1.DeleteOptions) error {
gvr, err := GetGroupVersionResource(gr, clients.Tekton.Discovery())
if err != nil {
return err
}

err = clients.Dynamic.Resource(*gvr).Namespace(ns).Delete(objname, op)
err = clients.Dynamic.Resource(*gvr).Namespace(ns).Delete(context.Background(), objname, op)
if err != nil {
return err
}
Expand Down
3 changes: 2 additions & 1 deletion pkg/actions/get.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
package actions

import (
"context"
"io"

"github.com/tektoncd/cli/pkg/cli"
Expand Down Expand Up @@ -45,7 +46,7 @@ func Get(gr schema.GroupVersionResource, clients *cli.Clients, objname, ns strin
return nil, err
}

obj, err := clients.Dynamic.Resource(*gvr).Namespace(ns).Get(objname, op)
obj, err := clients.Dynamic.Resource(*gvr).Namespace(ns).Get(context.Background(), objname, op)
if err != nil {
return nil, err
}
Expand Down
3 changes: 2 additions & 1 deletion pkg/actions/list.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
package actions

import (
"context"
"io"

"github.com/tektoncd/cli/pkg/cli"
Expand Down Expand Up @@ -45,7 +46,7 @@ func List(gr schema.GroupVersionResource, clients *cli.Clients, ns string, op me
return nil, err
}

allRes, err := clients.Dynamic.Resource(*gvr).Namespace(ns).List(op)
allRes, err := clients.Dynamic.Resource(*gvr).Namespace(ns).List(context.Background(), op)
if err != nil {
return nil, err
}
Expand Down
4 changes: 3 additions & 1 deletion pkg/actions/patch.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
package actions

import (
"context"

"github.com/tektoncd/cli/pkg/cli"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
Expand All @@ -27,7 +29,7 @@ func Patch(gr schema.GroupVersionResource, clients *cli.Clients, objName string,
if err != nil {
return nil, err
}
patchedObj, err := clients.Dynamic.Resource(*gvr).Namespace(ns).Patch(objName, types.JSONPatchType, data, opt)
patchedObj, err := clients.Dynamic.Resource(*gvr).Namespace(ns).Patch(context.Background(), objName, types.JSONPatchType, data, opt)
if err != nil {
return nil, err
}
Expand Down
4 changes: 3 additions & 1 deletion pkg/actions/watch.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
package actions

import (
"context"

"github.com/tektoncd/cli/pkg/cli"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime/schema"
Expand All @@ -27,7 +29,7 @@ func Watch(gr schema.GroupVersionResource, clients *cli.Clients, ns string, op m
return nil, err
}

watch, err := clients.Dynamic.Resource(*gvr).Namespace(ns).Watch(op)
watch, err := clients.Dynamic.Resource(*gvr).Namespace(ns).Watch(context.Background(), op)
if err != nil {
return nil, err
}
Expand Down
4 changes: 2 additions & 2 deletions pkg/cmd/clustertask/delete.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ func deleteClusterTasks(opts *options.DeleteOptions, s *cli.Stream, p cli.Params
return fmt.Errorf("Failed to create tekton client")
}
d := deleter.New("ClusterTask", func(taskName string) error {
return actions.Delete(ctGroupResource, cs, taskName, "", &metav1.DeleteOptions{})
return actions.Delete(ctGroupResource, cs, taskName, "", metav1.DeleteOptions{})
})
switch {
case opts.DeleteAll:
Expand All @@ -93,7 +93,7 @@ func deleteClusterTasks(opts *options.DeleteOptions, s *cli.Stream, p cli.Params
d.Delete(s, cts)
case opts.DeleteRelated:
d.WithRelated("TaskRun", taskRunLister(cs, p), func(taskRunName string) error {
return actions.Delete(trGroupResource, cs, taskRunName, p.Namespace(), &metav1.DeleteOptions{})
return actions.Delete(trGroupResource, cs, taskRunName, p.Namespace(), metav1.DeleteOptions{})
})
deletedClusterTaskNames := d.Delete(s, ctNames)
d.DeleteRelated(s, deletedClusterTaskNames)
Expand Down
3 changes: 2 additions & 1 deletion pkg/cmd/clustertask/start.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
package clustertask

import (
"context"
"encoding/json"
"errors"
"fmt"
Expand Down Expand Up @@ -484,7 +485,7 @@ func createPipelineResource(resType v1alpha1.PipelineResourceType, askOpt survey
if err != nil {
return nil, err
}
newRes, err := cs.Resource.TektonV1alpha1().PipelineResources(p.Namespace()).Create(&res.PipelineResource)
newRes, err := cs.Resource.TektonV1alpha1().PipelineResources(p.Namespace()).Create(context.Background(), &res.PipelineResource, metav1.CreateOptions{})
if err != nil {
return nil, err
}
Expand Down
5 changes: 3 additions & 2 deletions pkg/cmd/clustertriggerbinding/delete.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
package clustertriggerbinding

import (
"context"
"fmt"

"github.com/spf13/cobra"
Expand Down Expand Up @@ -75,7 +76,7 @@ func deleteClusterTriggerBindings(s *cli.Stream, p cli.Params, ctbNames []string
return fmt.Errorf("failed to create tekton client")
}
d := deleter.New("ClusterTriggerBinding", func(bindingName string) error {
return cs.Triggers.TriggersV1alpha1().ClusterTriggerBindings().Delete(bindingName, &metav1.DeleteOptions{})
return cs.Triggers.TriggersV1alpha1().ClusterTriggerBindings().Delete(context.Background(), bindingName, metav1.DeleteOptions{})
})

if deleteAll {
Expand All @@ -97,7 +98,7 @@ func deleteClusterTriggerBindings(s *cli.Stream, p cli.Params, ctbNames []string
}

func allClusterTriggerBindingNames(p cli.Params, cs *cli.Clients) ([]string, error) {
ctbs, err := cs.Triggers.TriggersV1alpha1().ClusterTriggerBindings().List(metav1.ListOptions{})
ctbs, err := cs.Triggers.TriggersV1alpha1().ClusterTriggerBindings().List(context.Background(), metav1.ListOptions{})
if err != nil {
return nil, err
}
Expand Down
5 changes: 3 additions & 2 deletions pkg/cmd/clustertriggerbinding/describe.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
package clustertriggerbinding

import (
"context"
"fmt"
"io"
"os"
Expand Down Expand Up @@ -97,7 +98,7 @@ func describeClusterTriggerBindingOutput(w io.Writer, p cli.Params, f *cliopts.P
return err
}

ctb, err := cs.Triggers.TriggersV1alpha1().ClusterTriggerBindings().Get(name, metav1.GetOptions{})
ctb, err := cs.Triggers.TriggersV1alpha1().ClusterTriggerBindings().Get(context.Background(), name, metav1.GetOptions{})
if err != nil {
return err
}
Expand All @@ -119,7 +120,7 @@ func printClusterTriggerBindingDescription(s *cli.Stream, p cli.Params, ctbName
return fmt.Errorf("failed to create tekton client")
}

ctb, err := cs.Triggers.TriggersV1alpha1().ClusterTriggerBindings().Get(ctbName, metav1.GetOptions{})
ctb, err := cs.Triggers.TriggersV1alpha1().ClusterTriggerBindings().Get(context.Background(), ctbName, metav1.GetOptions{})
if err != nil {
return fmt.Errorf("failed to get clustertriggerbinding %s: %v", ctbName, err)
}
Expand Down
3 changes: 2 additions & 1 deletion pkg/cmd/clustertriggerbinding/list.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
package clustertriggerbinding

import (
"context"
"errors"
"fmt"
"text/tabwriter"
Expand Down Expand Up @@ -102,7 +103,7 @@ or
}

func list(client versioned.Interface, namespace string) (*v1alpha1.ClusterTriggerBindingList, error) {
tbs, err := client.TriggersV1alpha1().ClusterTriggerBindings().List(metav1.ListOptions{})
tbs, err := client.TriggersV1alpha1().ClusterTriggerBindings().List(context.Background(), metav1.ListOptions{})
if err != nil {
return nil, err
}
Expand Down
5 changes: 3 additions & 2 deletions pkg/cmd/condition/delete.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
package condition

import (
"context"
"fmt"

"github.com/spf13/cobra"
Expand Down Expand Up @@ -74,7 +75,7 @@ func deleteConditions(s *cli.Stream, p cli.Params, condNames []string, deleteAll
return fmt.Errorf("failed to create tekton client")
}
d := deleter.New("Condition", func(conditionName string) error {
return cs.Tekton.TektonV1alpha1().Conditions(p.Namespace()).Delete(conditionName, &metav1.DeleteOptions{})
return cs.Tekton.TektonV1alpha1().Conditions(p.Namespace()).Delete(context.Background(), conditionName, metav1.DeleteOptions{})
})
if deleteAll {
condNames, err = allConditionNames(p, cs)
Expand All @@ -96,7 +97,7 @@ func deleteConditions(s *cli.Stream, p cli.Params, condNames []string, deleteAll
}

func allConditionNames(p cli.Params, cs *cli.Clients) ([]string, error) {
conds, err := cs.Tekton.TektonV1alpha1().Conditions(p.Namespace()).List(metav1.ListOptions{})
conds, err := cs.Tekton.TektonV1alpha1().Conditions(p.Namespace()).List(context.Background(), metav1.ListOptions{})
if err != nil {
return nil, err
}
Expand Down
3 changes: 2 additions & 1 deletion pkg/cmd/condition/describe.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
package condition

import (
"context"
"fmt"
"os"
"text/tabwriter"
Expand Down Expand Up @@ -138,7 +139,7 @@ func getCondition(p cli.Params, name string) (*v1alpha1.Condition, error) {
return nil, fmt.Errorf("failed to create tekton client")
}

condition, err := cs.Tekton.TektonV1alpha1().Conditions(p.Namespace()).Get(name, metav1.GetOptions{})
condition, err := cs.Tekton.TektonV1alpha1().Conditions(p.Namespace()).Get(context.Background(), name, metav1.GetOptions{})
if err != nil {
return nil, fmt.Errorf("failed to find condition %q", name)
}
Expand Down
3 changes: 2 additions & 1 deletion pkg/cmd/condition/list.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
package condition

import (
"context"
"fmt"
"text/tabwriter"

Expand Down Expand Up @@ -116,7 +117,7 @@ func printConditionListObj(s *cli.Stream, p cli.Params, f *cliopts.PrintFlags) e
func listAllConditions(cs versioned.Interface, ns string) (*v1alpha1.ConditionList, error) {
c := cs.TektonV1alpha1().Conditions(ns)

conditions, err := c.List(metav1.ListOptions{})
conditions, err := c.List(context.Background(), metav1.ListOptions{})
if err != nil {
return nil, err
}
Expand Down
Loading