From 74dbf274d963d730491b64e89c60e9bb6212a9d5 Mon Sep 17 00:00:00 2001 From: Matthew Cary Date: Wed, 10 Jun 2020 01:02:40 +0000 Subject: [PATCH 1/3] update storageos vendor for FilteredDial change --- cluster/images/etcd/migrate/BUILD | 3 -- cmd/kube-proxy/app/BUILD | 20 ------- go.mod | 4 +- go.sum | 4 +- pkg/kubelet/cm/BUILD | 5 -- pkg/kubelet/dockershim/cm/BUILD | 3 -- pkg/kubelet/dockershim/network/kubenet/BUILD | 5 -- pkg/kubelet/oom/BUILD | 3 -- pkg/kubelet/server/stats/BUILD | 4 -- pkg/kubelet/stats/pidlimit/BUILD | 3 -- pkg/proxy/userspace/BUILD | 3 -- pkg/util/ipvs/BUILD | 3 -- pkg/util/resizefs/BUILD | 3 -- pkg/volume/azuredd/BUILD | 3 -- pkg/volume/util/fs/BUILD | 3 -- pkg/volume/util/subpath/BUILD | 4 -- .../k8s.io/apiserver/pkg/server/options/BUILD | 3 -- .../pkg/storage/value/encrypt/envelope/BUILD | 4 -- .../value/encrypt/envelope/testing/BUILD | 8 --- staging/src/k8s.io/kubectl/pkg/util/BUILD | 3 -- .../src/k8s.io/kubectl/pkg/util/term/BUILD | 3 -- test/integration/master/BUILD | 4 -- vendor/github.com/coreos/pkg/capnslog/BUILD | 3 -- .../github.com/docker/docker/pkg/term/BUILD | 3 -- vendor/github.com/miekg/dns/BUILD | 4 -- vendor/github.com/moby/term/BUILD | 3 -- .../onsi/ginkgo/internal/remote/BUILD | 1 - .../runc/libcontainer/cgroups/systemd/BUILD | 3 -- .../runc/libcontainer/system/BUILD | 3 -- .../prometheus/client_golang/prometheus/BUILD | 3 -- vendor/github.com/storageos/go-api/BUILD | 2 + vendor/github.com/storageos/go-api/client.go | 53 +++++++++++++++++++ vendor/github.com/storageos/go-api/cluster.go | 48 +++++++++++++++++ vendor/github.com/storageos/go-api/health.go | 16 ++++++ vendor/github.com/storageos/go-api/licence.go | 43 +++++++++++++++ .../storageos/go-api/netutil/parsers.go | 6 +++ vendor/github.com/storageos/go-api/policy.go | 2 +- vendor/github.com/storageos/go-api/pool.go | 2 +- vendor/github.com/storageos/go-api/rule.go | 2 +- .../github.com/storageos/go-api/types/BUILD | 2 + .../storageos/go-api/types/cluster.go | 10 ++++ .../storageos/go-api/types/health.go | 14 +++++ .../storageos/go-api/types/licence.go | 35 ++++++++++++ vendor/github.com/storageos/go-api/user.go | 3 +- vendor/github.com/vishvananda/netlink/BUILD | 3 -- vendor/go.etcd.io/bbolt/BUILD | 1 - vendor/go.etcd.io/etcd/pkg/logutil/BUILD | 4 -- vendor/golang.org/x/net/internal/socket/BUILD | 6 --- vendor/golang.org/x/net/ipv4/BUILD | 3 -- vendor/golang.org/x/net/ipv6/BUILD | 3 -- vendor/golang.org/x/sys/cpu/BUILD | 3 -- vendor/golang.org/x/sys/unix/BUILD | 35 ------------ vendor/golang.org/x/sys/windows/BUILD | 1 - vendor/golang.org/x/sys/windows/svc/BUILD | 1 - .../grpc/internal/syscall/BUILD | 3 -- vendor/k8s.io/utils/mount/BUILD | 3 -- vendor/k8s.io/utils/nsenter/BUILD | 3 -- vendor/modules.txt | 4 +- 58 files changed, 239 insertions(+), 193 deletions(-) create mode 100644 vendor/github.com/storageos/go-api/cluster.go create mode 100644 vendor/github.com/storageos/go-api/licence.go create mode 100644 vendor/github.com/storageos/go-api/types/cluster.go create mode 100644 vendor/github.com/storageos/go-api/types/licence.go diff --git a/cluster/images/etcd/migrate/BUILD b/cluster/images/etcd/migrate/BUILD index 0163d666f90..71b23d350df 100644 --- a/cluster/images/etcd/migrate/BUILD +++ b/cluster/images/etcd/migrate/BUILD @@ -40,9 +40,6 @@ go_library( "@io_bazel_rules_go//go/platform:freebsd": [ "//vendor/github.com/mrunalp/fileutils:go_default_library", ], - "@io_bazel_rules_go//go/platform:illumos": [ - "//vendor/github.com/mrunalp/fileutils:go_default_library", - ], "@io_bazel_rules_go//go/platform:ios": [ "//vendor/github.com/mrunalp/fileutils:go_default_library", ], diff --git a/cmd/kube-proxy/app/BUILD b/cmd/kube-proxy/app/BUILD index e76382f0986..959212426a3 100644 --- a/cmd/kube-proxy/app/BUILD +++ b/cmd/kube-proxy/app/BUILD @@ -137,18 +137,6 @@ go_library( "//staging/src/k8s.io/component-base/metrics:go_default_library", "//vendor/k8s.io/utils/net:go_default_library", ], - "@io_bazel_rules_go//go/platform:illumos": [ - "//pkg/proxy/metrics:go_default_library", - "//pkg/proxy/util/iptables:go_default_library", - "//pkg/util/node:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/types:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/util/net:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/watch:go_default_library", - "//staging/src/k8s.io/client-go/tools/cache:go_default_library", - "//staging/src/k8s.io/client-go/tools/watch:go_default_library", - "//staging/src/k8s.io/component-base/metrics:go_default_library", - "//vendor/k8s.io/utils/net:go_default_library", - ], "@io_bazel_rules_go//go/platform:ios": [ "//pkg/proxy/metrics:go_default_library", "//pkg/proxy/util/iptables:go_default_library", @@ -315,14 +303,6 @@ go_test( "//staging/src/k8s.io/api/core/v1:go_default_library", "//staging/src/k8s.io/client-go/kubernetes/fake:go_default_library", ], - "@io_bazel_rules_go//go/platform:illumos": [ - "//pkg/proxy/ipvs:go_default_library", - "//pkg/proxy/util/iptables:go_default_library", - "//pkg/util/iptables:go_default_library", - "//pkg/util/iptables/testing:go_default_library", - "//staging/src/k8s.io/api/core/v1:go_default_library", - "//staging/src/k8s.io/client-go/kubernetes/fake:go_default_library", - ], "@io_bazel_rules_go//go/platform:ios": [ "//pkg/proxy/ipvs:go_default_library", "//pkg/proxy/util/iptables:go_default_library", diff --git a/go.mod b/go.mod index 4715ecd6bd0..22be70a6c6e 100644 --- a/go.mod +++ b/go.mod @@ -91,7 +91,7 @@ require ( github.com/spf13/jwalterweatherman v1.1.0 // indirect github.com/spf13/pflag v1.0.5 github.com/spf13/viper v1.4.0 - github.com/storageos/go-api v0.0.0-20180912212459-343b3eff91fc + github.com/storageos/go-api v2.2.0+incompatible github.com/stretchr/testify v1.4.0 github.com/thecodeteam/goscaleio v0.1.0 github.com/urfave/negroni v1.0.0 // indirect @@ -397,7 +397,7 @@ replace ( github.com/spf13/jwalterweatherman => github.com/spf13/jwalterweatherman v1.1.0 github.com/spf13/pflag => github.com/spf13/pflag v1.0.5 github.com/spf13/viper => github.com/spf13/viper v1.4.0 - github.com/storageos/go-api => github.com/storageos/go-api v0.0.0-20180912212459-343b3eff91fc + github.com/storageos/go-api => github.com/storageos/go-api v2.2.0+incompatible github.com/stretchr/objx => github.com/stretchr/objx v0.2.0 github.com/stretchr/testify => github.com/stretchr/testify v1.4.0 github.com/syndtr/gocapability => github.com/syndtr/gocapability v0.0.0-20180916011248-d98352740cb2 diff --git a/go.sum b/go.sum index 917bb9de442..cc3b95fac32 100644 --- a/go.sum +++ b/go.sum @@ -436,8 +436,8 @@ github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/spf13/viper v1.4.0 h1:yXHLWeravcrgGyFSyCgdYpXQ9dR9c/WED3pg1RhxqEU= github.com/spf13/viper v1.4.0/go.mod h1:PTJ7Z/lr49W6bUbkmS1V3by4uWynFiR9p7+dSq/yZzE= -github.com/storageos/go-api v0.0.0-20180912212459-343b3eff91fc h1:n+WYaU0kQ6WIiuEyWSgbXqkBx16irO69kYCtwVYoO5s= -github.com/storageos/go-api v0.0.0-20180912212459-343b3eff91fc/go.mod h1:ZrLn+e0ZuF3Y65PNF6dIwbJPZqfmtCXxFm9ckv0agOY= +github.com/storageos/go-api v2.2.0+incompatible h1:U0SablXoZIg06gvSlg8BCdzq1C/SkHVygOVX95Z2MU0= +github.com/storageos/go-api v2.2.0+incompatible/go.mod h1:ZrLn+e0ZuF3Y65PNF6dIwbJPZqfmtCXxFm9ckv0agOY= github.com/stretchr/objx v0.2.0 h1:Hbg2NidpLE8veEBkEZTL3CvlkUIVzuU9jDplZO54c48= github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk= diff --git a/pkg/kubelet/cm/BUILD b/pkg/kubelet/cm/BUILD index cb04702db5f..a9216442f49 100644 --- a/pkg/kubelet/cm/BUILD +++ b/pkg/kubelet/cm/BUILD @@ -96,11 +96,6 @@ go_library( "//staging/src/k8s.io/client-go/tools/record:go_default_library", "//vendor/k8s.io/utils/mount:go_default_library", ], - "@io_bazel_rules_go//go/platform:illumos": [ - "//pkg/kubelet/cadvisor:go_default_library", - "//staging/src/k8s.io/client-go/tools/record:go_default_library", - "//vendor/k8s.io/utils/mount:go_default_library", - ], "@io_bazel_rules_go//go/platform:ios": [ "//pkg/kubelet/cadvisor:go_default_library", "//staging/src/k8s.io/client-go/tools/record:go_default_library", diff --git a/pkg/kubelet/dockershim/cm/BUILD b/pkg/kubelet/dockershim/cm/BUILD index 88028832095..6978f08c33d 100644 --- a/pkg/kubelet/dockershim/cm/BUILD +++ b/pkg/kubelet/dockershim/cm/BUILD @@ -37,9 +37,6 @@ go_library( "@io_bazel_rules_go//go/platform:freebsd": [ "//pkg/kubelet/dockershim/libdocker:go_default_library", ], - "@io_bazel_rules_go//go/platform:illumos": [ - "//pkg/kubelet/dockershim/libdocker:go_default_library", - ], "@io_bazel_rules_go//go/platform:ios": [ "//pkg/kubelet/dockershim/libdocker:go_default_library", ], diff --git a/pkg/kubelet/dockershim/network/kubenet/BUILD b/pkg/kubelet/dockershim/network/kubenet/BUILD index e6c1aa4d99e..30c4a004cb5 100644 --- a/pkg/kubelet/dockershim/network/kubenet/BUILD +++ b/pkg/kubelet/dockershim/network/kubenet/BUILD @@ -58,11 +58,6 @@ go_library( "//pkg/kubelet/container:go_default_library", "//pkg/kubelet/dockershim/network:go_default_library", ], - "@io_bazel_rules_go//go/platform:illumos": [ - "//pkg/kubelet/apis/config:go_default_library", - "//pkg/kubelet/container:go_default_library", - "//pkg/kubelet/dockershim/network:go_default_library", - ], "@io_bazel_rules_go//go/platform:ios": [ "//pkg/kubelet/apis/config:go_default_library", "//pkg/kubelet/container:go_default_library", diff --git a/pkg/kubelet/oom/BUILD b/pkg/kubelet/oom/BUILD index e38b2f80a37..f0f33285c40 100644 --- a/pkg/kubelet/oom/BUILD +++ b/pkg/kubelet/oom/BUILD @@ -30,9 +30,6 @@ go_library( "@io_bazel_rules_go//go/platform:freebsd": [ "//staging/src/k8s.io/client-go/tools/record:go_default_library", ], - "@io_bazel_rules_go//go/platform:illumos": [ - "//staging/src/k8s.io/client-go/tools/record:go_default_library", - ], "@io_bazel_rules_go//go/platform:ios": [ "//staging/src/k8s.io/client-go/tools/record:go_default_library", ], diff --git a/pkg/kubelet/server/stats/BUILD b/pkg/kubelet/server/stats/BUILD index 71ebd5b0136..a69ea4d1629 100644 --- a/pkg/kubelet/server/stats/BUILD +++ b/pkg/kubelet/server/stats/BUILD @@ -70,10 +70,6 @@ go_test( "//pkg/kubelet/cm:go_default_library", "//vendor/github.com/google/gofuzz:go_default_library", ], - "@io_bazel_rules_go//go/platform:illumos": [ - "//pkg/kubelet/cm:go_default_library", - "//vendor/github.com/google/gofuzz:go_default_library", - ], "@io_bazel_rules_go//go/platform:ios": [ "//pkg/kubelet/cm:go_default_library", "//vendor/github.com/google/gofuzz:go_default_library", diff --git a/pkg/kubelet/stats/pidlimit/BUILD b/pkg/kubelet/stats/pidlimit/BUILD index 5317dfd86db..01d3960bc89 100644 --- a/pkg/kubelet/stats/pidlimit/BUILD +++ b/pkg/kubelet/stats/pidlimit/BUILD @@ -28,9 +28,6 @@ go_library( "@io_bazel_rules_go//go/platform:freebsd": [ "//pkg/kubelet/apis/stats/v1alpha1:go_default_library", ], - "@io_bazel_rules_go//go/platform:illumos": [ - "//pkg/kubelet/apis/stats/v1alpha1:go_default_library", - ], "@io_bazel_rules_go//go/platform:ios": [ "//pkg/kubelet/apis/stats/v1alpha1:go_default_library", ], diff --git a/pkg/proxy/userspace/BUILD b/pkg/proxy/userspace/BUILD index 472830df4af..8a999b719cd 100644 --- a/pkg/proxy/userspace/BUILD +++ b/pkg/proxy/userspace/BUILD @@ -53,9 +53,6 @@ go_library( "@io_bazel_rules_go//go/platform:freebsd": [ "//vendor/golang.org/x/sys/unix:go_default_library", ], - "@io_bazel_rules_go//go/platform:illumos": [ - "//vendor/golang.org/x/sys/unix:go_default_library", - ], "@io_bazel_rules_go//go/platform:ios": [ "//vendor/golang.org/x/sys/unix:go_default_library", ], diff --git a/pkg/util/ipvs/BUILD b/pkg/util/ipvs/BUILD index ddc7c45e917..87bae3a6a5e 100644 --- a/pkg/util/ipvs/BUILD +++ b/pkg/util/ipvs/BUILD @@ -56,9 +56,6 @@ go_library( "@io_bazel_rules_go//go/platform:freebsd": [ "//vendor/k8s.io/utils/exec:go_default_library", ], - "@io_bazel_rules_go//go/platform:illumos": [ - "//vendor/k8s.io/utils/exec:go_default_library", - ], "@io_bazel_rules_go//go/platform:ios": [ "//vendor/k8s.io/utils/exec:go_default_library", ], diff --git a/pkg/util/resizefs/BUILD b/pkg/util/resizefs/BUILD index 7578dd40b83..1205cf7de55 100644 --- a/pkg/util/resizefs/BUILD +++ b/pkg/util/resizefs/BUILD @@ -25,9 +25,6 @@ go_library( "@io_bazel_rules_go//go/platform:freebsd": [ "//vendor/k8s.io/utils/mount:go_default_library", ], - "@io_bazel_rules_go//go/platform:illumos": [ - "//vendor/k8s.io/utils/mount:go_default_library", - ], "@io_bazel_rules_go//go/platform:ios": [ "//vendor/k8s.io/utils/mount:go_default_library", ], diff --git a/pkg/volume/azuredd/BUILD b/pkg/volume/azuredd/BUILD index 992dd3be784..a4770647be7 100644 --- a/pkg/volume/azuredd/BUILD +++ b/pkg/volume/azuredd/BUILD @@ -57,9 +57,6 @@ go_library( "@io_bazel_rules_go//go/platform:freebsd": [ "//vendor/k8s.io/utils/exec:go_default_library", ], - "@io_bazel_rules_go//go/platform:illumos": [ - "//vendor/k8s.io/utils/exec:go_default_library", - ], "@io_bazel_rules_go//go/platform:ios": [ "//vendor/k8s.io/utils/exec:go_default_library", ], diff --git a/pkg/volume/util/fs/BUILD b/pkg/volume/util/fs/BUILD index b51ee597b53..73e0f9ee076 100644 --- a/pkg/volume/util/fs/BUILD +++ b/pkg/volume/util/fs/BUILD @@ -29,9 +29,6 @@ go_library( "@io_bazel_rules_go//go/platform:freebsd": [ "//staging/src/k8s.io/apimachinery/pkg/api/resource:go_default_library", ], - "@io_bazel_rules_go//go/platform:illumos": [ - "//staging/src/k8s.io/apimachinery/pkg/api/resource:go_default_library", - ], "@io_bazel_rules_go//go/platform:ios": [ "//pkg/volume/util/fsquota:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/api/resource:go_default_library", diff --git a/pkg/volume/util/subpath/BUILD b/pkg/volume/util/subpath/BUILD index ff6b29374e0..e2b34903f95 100644 --- a/pkg/volume/util/subpath/BUILD +++ b/pkg/volume/util/subpath/BUILD @@ -33,10 +33,6 @@ go_library( "//vendor/k8s.io/utils/mount:go_default_library", "//vendor/k8s.io/utils/nsenter:go_default_library", ], - "@io_bazel_rules_go//go/platform:illumos": [ - "//vendor/k8s.io/utils/mount:go_default_library", - "//vendor/k8s.io/utils/nsenter:go_default_library", - ], "@io_bazel_rules_go//go/platform:ios": [ "//vendor/k8s.io/utils/mount:go_default_library", "//vendor/k8s.io/utils/nsenter:go_default_library", diff --git a/staging/src/k8s.io/apiserver/pkg/server/options/BUILD b/staging/src/k8s.io/apiserver/pkg/server/options/BUILD index 84a507fe444..019cfa366ff 100644 --- a/staging/src/k8s.io/apiserver/pkg/server/options/BUILD +++ b/staging/src/k8s.io/apiserver/pkg/server/options/BUILD @@ -103,9 +103,6 @@ go_library( "@io_bazel_rules_go//go/platform:freebsd": [ "//vendor/golang.org/x/sys/unix:go_default_library", ], - "@io_bazel_rules_go//go/platform:illumos": [ - "//vendor/golang.org/x/sys/unix:go_default_library", - ], "@io_bazel_rules_go//go/platform:ios": [ "//vendor/golang.org/x/sys/unix:go_default_library", ], diff --git a/staging/src/k8s.io/apiserver/pkg/storage/value/encrypt/envelope/BUILD b/staging/src/k8s.io/apiserver/pkg/storage/value/encrypt/envelope/BUILD index a2307920c08..7661984ba9b 100644 --- a/staging/src/k8s.io/apiserver/pkg/storage/value/encrypt/envelope/BUILD +++ b/staging/src/k8s.io/apiserver/pkg/storage/value/encrypt/envelope/BUILD @@ -58,10 +58,6 @@ go_test( "//staging/src/k8s.io/apimachinery/pkg/util/uuid:go_default_library", "//staging/src/k8s.io/apiserver/pkg/storage/value/encrypt/envelope/testing:go_default_library", ], - "@io_bazel_rules_go//go/platform:illumos": [ - "//staging/src/k8s.io/apimachinery/pkg/util/uuid:go_default_library", - "//staging/src/k8s.io/apiserver/pkg/storage/value/encrypt/envelope/testing:go_default_library", - ], "@io_bazel_rules_go//go/platform:ios": [ "//staging/src/k8s.io/apimachinery/pkg/util/uuid:go_default_library", "//staging/src/k8s.io/apiserver/pkg/storage/value/encrypt/envelope/testing:go_default_library", diff --git a/staging/src/k8s.io/apiserver/pkg/storage/value/encrypt/envelope/testing/BUILD b/staging/src/k8s.io/apiserver/pkg/storage/value/encrypt/envelope/testing/BUILD index 1b7c320e83d..8d026b7c132 100644 --- a/staging/src/k8s.io/apiserver/pkg/storage/value/encrypt/envelope/testing/BUILD +++ b/staging/src/k8s.io/apiserver/pkg/storage/value/encrypt/envelope/testing/BUILD @@ -47,14 +47,6 @@ go_library( "//vendor/google.golang.org/grpc/status:go_default_library", "//vendor/k8s.io/klog/v2:go_default_library", ], - "@io_bazel_rules_go//go/platform:illumos": [ - "//staging/src/k8s.io/apimachinery/pkg/util/wait:go_default_library", - "//staging/src/k8s.io/apiserver/pkg/storage/value/encrypt/envelope/v1beta1:go_default_library", - "//vendor/google.golang.org/grpc:go_default_library", - "//vendor/google.golang.org/grpc/codes:go_default_library", - "//vendor/google.golang.org/grpc/status:go_default_library", - "//vendor/k8s.io/klog/v2:go_default_library", - ], "@io_bazel_rules_go//go/platform:ios": [ "//staging/src/k8s.io/apimachinery/pkg/util/wait:go_default_library", "//staging/src/k8s.io/apiserver/pkg/storage/value/encrypt/envelope/v1beta1:go_default_library", diff --git a/staging/src/k8s.io/kubectl/pkg/util/BUILD b/staging/src/k8s.io/kubectl/pkg/util/BUILD index d9721864e7c..a9d826ecf9e 100644 --- a/staging/src/k8s.io/kubectl/pkg/util/BUILD +++ b/staging/src/k8s.io/kubectl/pkg/util/BUILD @@ -35,9 +35,6 @@ go_library( "@io_bazel_rules_go//go/platform:freebsd": [ "//vendor/golang.org/x/sys/unix:go_default_library", ], - "@io_bazel_rules_go//go/platform:illumos": [ - "//vendor/golang.org/x/sys/unix:go_default_library", - ], "@io_bazel_rules_go//go/platform:ios": [ "//vendor/golang.org/x/sys/unix:go_default_library", ], diff --git a/staging/src/k8s.io/kubectl/pkg/util/term/BUILD b/staging/src/k8s.io/kubectl/pkg/util/term/BUILD index 91ebe3296e5..c0a2dfb8625 100644 --- a/staging/src/k8s.io/kubectl/pkg/util/term/BUILD +++ b/staging/src/k8s.io/kubectl/pkg/util/term/BUILD @@ -34,9 +34,6 @@ go_library( "@io_bazel_rules_go//go/platform:freebsd": [ "//vendor/golang.org/x/sys/unix:go_default_library", ], - "@io_bazel_rules_go//go/platform:illumos": [ - "//vendor/golang.org/x/sys/unix:go_default_library", - ], "@io_bazel_rules_go//go/platform:ios": [ "//vendor/golang.org/x/sys/unix:go_default_library", ], diff --git a/test/integration/master/BUILD b/test/integration/master/BUILD index f6b1ad3b98b..154f80fd4c9 100644 --- a/test/integration/master/BUILD +++ b/test/integration/master/BUILD @@ -87,10 +87,6 @@ go_test( "//staging/src/k8s.io/apiserver/pkg/storage/value/encrypt/envelope/testing:go_default_library", "//staging/src/k8s.io/apiserver/pkg/storage/value/encrypt/envelope/v1beta1:go_default_library", ], - "@io_bazel_rules_go//go/platform:illumos": [ - "//staging/src/k8s.io/apiserver/pkg/storage/value/encrypt/envelope/testing:go_default_library", - "//staging/src/k8s.io/apiserver/pkg/storage/value/encrypt/envelope/v1beta1:go_default_library", - ], "@io_bazel_rules_go//go/platform:ios": [ "//staging/src/k8s.io/apiserver/pkg/storage/value/encrypt/envelope/testing:go_default_library", "//staging/src/k8s.io/apiserver/pkg/storage/value/encrypt/envelope/v1beta1:go_default_library", diff --git a/vendor/github.com/coreos/pkg/capnslog/BUILD b/vendor/github.com/coreos/pkg/capnslog/BUILD index ccb1930ccb7..1e9e20201f8 100644 --- a/vendor/github.com/coreos/pkg/capnslog/BUILD +++ b/vendor/github.com/coreos/pkg/capnslog/BUILD @@ -32,9 +32,6 @@ go_library( "@io_bazel_rules_go//go/platform:freebsd": [ "//vendor/github.com/coreos/go-systemd/journal:go_default_library", ], - "@io_bazel_rules_go//go/platform:illumos": [ - "//vendor/github.com/coreos/go-systemd/journal:go_default_library", - ], "@io_bazel_rules_go//go/platform:ios": [ "//vendor/github.com/coreos/go-systemd/journal:go_default_library", ], diff --git a/vendor/github.com/docker/docker/pkg/term/BUILD b/vendor/github.com/docker/docker/pkg/term/BUILD index 54c7f55afad..755d10034b1 100644 --- a/vendor/github.com/docker/docker/pkg/term/BUILD +++ b/vendor/github.com/docker/docker/pkg/term/BUILD @@ -31,9 +31,6 @@ go_library( "@io_bazel_rules_go//go/platform:freebsd": [ "//vendor/golang.org/x/sys/unix:go_default_library", ], - "@io_bazel_rules_go//go/platform:illumos": [ - "//vendor/golang.org/x/sys/unix:go_default_library", - ], "@io_bazel_rules_go//go/platform:ios": [ "//vendor/golang.org/x/sys/unix:go_default_library", ], diff --git a/vendor/github.com/miekg/dns/BUILD b/vendor/github.com/miekg/dns/BUILD index 082c05e7dd2..8ec9a6fb8b8 100644 --- a/vendor/github.com/miekg/dns/BUILD +++ b/vendor/github.com/miekg/dns/BUILD @@ -77,10 +77,6 @@ go_library( "//vendor/golang.org/x/net/ipv6:go_default_library", "//vendor/golang.org/x/sys/unix:go_default_library", ], - "@io_bazel_rules_go//go/platform:illumos": [ - "//vendor/golang.org/x/net/ipv4:go_default_library", - "//vendor/golang.org/x/net/ipv6:go_default_library", - ], "@io_bazel_rules_go//go/platform:ios": [ "//vendor/golang.org/x/net/ipv4:go_default_library", "//vendor/golang.org/x/net/ipv6:go_default_library", diff --git a/vendor/github.com/moby/term/BUILD b/vendor/github.com/moby/term/BUILD index ee10cde993b..7302997fb0f 100644 --- a/vendor/github.com/moby/term/BUILD +++ b/vendor/github.com/moby/term/BUILD @@ -31,9 +31,6 @@ go_library( "@io_bazel_rules_go//go/platform:freebsd": [ "//vendor/golang.org/x/sys/unix:go_default_library", ], - "@io_bazel_rules_go//go/platform:illumos": [ - "//vendor/golang.org/x/sys/unix:go_default_library", - ], "@io_bazel_rules_go//go/platform:ios": [ "//vendor/golang.org/x/sys/unix:go_default_library", ], diff --git a/vendor/github.com/onsi/ginkgo/internal/remote/BUILD b/vendor/github.com/onsi/ginkgo/internal/remote/BUILD index 5def2fce22d..c7301d783af 100644 --- a/vendor/github.com/onsi/ginkgo/internal/remote/BUILD +++ b/vendor/github.com/onsi/ginkgo/internal/remote/BUILD @@ -10,7 +10,6 @@ go_library( "output_interceptor_win.go", "server.go", "syscall_dup_linux_arm64.go", - "syscall_dup_linux_riscv64.go", "syscall_dup_solaris.go", "syscall_dup_unix.go", ], diff --git a/vendor/github.com/opencontainers/runc/libcontainer/cgroups/systemd/BUILD b/vendor/github.com/opencontainers/runc/libcontainer/cgroups/systemd/BUILD index e74b5c0f8fa..7cffd1c6fa1 100644 --- a/vendor/github.com/opencontainers/runc/libcontainer/cgroups/systemd/BUILD +++ b/vendor/github.com/opencontainers/runc/libcontainer/cgroups/systemd/BUILD @@ -39,9 +39,6 @@ go_library( "@io_bazel_rules_go//go/platform:freebsd": [ "//vendor/github.com/opencontainers/runc/libcontainer/cgroups:go_default_library", ], - "@io_bazel_rules_go//go/platform:illumos": [ - "//vendor/github.com/opencontainers/runc/libcontainer/cgroups:go_default_library", - ], "@io_bazel_rules_go//go/platform:ios": [ "//vendor/github.com/opencontainers/runc/libcontainer/cgroups:go_default_library", ], diff --git a/vendor/github.com/opencontainers/runc/libcontainer/system/BUILD b/vendor/github.com/opencontainers/runc/libcontainer/system/BUILD index e3b9757cc1e..f1fe2ad7b3f 100644 --- a/vendor/github.com/opencontainers/runc/libcontainer/system/BUILD +++ b/vendor/github.com/opencontainers/runc/libcontainer/system/BUILD @@ -29,9 +29,6 @@ go_library( "@io_bazel_rules_go//go/platform:freebsd": [ "//vendor/github.com/opencontainers/runc/libcontainer/user:go_default_library", ], - "@io_bazel_rules_go//go/platform:illumos": [ - "//vendor/github.com/opencontainers/runc/libcontainer/user:go_default_library", - ], "@io_bazel_rules_go//go/platform:ios": [ "//vendor/github.com/opencontainers/runc/libcontainer/user:go_default_library", ], diff --git a/vendor/github.com/prometheus/client_golang/prometheus/BUILD b/vendor/github.com/prometheus/client_golang/prometheus/BUILD index 57c00d4d6c9..8f6921b8158 100644 --- a/vendor/github.com/prometheus/client_golang/prometheus/BUILD +++ b/vendor/github.com/prometheus/client_golang/prometheus/BUILD @@ -56,9 +56,6 @@ go_library( "@io_bazel_rules_go//go/platform:freebsd": [ "//vendor/github.com/prometheus/procfs:go_default_library", ], - "@io_bazel_rules_go//go/platform:illumos": [ - "//vendor/github.com/prometheus/procfs:go_default_library", - ], "@io_bazel_rules_go//go/platform:ios": [ "//vendor/github.com/prometheus/procfs:go_default_library", ], diff --git a/vendor/github.com/storageos/go-api/BUILD b/vendor/github.com/storageos/go-api/BUILD index c052c8e3266..b10689ab3fa 100644 --- a/vendor/github.com/storageos/go-api/BUILD +++ b/vendor/github.com/storageos/go-api/BUILD @@ -4,7 +4,9 @@ go_library( name = "go_default_library", srcs = [ "client.go", + "cluster.go", "health.go", + "licence.go", "logger.go", "login.go", "namespace.go", diff --git a/vendor/github.com/storageos/go-api/client.go b/vendor/github.com/storageos/go-api/client.go index 4a95516b14b..1a6dc0dcde4 100644 --- a/vendor/github.com/storageos/go-api/client.go +++ b/vendor/github.com/storageos/go-api/client.go @@ -44,6 +44,9 @@ var ( // ErrProxyNotSupported is returned when a client is unable to set a proxy for http requests. ErrProxyNotSupported = errors.New("client does not support http proxy") + // ErrDialerNotSupported is returned when a client is unable to set a DialContext for http requests. + ErrDialerNotSupported = errors.New("client does not support setting DialContext") + // DefaultPort is the default API port. DefaultPort = "5705" @@ -107,6 +110,8 @@ type Dialer interface { Dial(network, address string) (net.Conn, error) } +type dialContext = func(ctx context.Context, network, address string) (net.Conn, error) + // NewClient returns a Client instance ready for communication with the given // server endpoint. It will use the latest remote API version available in the // server. @@ -203,6 +208,36 @@ func (c *Client) SetTimeout(t time.Duration) { } } +// GetDialContext returns the current DialContext function, or nil if there is none. +func (c *Client) GetDialContext() dialContext { + c.configLock.RLock() + defer c.configLock.RUnlock() + + if c.httpClient == nil { + return nil + } + transport, supported := c.httpClient.Transport.(*http.Transport) + if !supported { + return nil + } + return transport.DialContext +} + +// SetDialContext uses the given dial function to establish TCP connections in the HTTPClient. +func (c *Client) SetDialContext(dial dialContext) error { + c.configLock.Lock() + defer c.configLock.Unlock() + + if client := c.httpClient; client != nil { + transport, supported := client.Transport.(*http.Transport) + if !supported { + return ErrDialerNotSupported + } + transport.DialContext = dial + } + return nil +} + func (c *Client) checkAPIVersion() error { serverAPIVersionString, err := c.getServerAPIVersionString() if err != nil { @@ -259,6 +294,8 @@ type doOptions struct { forceJSON bool force bool unversioned bool + + retryOn []int // http.status codes } func (c *Client) do(method, urlpath string, doOptions doOptions) (*http.Response, error) { @@ -338,6 +375,7 @@ func (c *Client) do(method, urlpath string, doOptions doOptions) (*http.Response resp, err := httpClient.Do(req.WithContext(ctx)) if err != nil { + // If it is a custom error, return it. It probably knows more than us if serror.IsStorageOSError(err) { switch serror.ErrorKind(err) { @@ -366,6 +404,17 @@ func (c *Client) do(method, urlpath string, doOptions doOptions) (*http.Response } } + var shouldretry bool + if doOptions.retryOn != nil { + for _, code := range doOptions.retryOn { + if resp.StatusCode == code { + failedAddresses[address] = struct{}{} + shouldretry = true + } + + } + } + // If we get to the point of response, we should move any failed // addresses to the back. failed := len(failedAddresses) @@ -388,6 +437,10 @@ func (c *Client) do(method, urlpath string, doOptions doOptions) (*http.Response c.addressLock.Unlock() } + if shouldretry { + continue + } + if resp.StatusCode < 200 || resp.StatusCode >= 400 { return nil, newError(resp) // These status codes are likely to be fatal } diff --git a/vendor/github.com/storageos/go-api/cluster.go b/vendor/github.com/storageos/go-api/cluster.go new file mode 100644 index 00000000000..1ba6f86451d --- /dev/null +++ b/vendor/github.com/storageos/go-api/cluster.go @@ -0,0 +1,48 @@ +package storageos + +import ( + "encoding/json" + + "github.com/storageos/go-api/types" +) + +var ( + // ClusterMaintenanceAPIPrefix is a path to the HTTP endpoint for managing + // the cluster maintenance mode. + ClusterMaintenanceAPIPrefix = "cluster/maintenance" +) + +// Maintenance returns the maintenance status of the cluster +func (c *Client) Maintenance() (*types.Maintenance, error) { + resp, err := c.do("GET", ClusterMaintenanceAPIPrefix, doOptions{}) + if err != nil { + return nil, err + } + defer resp.Body.Close() + + res := &types.Maintenance{} + if err := json.NewDecoder(resp.Body).Decode(res); err != nil { + return nil, err + } + return res, nil +} + +// EnableMaintenance enables maintenance mode in the cluster +func (c *Client) EnableMaintenance() error { + resp, err := c.do("POST", ClusterMaintenanceAPIPrefix, doOptions{}) + if err != nil { + return err + } + defer resp.Body.Close() + return nil +} + +// DisableMaintenance disables maintenance mode in the cluster +func (c *Client) DisableMaintenance() error { + resp, err := c.do("DELETE", ClusterMaintenanceAPIPrefix, doOptions{}) + if err != nil { + return err + } + defer resp.Body.Close() + return nil +} diff --git a/vendor/github.com/storageos/go-api/health.go b/vendor/github.com/storageos/go-api/health.go index 7b441000749..b1acd5db890 100644 --- a/vendor/github.com/storageos/go-api/health.go +++ b/vendor/github.com/storageos/go-api/health.go @@ -14,6 +14,22 @@ var ( HealthAPIPrefix = "health" ) +func (c *Client) ClusterHealth(ctx context.Context) ([]*types.ClusterHealthNode, error) { + status := []*types.ClusterHealthNode{} + url := fmt.Sprintf("/cluster/%s", HealthAPIPrefix) + + resp, err := c.do("GET", url, doOptions{context: ctx, retryOn: []int{http.StatusNotFound}}) + if err != nil { + return nil, err + } + defer resp.Body.Close() + + if err := json.NewDecoder(resp.Body).Decode(&status); err != nil { + return nil, err + } + return status, nil +} + // CPHealth returns the health of the control plane server at a given url. func (c *Client) CPHealth(ctx context.Context, hostname string) (*types.CPHealthStatus, error) { diff --git a/vendor/github.com/storageos/go-api/licence.go b/vendor/github.com/storageos/go-api/licence.go new file mode 100644 index 00000000000..425d97462cd --- /dev/null +++ b/vendor/github.com/storageos/go-api/licence.go @@ -0,0 +1,43 @@ +package storageos + +import ( + "encoding/json" + + "github.com/storageos/go-api/types" +) + +const ( + // licenceAPIPrefix is a partial path to the HTTP endpoint. + licenceAPIPrefix = "licencing" +) + +// Licence returns the current licence on the server. +func (c *Client) Licence() (*types.Licence, error) { + resp, err := c.do("GET", licenceAPIPrefix, doOptions{}) + if err != nil { + return nil, err + } + defer resp.Body.Close() + licence := &types.Licence{} + if err := json.NewDecoder(resp.Body).Decode(&licence); err != nil { + return nil, err + } + return licence, nil +} + +// LicenceApply applies a licence on the server. +func (c *Client) LicenceApply(licenceKey string) error { + _, err := c.do("POST", licenceAPIPrefix, doOptions{ + data: &types.LicenceKeyContainer{Key: licenceKey}, + }) + return err +} + +// LicenceDelete removes the current licence. +func (c *Client) LicenceDelete() error { + resp, err := c.do("DELETE", licenceAPIPrefix, doOptions{}) + if err != nil { + return err + } + return resp.Body.Close() +} diff --git a/vendor/github.com/storageos/go-api/netutil/parsers.go b/vendor/github.com/storageos/go-api/netutil/parsers.go index cb297e83488..932c7795b80 100644 --- a/vendor/github.com/storageos/go-api/netutil/parsers.go +++ b/vendor/github.com/storageos/go-api/netutil/parsers.go @@ -55,6 +55,12 @@ func AddressesFromNodes(nodes []string) ([]string, error) { return nil, newInvalidNodeError(errInvalidHostName) } + // Given input like "http://localhost:8080:8383", url.Parse() will + // return host as "localhost:8000", which isn't a vaild DNS name. + if strings.Contains(host, ":") { + return nil, newInvalidNodeError(errInvalidHostName) + } + port := url.Port() if port == "" { port = DefaultDialPort diff --git a/vendor/github.com/storageos/go-api/policy.go b/vendor/github.com/storageos/go-api/policy.go index 9d2f6604fdc..f5c1a050df7 100644 --- a/vendor/github.com/storageos/go-api/policy.go +++ b/vendor/github.com/storageos/go-api/policy.go @@ -29,7 +29,7 @@ func (n *nopMarshaler) MarshalJSON() ([]byte, error) { } // PolicyCreate creates a policy on the server. -func (c *Client) PolicyCreate(jsonl []byte, ctx context.Context) error { +func (c *Client) PolicyCreate(ctx context.Context, jsonl []byte) error { nopm := nopMarshaler(jsonl) _, err := c.do("POST", PolicyAPIPrefix, doOptions{ data: &nopm, diff --git a/vendor/github.com/storageos/go-api/pool.go b/vendor/github.com/storageos/go-api/pool.go index c4629d74f6a..b383e77007c 100644 --- a/vendor/github.com/storageos/go-api/pool.go +++ b/vendor/github.com/storageos/go-api/pool.go @@ -110,7 +110,7 @@ func (c *Client) PoolDelete(opts types.DeleteOptions) error { return ErrPoolInUse } } - return nil + return err } defer resp.Body.Close() return nil diff --git a/vendor/github.com/storageos/go-api/rule.go b/vendor/github.com/storageos/go-api/rule.go index fc92d150229..af1dc196849 100644 --- a/vendor/github.com/storageos/go-api/rule.go +++ b/vendor/github.com/storageos/go-api/rule.go @@ -134,7 +134,7 @@ func (c *Client) RuleDelete(opts types.DeleteOptions) error { return ErrRuleInUse } } - return nil + return err } defer resp.Body.Close() return nil diff --git a/vendor/github.com/storageos/go-api/types/BUILD b/vendor/github.com/storageos/go-api/types/BUILD index 02b1afff3f0..11bcfe84805 100644 --- a/vendor/github.com/storageos/go-api/types/BUILD +++ b/vendor/github.com/storageos/go-api/types/BUILD @@ -5,6 +5,7 @@ go_library( srcs = [ "auth.go", "capacity_stats.go", + "cluster.go", "connectivity.go", "delete_options.go", "deployment.go", @@ -12,6 +13,7 @@ go_library( "error_response.go", "events.go", "health.go", + "licence.go", "list_options.go", "logger.go", "namespace.go", diff --git a/vendor/github.com/storageos/go-api/types/cluster.go b/vendor/github.com/storageos/go-api/types/cluster.go new file mode 100644 index 00000000000..65625d01210 --- /dev/null +++ b/vendor/github.com/storageos/go-api/types/cluster.go @@ -0,0 +1,10 @@ +package types + +import "time" + +// Maintenance is used to place the cluster in maintenance mode. +type Maintenance struct { + Enabled bool `json:"enabled"` + UpdatedBy string `json:"updatedBy"` + UpdatedAt time.Time `json:"updatedAt"` +} diff --git a/vendor/github.com/storageos/go-api/types/health.go b/vendor/github.com/storageos/go-api/types/health.go index d6c6d8eb6ca..6efe0a4079b 100644 --- a/vendor/github.com/storageos/go-api/types/health.go +++ b/vendor/github.com/storageos/go-api/types/health.go @@ -14,6 +14,20 @@ type NamedSubModuleStatus struct { SubModuleStatus } +type ClusterHealthNode struct { + NodeID string `json:"nodeID"` + NodeName string `json:"nodeName"` + Submodules struct { + DirectFSInitiator SubModuleStatus `json:"directfs_initiator"` + Director SubModuleStatus `json:"director"` + KV SubModuleStatus `json:"kv"` + KVWrite SubModuleStatus `json:"kv_write"` + NATS SubModuleStatus `json:"nats"` + Presentation SubModuleStatus `json:"presentation"` + RDB SubModuleStatus `json:"rdb"` + } `json:"submodules"` +} + type CPHealthStatus struct { KV SubModuleStatus KVWrite SubModuleStatus diff --git a/vendor/github.com/storageos/go-api/types/licence.go b/vendor/github.com/storageos/go-api/types/licence.go new file mode 100644 index 00000000000..c486ed2bb7b --- /dev/null +++ b/vendor/github.com/storageos/go-api/types/licence.go @@ -0,0 +1,35 @@ +package types + +import "time" + +// FeatureType store features types +type FeatureType string + +const ( + // HA means High Availability + HA = FeatureType("HA") + // DEV means developer licence + DEV = FeatureType("DEV") + // TRIAL means trial licence + TRIAL = FeatureType("TRIAL") +) + +// Licence holds the information to be encoded in the licence key. It needs to be synced across +// the django server running on portal-API as well as the corresponding decoding package on the +// storageOS control plane +type Licence struct { + ArrayUUID string `json:"arrayUUID,omitempty"` + ClusterID string `json:"clusterID,omitempty"` + CustomerID string `json:"customerID"` + CustomerName string `json:"customerName"` + Storage int `json:"storage"` + ValidUntil time.Time `json:"validUntil"` + LicenceType string `json:"licenceType"` + Features map[FeatureType]bool `json:"features"` + Unregistered bool `json:"unregistered"` +} + +// LicenceKeyContainer - stores a licence key +type LicenceKeyContainer struct { + Key string `json:"key"` +} diff --git a/vendor/github.com/storageos/go-api/user.go b/vendor/github.com/storageos/go-api/user.go index 19688203aa0..bfea90105d2 100644 --- a/vendor/github.com/storageos/go-api/user.go +++ b/vendor/github.com/storageos/go-api/user.go @@ -12,7 +12,6 @@ import ( ) var ( - // UserAPIPrefix is a partial path to the HTTP endpoint. UserAPIPrefix = "users" @@ -77,7 +76,7 @@ func (c *Client) UserCreate(opts types.UserCreateOptions) error { } // UserUpdate updates a user on the server. -func (c *Client) UserUpdate(user *types.User, ctx context.Context) error { +func (c *Client) UserUpdate(ctx context.Context, user *types.User) error { var ref string switch { case user.UUID != "": diff --git a/vendor/github.com/vishvananda/netlink/BUILD b/vendor/github.com/vishvananda/netlink/BUILD index 0154865f3fe..cd20c50d91b 100644 --- a/vendor/github.com/vishvananda/netlink/BUILD +++ b/vendor/github.com/vishvananda/netlink/BUILD @@ -75,9 +75,6 @@ go_library( "@io_bazel_rules_go//go/platform:freebsd": [ "//vendor/github.com/vishvananda/netns:go_default_library", ], - "@io_bazel_rules_go//go/platform:illumos": [ - "//vendor/github.com/vishvananda/netns:go_default_library", - ], "@io_bazel_rules_go//go/platform:ios": [ "//vendor/github.com/vishvananda/netns:go_default_library", ], diff --git a/vendor/go.etcd.io/bbolt/BUILD b/vendor/go.etcd.io/bbolt/BUILD index 53c3dfc46b9..1d656ca424e 100644 --- a/vendor/go.etcd.io/bbolt/BUILD +++ b/vendor/go.etcd.io/bbolt/BUILD @@ -13,7 +13,6 @@ go_library( "bolt_openbsd.go", "bolt_ppc64.go", "bolt_ppc64le.go", - "bolt_riscv64.go", "bolt_s390x.go", "bolt_unix.go", "bolt_unix_aix.go", diff --git a/vendor/go.etcd.io/etcd/pkg/logutil/BUILD b/vendor/go.etcd.io/etcd/pkg/logutil/BUILD index f9d9d9ebe1a..f7370ee2510 100644 --- a/vendor/go.etcd.io/etcd/pkg/logutil/BUILD +++ b/vendor/go.etcd.io/etcd/pkg/logutil/BUILD @@ -44,10 +44,6 @@ go_library( "//vendor/github.com/coreos/go-systemd/journal:go_default_library", "//vendor/go.etcd.io/etcd/pkg/systemd:go_default_library", ], - "@io_bazel_rules_go//go/platform:illumos": [ - "//vendor/github.com/coreos/go-systemd/journal:go_default_library", - "//vendor/go.etcd.io/etcd/pkg/systemd:go_default_library", - ], "@io_bazel_rules_go//go/platform:ios": [ "//vendor/github.com/coreos/go-systemd/journal:go_default_library", "//vendor/go.etcd.io/etcd/pkg/systemd:go_default_library", diff --git a/vendor/golang.org/x/net/internal/socket/BUILD b/vendor/golang.org/x/net/internal/socket/BUILD index 742cb2bbc0c..cdfe91f2397 100644 --- a/vendor/golang.org/x/net/internal/socket/BUILD +++ b/vendor/golang.org/x/net/internal/socket/BUILD @@ -54,7 +54,6 @@ go_library( "sys_linux_mipsle.go", "sys_linux_ppc64.go", "sys_linux_ppc64le.go", - "sys_linux_riscv64.go", "sys_linux_s390x.go", "sys_linux_s390x.s", "sys_netbsd.go", @@ -64,7 +63,6 @@ go_library( "sys_stub.go", "sys_unix.go", "sys_windows.go", - "zsys_aix_ppc64.go", "zsys_darwin_386.go", "zsys_darwin_amd64.go", "zsys_darwin_arm.go", @@ -73,7 +71,6 @@ go_library( "zsys_freebsd_386.go", "zsys_freebsd_amd64.go", "zsys_freebsd_arm.go", - "zsys_freebsd_arm64.go", "zsys_linux_386.go", "zsys_linux_amd64.go", "zsys_linux_arm.go", @@ -84,16 +81,13 @@ go_library( "zsys_linux_mipsle.go", "zsys_linux_ppc64.go", "zsys_linux_ppc64le.go", - "zsys_linux_riscv64.go", "zsys_linux_s390x.go", "zsys_netbsd_386.go", "zsys_netbsd_amd64.go", "zsys_netbsd_arm.go", - "zsys_netbsd_arm64.go", "zsys_openbsd_386.go", "zsys_openbsd_amd64.go", "zsys_openbsd_arm.go", - "zsys_openbsd_arm64.go", "zsys_solaris_amd64.go", ], importmap = "k8s.io/kubernetes/vendor/golang.org/x/net/internal/socket", diff --git a/vendor/golang.org/x/net/ipv4/BUILD b/vendor/golang.org/x/net/ipv4/BUILD index 5a52a2649d5..67f80517d0d 100644 --- a/vendor/golang.org/x/net/ipv4/BUILD +++ b/vendor/golang.org/x/net/ipv4/BUILD @@ -44,13 +44,11 @@ go_library( "sys_ssmreq_stub.go", "sys_stub.go", "sys_windows.go", - "zsys_aix_ppc64.go", "zsys_darwin.go", "zsys_dragonfly.go", "zsys_freebsd_386.go", "zsys_freebsd_amd64.go", "zsys_freebsd_arm.go", - "zsys_freebsd_arm64.go", "zsys_linux_386.go", "zsys_linux_amd64.go", "zsys_linux_arm.go", @@ -62,7 +60,6 @@ go_library( "zsys_linux_ppc.go", "zsys_linux_ppc64.go", "zsys_linux_ppc64le.go", - "zsys_linux_riscv64.go", "zsys_linux_s390x.go", "zsys_netbsd.go", "zsys_openbsd.go", diff --git a/vendor/golang.org/x/net/ipv6/BUILD b/vendor/golang.org/x/net/ipv6/BUILD index 7efdd4ea185..335d3023f82 100644 --- a/vendor/golang.org/x/net/ipv6/BUILD +++ b/vendor/golang.org/x/net/ipv6/BUILD @@ -43,13 +43,11 @@ go_library( "sys_ssmreq_stub.go", "sys_stub.go", "sys_windows.go", - "zsys_aix_ppc64.go", "zsys_darwin.go", "zsys_dragonfly.go", "zsys_freebsd_386.go", "zsys_freebsd_amd64.go", "zsys_freebsd_arm.go", - "zsys_freebsd_arm64.go", "zsys_linux_386.go", "zsys_linux_amd64.go", "zsys_linux_arm.go", @@ -61,7 +59,6 @@ go_library( "zsys_linux_ppc.go", "zsys_linux_ppc64.go", "zsys_linux_ppc64le.go", - "zsys_linux_riscv64.go", "zsys_linux_s390x.go", "zsys_netbsd.go", "zsys_openbsd.go", diff --git a/vendor/golang.org/x/sys/cpu/BUILD b/vendor/golang.org/x/sys/cpu/BUILD index 5f02c25d9ee..c5fc879478c 100644 --- a/vendor/golang.org/x/sys/cpu/BUILD +++ b/vendor/golang.org/x/sys/cpu/BUILD @@ -3,7 +3,6 @@ load("@io_bazel_rules_go//go:def.bzl", "go_library") go_library( name = "go_default_library", srcs = [ - "asm_aix_ppc64.s", "byteorder.go", "cpu.go", "cpu_aix.go", @@ -23,13 +22,11 @@ go_library( "cpu_mips64x.go", "cpu_mipsx.go", "cpu_other_arm64.go", - "cpu_riscv64.go", "cpu_s390x.s", "cpu_wasm.go", "cpu_x86.go", "cpu_x86.s", "hwcap_linux.go", - "syscall_aix_ppc64_gc.go", ], importmap = "k8s.io/kubernetes/vendor/golang.org/x/sys/cpu", importpath = "golang.org/x/sys/cpu", diff --git a/vendor/golang.org/x/sys/unix/BUILD b/vendor/golang.org/x/sys/unix/BUILD index 1fe841101b9..a8ba430e71b 100644 --- a/vendor/golang.org/x/sys/unix/BUILD +++ b/vendor/golang.org/x/sys/unix/BUILD @@ -5,7 +5,6 @@ go_library( srcs = [ "affinity_linux.go", "aliases.go", - "asm_aix_ppc64.s", "asm_darwin_386.s", "asm_darwin_amd64.s", "asm_darwin_arm.s", @@ -14,7 +13,6 @@ go_library( "asm_freebsd_386.s", "asm_freebsd_amd64.s", "asm_freebsd_arm.s", - "asm_freebsd_arm64.s", "asm_linux_386.s", "asm_linux_amd64.s", "asm_linux_arm.s", @@ -22,21 +20,17 @@ go_library( "asm_linux_mips64x.s", "asm_linux_mipsx.s", "asm_linux_ppc64x.s", - "asm_linux_riscv64.s", "asm_linux_s390x.s", "asm_netbsd_386.s", "asm_netbsd_amd64.s", "asm_netbsd_arm.s", - "asm_netbsd_arm64.s", "asm_openbsd_386.s", "asm_openbsd_amd64.s", "asm_openbsd_arm.s", - "asm_openbsd_arm64.s", "asm_solaris_amd64.s", "bluetooth_linux.go", "cap_freebsd.go", "constants.go", - "dev_aix_ppc64.go", "dev_darwin.go", "dev_dragonfly.go", "dev_freebsd.go", @@ -50,7 +44,6 @@ go_library( "errors_freebsd_386.go", "errors_freebsd_amd64.go", "errors_freebsd_arm.go", - "errors_freebsd_arm64.go", "fcntl.go", "fcntl_darwin.go", "fcntl_linux_32bit.go", @@ -69,7 +62,6 @@ go_library( "str.go", "syscall.go", "syscall_aix.go", - "syscall_aix_ppc64.go", "syscall_bsd.go", "syscall_darwin.1_12.go", "syscall_darwin.1_13.go", @@ -89,8 +81,6 @@ go_library( "syscall_freebsd_386.go", "syscall_freebsd_amd64.go", "syscall_freebsd_arm.go", - "syscall_freebsd_arm64.go", - "syscall_illumos.go", "syscall_linux.go", "syscall_linux_386.go", "syscall_linux_amd64.go", @@ -102,18 +92,15 @@ go_library( "syscall_linux_mips64x.go", "syscall_linux_mipsx.go", "syscall_linux_ppc64x.go", - "syscall_linux_riscv64.go", "syscall_linux_s390x.go", "syscall_netbsd.go", "syscall_netbsd_386.go", "syscall_netbsd_amd64.go", "syscall_netbsd_arm.go", - "syscall_netbsd_arm64.go", "syscall_openbsd.go", "syscall_openbsd_386.go", "syscall_openbsd_amd64.go", "syscall_openbsd_arm.go", - "syscall_openbsd_arm64.go", "syscall_solaris.go", "syscall_solaris_amd64.go", "syscall_unix.go", @@ -122,7 +109,6 @@ go_library( "timestruct.go", "unveil_openbsd.go", "xattr_bsd.go", - "zerrors_aix_ppc64.go", "zerrors_darwin_386.go", "zerrors_darwin_amd64.go", "zerrors_darwin_arm.go", @@ -131,7 +117,6 @@ go_library( "zerrors_freebsd_386.go", "zerrors_freebsd_amd64.go", "zerrors_freebsd_arm.go", - "zerrors_freebsd_arm64.go", "zerrors_linux.go", "zerrors_linux_386.go", "zerrors_linux_amd64.go", @@ -143,24 +128,19 @@ go_library( "zerrors_linux_mipsle.go", "zerrors_linux_ppc64.go", "zerrors_linux_ppc64le.go", - "zerrors_linux_riscv64.go", "zerrors_linux_s390x.go", "zerrors_netbsd_386.go", "zerrors_netbsd_amd64.go", "zerrors_netbsd_arm.go", - "zerrors_netbsd_arm64.go", "zerrors_openbsd_386.go", "zerrors_openbsd_amd64.go", "zerrors_openbsd_arm.go", - "zerrors_openbsd_arm64.go", "zerrors_solaris_amd64.go", "zptrace_armnn_linux.go", "zptrace_linux_arm64.go", "zptrace_mipsnn_linux.go", "zptrace_mipsnnle_linux.go", "zptrace_x86_linux.go", - "zsyscall_aix_ppc64.go", - "zsyscall_aix_ppc64_gc.go", "zsyscall_darwin_386.1_11.go", "zsyscall_darwin_386.1_13.go", "zsyscall_darwin_386.1_13.s", @@ -185,8 +165,6 @@ go_library( "zsyscall_freebsd_386.go", "zsyscall_freebsd_amd64.go", "zsyscall_freebsd_arm.go", - "zsyscall_freebsd_arm64.go", - "zsyscall_illumos_amd64.go", "zsyscall_linux.go", "zsyscall_linux_386.go", "zsyscall_linux_amd64.go", @@ -198,21 +176,17 @@ go_library( "zsyscall_linux_mipsle.go", "zsyscall_linux_ppc64.go", "zsyscall_linux_ppc64le.go", - "zsyscall_linux_riscv64.go", "zsyscall_linux_s390x.go", "zsyscall_netbsd_386.go", "zsyscall_netbsd_amd64.go", "zsyscall_netbsd_arm.go", - "zsyscall_netbsd_arm64.go", "zsyscall_openbsd_386.go", "zsyscall_openbsd_amd64.go", "zsyscall_openbsd_arm.go", - "zsyscall_openbsd_arm64.go", "zsyscall_solaris_amd64.go", "zsysctl_openbsd_386.go", "zsysctl_openbsd_amd64.go", "zsysctl_openbsd_arm.go", - "zsysctl_openbsd_arm64.go", "zsysnum_darwin_386.go", "zsysnum_darwin_amd64.go", "zsysnum_darwin_arm.go", @@ -221,7 +195,6 @@ go_library( "zsysnum_freebsd_386.go", "zsysnum_freebsd_amd64.go", "zsysnum_freebsd_arm.go", - "zsysnum_freebsd_arm64.go", "zsysnum_linux_386.go", "zsysnum_linux_amd64.go", "zsysnum_linux_arm.go", @@ -232,17 +205,13 @@ go_library( "zsysnum_linux_mipsle.go", "zsysnum_linux_ppc64.go", "zsysnum_linux_ppc64le.go", - "zsysnum_linux_riscv64.go", "zsysnum_linux_s390x.go", "zsysnum_netbsd_386.go", "zsysnum_netbsd_amd64.go", "zsysnum_netbsd_arm.go", - "zsysnum_netbsd_arm64.go", "zsysnum_openbsd_386.go", "zsysnum_openbsd_amd64.go", "zsysnum_openbsd_arm.go", - "zsysnum_openbsd_arm64.go", - "ztypes_aix_ppc64.go", "ztypes_darwin_386.go", "ztypes_darwin_amd64.go", "ztypes_darwin_arm.go", @@ -251,7 +220,6 @@ go_library( "ztypes_freebsd_386.go", "ztypes_freebsd_amd64.go", "ztypes_freebsd_arm.go", - "ztypes_freebsd_arm64.go", "ztypes_linux.go", "ztypes_linux_386.go", "ztypes_linux_amd64.go", @@ -263,16 +231,13 @@ go_library( "ztypes_linux_mipsle.go", "ztypes_linux_ppc64.go", "ztypes_linux_ppc64le.go", - "ztypes_linux_riscv64.go", "ztypes_linux_s390x.go", "ztypes_netbsd_386.go", "ztypes_netbsd_amd64.go", "ztypes_netbsd_arm.go", - "ztypes_netbsd_arm64.go", "ztypes_openbsd_386.go", "ztypes_openbsd_amd64.go", "ztypes_openbsd_arm.go", - "ztypes_openbsd_arm64.go", "ztypes_solaris_amd64.go", ], cgo = True, diff --git a/vendor/golang.org/x/sys/windows/BUILD b/vendor/golang.org/x/sys/windows/BUILD index 2145ed0e4bc..9cbddcedf20 100644 --- a/vendor/golang.org/x/sys/windows/BUILD +++ b/vendor/golang.org/x/sys/windows/BUILD @@ -20,7 +20,6 @@ go_library( "types_windows.go", "types_windows_386.go", "types_windows_amd64.go", - "types_windows_arm.go", "zerrors_windows.go", "zknownfolderids_windows.go", "zsyscall_windows.go", diff --git a/vendor/golang.org/x/sys/windows/svc/BUILD b/vendor/golang.org/x/sys/windows/svc/BUILD index 1ab636749fa..128ae21a6ce 100644 --- a/vendor/golang.org/x/sys/windows/svc/BUILD +++ b/vendor/golang.org/x/sys/windows/svc/BUILD @@ -10,7 +10,6 @@ go_library( "service.go", "sys_386.s", "sys_amd64.s", - "sys_arm.s", ], importmap = "k8s.io/kubernetes/vendor/golang.org/x/sys/windows/svc", importpath = "golang.org/x/sys/windows/svc", diff --git a/vendor/google.golang.org/grpc/internal/syscall/BUILD b/vendor/google.golang.org/grpc/internal/syscall/BUILD index 9b6243efcd7..3cb389ece97 100644 --- a/vendor/google.golang.org/grpc/internal/syscall/BUILD +++ b/vendor/google.golang.org/grpc/internal/syscall/BUILD @@ -26,9 +26,6 @@ go_library( "@io_bazel_rules_go//go/platform:freebsd": [ "//vendor/google.golang.org/grpc/grpclog:go_default_library", ], - "@io_bazel_rules_go//go/platform:illumos": [ - "//vendor/google.golang.org/grpc/grpclog:go_default_library", - ], "@io_bazel_rules_go//go/platform:ios": [ "//vendor/google.golang.org/grpc/grpclog:go_default_library", ], diff --git a/vendor/k8s.io/utils/mount/BUILD b/vendor/k8s.io/utils/mount/BUILD index 2dded4405aa..f825c2040bc 100644 --- a/vendor/k8s.io/utils/mount/BUILD +++ b/vendor/k8s.io/utils/mount/BUILD @@ -35,9 +35,6 @@ go_library( "@io_bazel_rules_go//go/platform:freebsd": [ "//vendor/k8s.io/utils/io:go_default_library", ], - "@io_bazel_rules_go//go/platform:illumos": [ - "//vendor/k8s.io/utils/io:go_default_library", - ], "@io_bazel_rules_go//go/platform:ios": [ "//vendor/k8s.io/utils/io:go_default_library", ], diff --git a/vendor/k8s.io/utils/nsenter/BUILD b/vendor/k8s.io/utils/nsenter/BUILD index 8c08b176e50..fd100a0d839 100644 --- a/vendor/k8s.io/utils/nsenter/BUILD +++ b/vendor/k8s.io/utils/nsenter/BUILD @@ -26,9 +26,6 @@ go_library( "@io_bazel_rules_go//go/platform:freebsd": [ "//vendor/k8s.io/utils/exec:go_default_library", ], - "@io_bazel_rules_go//go/platform:illumos": [ - "//vendor/k8s.io/utils/exec:go_default_library", - ], "@io_bazel_rules_go//go/platform:ios": [ "//vendor/k8s.io/utils/exec:go_default_library", ], diff --git a/vendor/modules.txt b/vendor/modules.txt index 9a1c384a327..4a6bd5fe055 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -1010,10 +1010,10 @@ github.com/spf13/pflag ## explicit github.com/spf13/viper # github.com/spf13/viper => github.com/spf13/viper v1.4.0 -# github.com/storageos/go-api v0.0.0-20180912212459-343b3eff91fc => github.com/storageos/go-api v0.0.0-20180912212459-343b3eff91fc +# github.com/storageos/go-api v2.2.0+incompatible => github.com/storageos/go-api v2.2.0+incompatible ## explicit github.com/storageos/go-api -# github.com/storageos/go-api => github.com/storageos/go-api v0.0.0-20180912212459-343b3eff91fc +# github.com/storageos/go-api => github.com/storageos/go-api v2.2.0+incompatible github.com/storageos/go-api/netutil github.com/storageos/go-api/serror github.com/storageos/go-api/types From f2e23afcf13fef805ad5341bd7a5625de5982d6c Mon Sep 17 00:00:00 2001 From: Matthew Cary Date: Tue, 9 Jun 2020 21:30:40 +0000 Subject: [PATCH 2/3] Adds filtering of hosts to DialContexts. The provided DialContext wraps existing clients' DialContext in an attempt to preserve any existing timeout configuration. In some cases, we may replace infinite timeouts with golang defaults. - scaleio: tcp connect/keepalive values changed from 0/15 to 30/30 - storageos: no change --- api/api-rules/violation_exceptions.list | 3 + cmd/kube-controller-manager/app/core.go | 26 +++++++- cmd/kube-controller-manager/app/options/BUILD | 2 + .../app/options/options_test.go | 6 ++ .../persistentvolumebindercontroller.go | 20 ++++++ .../apis/config/zz_generated.deepcopy.go | 2 +- pkg/controller/volume/attachdetach/BUILD | 1 + .../attachdetach/attach_detach_controller.go | 36 ++++++---- .../attach_detach_controller_test.go | 5 +- pkg/controller/volume/expand/BUILD | 1 + .../volume/expand/expand_controller.go | 11 +++- .../volume/expand/expand_controller_test.go | 2 +- pkg/controller/volume/persistentvolume/BUILD | 1 + .../volume/persistentvolume/config/types.go | 6 ++ .../config/v1alpha1/defaults.go | 5 ++ .../v1alpha1/zz_generated.conversion.go | 10 +++ .../config/zz_generated.deepcopy.go | 5 ++ .../volume/persistentvolume/pv_controller.go | 4 ++ .../persistentvolume/pv_controller_base.go | 4 ++ .../volume/persistentvolume/volume_host.go | 5 ++ pkg/kubelet/BUILD | 1 + pkg/kubelet/volume_host.go | 6 ++ pkg/proxy/util/utils.go | 65 +++++++++++++++++++ pkg/proxy/util/utils_test.go | 33 ++++++++++ pkg/volume/BUILD | 1 + pkg/volume/plugins.go | 4 ++ pkg/volume/scaleio/BUILD | 1 + pkg/volume/scaleio/sio_client.go | 61 ++++++++++------- pkg/volume/scaleio/sio_mgr.go | 8 ++- pkg/volume/scaleio/sio_mgr_test.go | 7 +- pkg/volume/scaleio/sio_volume.go | 11 ++-- pkg/volume/storageos/BUILD | 1 + pkg/volume/storageos/storageos.go | 8 +-- pkg/volume/storageos/storageos_util.go | 11 +++- pkg/volume/storageos/storageos_util_test.go | 8 ++- pkg/volume/testing/BUILD | 1 + pkg/volume/testing/testing.go | 6 ++ .../config/v1alpha1/types.go | 6 ++ .../config/v1alpha1/zz_generated.deepcopy.go | 10 +++ staging/src/k8s.io/mount-utils/BUILD | 3 - test/integration/volume/attach_detach_test.go | 4 +- 41 files changed, 346 insertions(+), 65 deletions(-) diff --git a/api/api-rules/violation_exceptions.list b/api/api-rules/violation_exceptions.list index 89a22b62a2c..d2fc81b01e9 100644 --- a/api/api-rules/violation_exceptions.list +++ b/api/api-rules/violation_exceptions.list @@ -370,6 +370,7 @@ API rule violation: list_type_missing,k8s.io/apiserver/pkg/apis/audit/v1beta1,Po API rule violation: list_type_missing,k8s.io/apiserver/pkg/apis/audit/v1beta1,PolicyRule,Verbs API rule violation: list_type_missing,k8s.io/kube-controller-manager/config/v1alpha1,GarbageCollectorControllerConfiguration,GCIgnoredResources API rule violation: list_type_missing,k8s.io/kube-controller-manager/config/v1alpha1,GenericControllerManagerConfiguration,Controllers +API rule violation: list_type_missing,k8s.io/kube-controller-manager/config/v1alpha1,PersistentVolumeBinderControllerConfiguration,VolumeHostCIDRDenylist API rule violation: list_type_missing,k8s.io/kube-proxy/config/v1alpha1,KubeProxyConfiguration,NodePortAddresses API rule violation: list_type_missing,k8s.io/kube-proxy/config/v1alpha1,KubeProxyIPVSConfiguration,ExcludeCIDRs API rule violation: list_type_missing,k8s.io/kube-scheduler/config/v1,ExtenderTLSConfig,CAData @@ -569,6 +570,8 @@ API rule violation: names_match,k8s.io/kube-controller-manager/config/v1alpha1,N API rule violation: names_match,k8s.io/kube-controller-manager/config/v1alpha1,NodeLifecycleControllerConfiguration,UnhealthyZoneThreshold API rule violation: names_match,k8s.io/kube-controller-manager/config/v1alpha1,PersistentVolumeBinderControllerConfiguration,PVClaimBinderSyncPeriod API rule violation: names_match,k8s.io/kube-controller-manager/config/v1alpha1,PersistentVolumeBinderControllerConfiguration,VolumeConfiguration +API rule violation: names_match,k8s.io/kube-controller-manager/config/v1alpha1,PersistentVolumeBinderControllerConfiguration,VolumeHostAllowLocalLoopback +API rule violation: names_match,k8s.io/kube-controller-manager/config/v1alpha1,PersistentVolumeBinderControllerConfiguration,VolumeHostCIDRDenylist API rule violation: names_match,k8s.io/kube-controller-manager/config/v1alpha1,PersistentVolumeRecyclerConfiguration,IncrementTimeoutHostPath API rule violation: names_match,k8s.io/kube-controller-manager/config/v1alpha1,PersistentVolumeRecyclerConfiguration,IncrementTimeoutNFS API rule violation: names_match,k8s.io/kube-controller-manager/config/v1alpha1,PersistentVolumeRecyclerConfiguration,MaximumRetry diff --git a/cmd/kube-controller-manager/app/core.go b/cmd/kube-controller-manager/app/core.go index 8d68f00621e..3826ac427a0 100644 --- a/cmd/kube-controller-manager/app/core.go +++ b/cmd/kube-controller-manager/app/core.go @@ -43,6 +43,7 @@ import ( servicecontroller "k8s.io/cloud-provider/controllers/service" "k8s.io/component-base/metrics/prometheus/ratelimiter" csitrans "k8s.io/csi-translation-lib" + "k8s.io/kubernetes/cmd/kube-controller-manager/app/options" "k8s.io/kubernetes/pkg/controller" endpointcontroller "k8s.io/kubernetes/pkg/controller/endpoint" "k8s.io/kubernetes/pkg/controller/garbagecollector" @@ -285,6 +286,12 @@ func startPersistentVolumeBinderController(ctx ControllerContext) (http.Handler, if err != nil { return nil, true, fmt.Errorf("failed to probe volume plugins when starting persistentvolume controller: %v", err) } + filteredDialOptions, err := options.ParseVolumeHostFilters( + ctx.ComponentConfig.PersistentVolumeBinderController.VolumeHostCIDRDenylist, + ctx.ComponentConfig.PersistentVolumeBinderController.VolumeHostAllowLocalLoopback) + if err != nil { + return nil, true, err + } params := persistentvolumecontroller.ControllerParameters{ KubeClient: ctx.ClientBuilder.ClientOrDie("persistent-volume-binder"), SyncPeriod: ctx.ComponentConfig.PersistentVolumeBinderController.PVClaimBinderSyncPeriod.Duration, @@ -297,6 +304,7 @@ func startPersistentVolumeBinderController(ctx ControllerContext) (http.Handler, PodInformer: ctx.InformerFactory.Core().V1().Pods(), NodeInformer: ctx.InformerFactory.Core().V1().Nodes(), EnableDynamicProvisioning: ctx.ComponentConfig.PersistentVolumeBinderController.VolumeConfiguration.EnableDynamicProvisioning, + FilteredDialOptions: filteredDialOptions, } volumeController, volumeControllerErr := persistentvolumecontroller.NewController(params) if volumeControllerErr != nil { @@ -324,6 +332,13 @@ func startAttachDetachController(ctx ControllerContext) (http.Handler, bool, err return nil, true, fmt.Errorf("failed to probe volume plugins when starting attach/detach controller: %v", err) } + filteredDialOptions, err := options.ParseVolumeHostFilters( + ctx.ComponentConfig.PersistentVolumeBinderController.VolumeHostCIDRDenylist, + ctx.ComponentConfig.PersistentVolumeBinderController.VolumeHostAllowLocalLoopback) + if err != nil { + return nil, true, err + } + attachDetachController, attachDetachControllerErr := attachdetach.NewAttachDetachController( ctx.ClientBuilder.ClientOrDie("attachdetach-controller"), @@ -340,6 +355,7 @@ func startAttachDetachController(ctx ControllerContext) (http.Handler, bool, err ctx.ComponentConfig.AttachDetachController.DisableAttachDetachReconcilerSync, ctx.ComponentConfig.AttachDetachController.ReconcilerSyncLoopPeriod.Duration, attachdetach.DefaultTimerConfig, + filteredDialOptions, ) if attachDetachControllerErr != nil { return nil, true, fmt.Errorf("failed to start attach/detach controller: %v", attachDetachControllerErr) @@ -355,6 +371,12 @@ func startVolumeExpandController(ctx ControllerContext) (http.Handler, bool, err return nil, true, fmt.Errorf("failed to probe volume plugins when starting volume expand controller: %v", err) } csiTranslator := csitrans.New() + filteredDialOptions, err := options.ParseVolumeHostFilters( + ctx.ComponentConfig.PersistentVolumeBinderController.VolumeHostCIDRDenylist, + ctx.ComponentConfig.PersistentVolumeBinderController.VolumeHostAllowLocalLoopback) + if err != nil { + return nil, true, err + } expandController, expandControllerErr := expand.NewExpandController( ctx.ClientBuilder.ClientOrDie("expand-controller"), ctx.InformerFactory.Core().V1().PersistentVolumeClaims(), @@ -363,7 +385,9 @@ func startVolumeExpandController(ctx ControllerContext) (http.Handler, bool, err ctx.Cloud, plugins, csiTranslator, - csimigration.NewPluginManager(csiTranslator)) + csimigration.NewPluginManager(csiTranslator), + filteredDialOptions, + ) if expandControllerErr != nil { return nil, true, fmt.Errorf("failed to start volume expand controller: %v", expandControllerErr) diff --git a/cmd/kube-controller-manager/app/options/BUILD b/cmd/kube-controller-manager/app/options/BUILD index ba65d77052b..248338c19e9 100644 --- a/cmd/kube-controller-manager/app/options/BUILD +++ b/cmd/kube-controller-manager/app/options/BUILD @@ -63,6 +63,7 @@ go_library( "//pkg/controller/volume/attachdetach/config:go_default_library", "//pkg/controller/volume/persistentvolume/config:go_default_library", "//pkg/features:go_default_library", + "//pkg/proxy/util:go_default_library", "//staging/src/k8s.io/api/core/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/errors:go_default_library", "//staging/src/k8s.io/apiserver/pkg/server/options:go_default_library", @@ -78,6 +79,7 @@ go_library( "//staging/src/k8s.io/component-base/metrics:go_default_library", "//staging/src/k8s.io/kube-controller-manager/config/v1alpha1:go_default_library", "//vendor/github.com/spf13/pflag:go_default_library", + "//vendor/k8s.io/utils/net:go_default_library", ], ) diff --git a/cmd/kube-controller-manager/app/options/options_test.go b/cmd/kube-controller-manager/app/options/options_test.go index 59e0d252290..872415def16 100644 --- a/cmd/kube-controller-manager/app/options/options_test.go +++ b/cmd/kube-controller-manager/app/options/options_test.go @@ -100,6 +100,8 @@ var args = []string{ "--enable-taint-manager=false", "--cluster-signing-duration=10h", "--flex-volume-plugin-dir=/flex-volume-plugin", + "--volume-host-cidr-denylist=127.0.0.1/28,feed::/16", + "--volume-host-allow-local-loopback=false", "--horizontal-pod-autoscaler-downscale-delay=2m", "--horizontal-pod-autoscaler-sync-period=45s", "--horizontal-pod-autoscaler-upscale-delay=1m", @@ -350,6 +352,8 @@ func TestAddFlags(t *testing.T) { IncrementTimeoutHostPath: 45, }, }, + VolumeHostCIDRDenylist: []string{"127.0.0.1/28", "feed::/16"}, + VolumeHostAllowLocalLoopback: false, }, }, PodGCController: &PodGCControllerOptions{ @@ -589,6 +593,8 @@ func TestApplyTo(t *testing.T) { IncrementTimeoutHostPath: 45, }, }, + VolumeHostCIDRDenylist: []string{"127.0.0.1/28", "feed::/16"}, + VolumeHostAllowLocalLoopback: false, }, PodGCController: podgcconfig.PodGCControllerConfiguration{ TerminatedPodGCThreshold: 12000, diff --git a/cmd/kube-controller-manager/app/options/persistentvolumebindercontroller.go b/cmd/kube-controller-manager/app/options/persistentvolumebindercontroller.go index a09107706dd..4be5a29a9ca 100644 --- a/cmd/kube-controller-manager/app/options/persistentvolumebindercontroller.go +++ b/cmd/kube-controller-manager/app/options/persistentvolumebindercontroller.go @@ -17,9 +17,13 @@ limitations under the License. package options import ( + "fmt" + "github.com/spf13/pflag" persistentvolumeconfig "k8s.io/kubernetes/pkg/controller/volume/persistentvolume/config" + proxyutil "k8s.io/kubernetes/pkg/proxy/util" + netutils "k8s.io/utils/net" ) // PersistentVolumeBinderControllerOptions holds the PersistentVolumeBinderController options. @@ -43,6 +47,8 @@ func (o *PersistentVolumeBinderControllerOptions) AddFlags(fs *pflag.FlagSet) { fs.BoolVar(&o.VolumeConfiguration.EnableHostPathProvisioning, "enable-hostpath-provisioner", o.VolumeConfiguration.EnableHostPathProvisioning, "Enable HostPath PV provisioning when running without a cloud provider. This allows testing and development of provisioning features. HostPath provisioning is not supported in any way, won't work in a multi-node cluster, and should not be used for anything other than testing or development.") fs.BoolVar(&o.VolumeConfiguration.EnableDynamicProvisioning, "enable-dynamic-provisioning", o.VolumeConfiguration.EnableDynamicProvisioning, "Enable dynamic provisioning for environments that support it.") fs.StringVar(&o.VolumeConfiguration.FlexVolumePluginDir, "flex-volume-plugin-dir", o.VolumeConfiguration.FlexVolumePluginDir, "Full path of the directory in which the flex volume plugin should search for additional third party volume plugins.") + fs.StringSliceVar(&o.VolumeHostCIDRDenylist, "volume-host-cidr-denylist", o.VolumeHostCIDRDenylist, "A comma-separated list of CIDR ranges to avoid from volume plugins.") + fs.BoolVar(&o.VolumeHostAllowLocalLoopback, "volume-host-allow-local-loopback", o.VolumeHostAllowLocalLoopback, "If false, deny local loopback IPs in addition to any CIDR ranges in --volume-host-cidr-denylist") } // ApplyTo fills up PersistentVolumeBinderController config with options. @@ -53,6 +59,8 @@ func (o *PersistentVolumeBinderControllerOptions) ApplyTo(cfg *persistentvolumec cfg.PVClaimBinderSyncPeriod = o.PVClaimBinderSyncPeriod cfg.VolumeConfiguration = o.VolumeConfiguration + cfg.VolumeHostCIDRDenylist = o.VolumeHostCIDRDenylist + cfg.VolumeHostAllowLocalLoopback = o.VolumeHostAllowLocalLoopback return nil } @@ -64,5 +72,17 @@ func (o *PersistentVolumeBinderControllerOptions) Validate() []error { } errs := []error{} + if _, err := ParseVolumeHostFilters(o.VolumeHostCIDRDenylist, o.VolumeHostAllowLocalLoopback); err != nil { + errs = append(errs, fmt.Errorf("Bad --volume-host-ip-denylist/--volume-host-allow-local-loopback %w", err)) + } return errs } + +// ParseVolumeHostFilters process the --volume-host-ip-denylist and --volume-host-allow-local-loopback flags. +func ParseVolumeHostFilters(denylist []string, allowLocalLoopback bool) (*proxyutil.FilteredDialOptions, error) { + denyCIDRs, err := netutils.ParseCIDRs(denylist) + if err != nil { + return nil, err + } + return &proxyutil.FilteredDialOptions{DialHostCIDRDenylist: denyCIDRs, AllowLocalLoopback: allowLocalLoopback}, nil +} diff --git a/pkg/controller/apis/config/zz_generated.deepcopy.go b/pkg/controller/apis/config/zz_generated.deepcopy.go index 0f5dd63275e..cba4ff2b8d0 100644 --- a/pkg/controller/apis/config/zz_generated.deepcopy.go +++ b/pkg/controller/apis/config/zz_generated.deepcopy.go @@ -123,7 +123,7 @@ func (in *KubeControllerManagerConfiguration) DeepCopyInto(out *KubeControllerMa out.NamespaceController = in.NamespaceController out.NodeIPAMController = in.NodeIPAMController out.NodeLifecycleController = in.NodeLifecycleController - out.PersistentVolumeBinderController = in.PersistentVolumeBinderController + in.PersistentVolumeBinderController.DeepCopyInto(&out.PersistentVolumeBinderController) out.PodGCController = in.PodGCController out.ReplicaSetController = in.ReplicaSetController out.ReplicationController = in.ReplicationController diff --git a/pkg/controller/volume/attachdetach/BUILD b/pkg/controller/volume/attachdetach/BUILD index cb412ec61f8..9e17ac460be 100644 --- a/pkg/controller/volume/attachdetach/BUILD +++ b/pkg/controller/volume/attachdetach/BUILD @@ -19,6 +19,7 @@ go_library( "//pkg/controller/volume/attachdetach/util:go_default_library", "//pkg/controller/volume/common:go_default_library", "//pkg/features:go_default_library", + "//pkg/proxy/util:go_default_library", "//pkg/volume:go_default_library", "//pkg/volume/csimigration:go_default_library", "//pkg/volume/util:go_default_library", diff --git a/pkg/controller/volume/attachdetach/attach_detach_controller.go b/pkg/controller/volume/attachdetach/attach_detach_controller.go index dfcfe7b50d9..e5d703f5114 100644 --- a/pkg/controller/volume/attachdetach/attach_detach_controller.go +++ b/pkg/controller/volume/attachdetach/attach_detach_controller.go @@ -55,6 +55,7 @@ import ( "k8s.io/kubernetes/pkg/controller/volume/attachdetach/util" "k8s.io/kubernetes/pkg/controller/volume/common" "k8s.io/kubernetes/pkg/features" + proxyutil "k8s.io/kubernetes/pkg/proxy/util" "k8s.io/kubernetes/pkg/volume" "k8s.io/kubernetes/pkg/volume/csimigration" volumeutil "k8s.io/kubernetes/pkg/volume/util" @@ -117,21 +118,23 @@ func NewAttachDetachController( prober volume.DynamicPluginProber, disableReconciliationSync bool, reconcilerSyncDuration time.Duration, - timerConfig TimerConfig) (AttachDetachController, error) { + timerConfig TimerConfig, + filteredDialOptions *proxyutil.FilteredDialOptions) (AttachDetachController, error) { adc := &attachDetachController{ - kubeClient: kubeClient, - pvcLister: pvcInformer.Lister(), - pvcsSynced: pvcInformer.Informer().HasSynced, - pvLister: pvInformer.Lister(), - pvsSynced: pvInformer.Informer().HasSynced, - podLister: podInformer.Lister(), - podsSynced: podInformer.Informer().HasSynced, - podIndexer: podInformer.Informer().GetIndexer(), - nodeLister: nodeInformer.Lister(), - nodesSynced: nodeInformer.Informer().HasSynced, - cloud: cloud, - pvcQueue: workqueue.NewNamedRateLimitingQueue(workqueue.DefaultControllerRateLimiter(), "pvcs"), + kubeClient: kubeClient, + pvcLister: pvcInformer.Lister(), + pvcsSynced: pvcInformer.Informer().HasSynced, + pvLister: pvInformer.Lister(), + pvsSynced: pvInformer.Informer().HasSynced, + podLister: podInformer.Lister(), + podsSynced: podInformer.Informer().HasSynced, + podIndexer: podInformer.Informer().GetIndexer(), + nodeLister: nodeInformer.Lister(), + nodesSynced: nodeInformer.Informer().HasSynced, + cloud: cloud, + pvcQueue: workqueue.NewNamedRateLimitingQueue(workqueue.DefaultControllerRateLimiter(), "pvcs"), + filteredDialOptions: filteredDialOptions, } if utilfeature.DefaultFeatureGate.Enabled(features.CSIMigration) && @@ -313,6 +316,9 @@ type attachDetachController struct { // intreeToCSITranslator translates from in-tree volume specs to CSI intreeToCSITranslator csimigration.InTreeToCSITranslator + + // filteredDialOptions configures any dialing done by the controller. + filteredDialOptions *proxyutil.FilteredDialOptions } func (adc *attachDetachController) Run(stopCh <-chan struct{}) { @@ -813,6 +819,10 @@ func (adc *attachDetachController) GetSubpather() subpath.Interface { return nil } +func (adc *attachDetachController) GetFilteredDialOptions() *proxyutil.FilteredDialOptions { + return adc.filteredDialOptions +} + func (adc *attachDetachController) GetCSIDriverLister() storagelistersv1.CSIDriverLister { return adc.csiDriverLister } diff --git a/pkg/controller/volume/attachdetach/attach_detach_controller_test.go b/pkg/controller/volume/attachdetach/attach_detach_controller_test.go index 16988563438..a321478d9c5 100644 --- a/pkg/controller/volume/attachdetach/attach_detach_controller_test.go +++ b/pkg/controller/volume/attachdetach/attach_detach_controller_test.go @@ -55,6 +55,7 @@ func Test_NewAttachDetachController_Positive(t *testing.T) { false, 5*time.Second, DefaultTimerConfig, + nil, /* filteredDialOptions */ ) // Assert @@ -175,7 +176,9 @@ func attachDetachRecoveryTestCase(t *testing.T, extraPods1 []*v1.Pod, extraPods2 prober, false, 1*time.Second, - DefaultTimerConfig) + DefaultTimerConfig, + nil, /* filteredDialOptions */ + ) if err != nil { t.Fatalf("Run failed with error. Expected: Actual: <%v>", err) diff --git a/pkg/controller/volume/expand/BUILD b/pkg/controller/volume/expand/BUILD index b391fce2246..c4068adee66 100644 --- a/pkg/controller/volume/expand/BUILD +++ b/pkg/controller/volume/expand/BUILD @@ -9,6 +9,7 @@ go_library( deps = [ "//pkg/apis/core/v1/helper:go_default_library", "//pkg/controller/volume/events:go_default_library", + "//pkg/proxy/util:go_default_library", "//pkg/volume:go_default_library", "//pkg/volume/csimigration:go_default_library", "//pkg/volume/util:go_default_library", diff --git a/pkg/controller/volume/expand/expand_controller.go b/pkg/controller/volume/expand/expand_controller.go index 7d4e833a558..4fda7e15019 100644 --- a/pkg/controller/volume/expand/expand_controller.go +++ b/pkg/controller/volume/expand/expand_controller.go @@ -47,6 +47,7 @@ import ( cloudprovider "k8s.io/cloud-provider" v1helper "k8s.io/kubernetes/pkg/apis/core/v1/helper" "k8s.io/kubernetes/pkg/controller/volume/events" + proxyutil "k8s.io/kubernetes/pkg/proxy/util" "k8s.io/kubernetes/pkg/volume" "k8s.io/kubernetes/pkg/volume/csimigration" "k8s.io/kubernetes/pkg/volume/util" @@ -104,6 +105,8 @@ type expandController struct { translator CSINameTranslator csiMigratedPluginManager csimigration.PluginManager + + filteredDialOptions *proxyutil.FilteredDialOptions } // NewExpandController expands the pvs @@ -115,7 +118,8 @@ func NewExpandController( cloud cloudprovider.Interface, plugins []volume.VolumePlugin, translator CSINameTranslator, - csiMigratedPluginManager csimigration.PluginManager) (ExpandController, error) { + csiMigratedPluginManager csimigration.PluginManager, + filteredDialOptions *proxyutil.FilteredDialOptions) (ExpandController, error) { expc := &expandController{ kubeClient: kubeClient, @@ -129,6 +133,7 @@ func NewExpandController( queue: workqueue.NewNamedRateLimitingQueue(workqueue.DefaultControllerRateLimiter(), "volume_expand"), translator: translator, csiMigratedPluginManager: csiMigratedPluginManager, + filteredDialOptions: filteredDialOptions, } if err := expc.volumePluginMgr.InitPlugins(plugins, nil, expc); err != nil { @@ -449,3 +454,7 @@ func (expc *expandController) GetSubpather() subpath.Interface { // not needed for expand controller return nil } + +func (expc *expandController) GetFilteredDialOptions() *proxyutil.FilteredDialOptions { + return expc.filteredDialOptions +} diff --git a/pkg/controller/volume/expand/expand_controller_test.go b/pkg/controller/volume/expand/expand_controller_test.go index e0d0a52c7c4..df400aa0460 100644 --- a/pkg/controller/volume/expand/expand_controller_test.go +++ b/pkg/controller/volume/expand/expand_controller_test.go @@ -126,7 +126,7 @@ func TestSyncHandler(t *testing.T) { informerFactory.Storage().V1().StorageClasses().Informer().GetIndexer().Add(tc.storageClass) } translator := csitrans.New() - expc, err := NewExpandController(fakeKubeClient, pvcInformer, pvInformer, storageClassInformer, nil, allPlugins, translator, csimigration.NewPluginManager(translator)) + expc, err := NewExpandController(fakeKubeClient, pvcInformer, pvInformer, storageClassInformer, nil, allPlugins, translator, csimigration.NewPluginManager(translator), nil) if err != nil { t.Fatalf("error creating expand controller : %v", err) } diff --git a/pkg/controller/volume/persistentvolume/BUILD b/pkg/controller/volume/persistentvolume/BUILD index 35584cc4406..dfc348bdbed 100644 --- a/pkg/controller/volume/persistentvolume/BUILD +++ b/pkg/controller/volume/persistentvolume/BUILD @@ -23,6 +23,7 @@ go_library( "//pkg/controller/volume/persistentvolume/metrics:go_default_library", "//pkg/controller/volume/persistentvolume/util:go_default_library", "//pkg/features:go_default_library", + "//pkg/proxy/util:go_default_library", "//pkg/util/goroutinemap:go_default_library", "//pkg/util/goroutinemap/exponentialbackoff:go_default_library", "//pkg/volume:go_default_library", diff --git a/pkg/controller/volume/persistentvolume/config/types.go b/pkg/controller/volume/persistentvolume/config/types.go index 11b28b0a53c..c840bd0b293 100644 --- a/pkg/controller/volume/persistentvolume/config/types.go +++ b/pkg/controller/volume/persistentvolume/config/types.go @@ -28,6 +28,12 @@ type PersistentVolumeBinderControllerConfiguration struct { PVClaimBinderSyncPeriod metav1.Duration // volumeConfiguration holds configuration for volume related features. VolumeConfiguration VolumeConfiguration + // VolumeHostCIDRDenylist is a list of CIDRs that should not be reachable by the + // controller from plugins. + VolumeHostCIDRDenylist []string + // VolumeHostAllowLocalLoopback indicates if local loopback hosts (127.0.0.1, etc) + // should be allowed from plugins. + VolumeHostAllowLocalLoopback bool } // VolumeConfiguration contains *all* enumerated flags meant to configure all volume diff --git a/pkg/controller/volume/persistentvolume/config/v1alpha1/defaults.go b/pkg/controller/volume/persistentvolume/config/v1alpha1/defaults.go index ce9481ac0cb..5fb6cbfcda5 100644 --- a/pkg/controller/volume/persistentvolume/config/v1alpha1/defaults.go +++ b/pkg/controller/volume/persistentvolume/config/v1alpha1/defaults.go @@ -39,6 +39,11 @@ func RecommendedDefaultPersistentVolumeBinderControllerConfiguration(obj *kubect obj.PVClaimBinderSyncPeriod = metav1.Duration{Duration: 15 * time.Second} } + if obj.VolumeHostAllowLocalLoopback == nil { + trueValue := true + obj.VolumeHostAllowLocalLoopback = &trueValue + } + // Use the default VolumeConfiguration options. RecommendedDefaultVolumeConfiguration(&obj.VolumeConfiguration) } diff --git a/pkg/controller/volume/persistentvolume/config/v1alpha1/zz_generated.conversion.go b/pkg/controller/volume/persistentvolume/config/v1alpha1/zz_generated.conversion.go index 910b6b0f5ce..e1cf08855b0 100644 --- a/pkg/controller/volume/persistentvolume/config/v1alpha1/zz_generated.conversion.go +++ b/pkg/controller/volume/persistentvolume/config/v1alpha1/zz_generated.conversion.go @@ -21,6 +21,8 @@ limitations under the License. package v1alpha1 import ( + unsafe "unsafe" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" conversion "k8s.io/apimachinery/pkg/conversion" runtime "k8s.io/apimachinery/pkg/runtime" @@ -105,6 +107,10 @@ func autoConvert_v1alpha1_PersistentVolumeBinderControllerConfiguration_To_confi if err := Convert_v1alpha1_VolumeConfiguration_To_config_VolumeConfiguration(&in.VolumeConfiguration, &out.VolumeConfiguration, s); err != nil { return err } + out.VolumeHostCIDRDenylist = *(*[]string)(unsafe.Pointer(&in.VolumeHostCIDRDenylist)) + if err := v1.Convert_Pointer_bool_To_bool(&in.VolumeHostAllowLocalLoopback, &out.VolumeHostAllowLocalLoopback, s); err != nil { + return err + } return nil } @@ -113,6 +119,10 @@ func autoConvert_config_PersistentVolumeBinderControllerConfiguration_To_v1alpha if err := Convert_config_VolumeConfiguration_To_v1alpha1_VolumeConfiguration(&in.VolumeConfiguration, &out.VolumeConfiguration, s); err != nil { return err } + out.VolumeHostCIDRDenylist = *(*[]string)(unsafe.Pointer(&in.VolumeHostCIDRDenylist)) + if err := v1.Convert_bool_To_Pointer_bool(&in.VolumeHostAllowLocalLoopback, &out.VolumeHostAllowLocalLoopback, s); err != nil { + return err + } return nil } diff --git a/pkg/controller/volume/persistentvolume/config/zz_generated.deepcopy.go b/pkg/controller/volume/persistentvolume/config/zz_generated.deepcopy.go index 86c2e99e165..47ce776175b 100644 --- a/pkg/controller/volume/persistentvolume/config/zz_generated.deepcopy.go +++ b/pkg/controller/volume/persistentvolume/config/zz_generated.deepcopy.go @@ -25,6 +25,11 @@ func (in *PersistentVolumeBinderControllerConfiguration) DeepCopyInto(out *Persi *out = *in out.PVClaimBinderSyncPeriod = in.PVClaimBinderSyncPeriod out.VolumeConfiguration = in.VolumeConfiguration + if in.VolumeHostCIDRDenylist != nil { + in, out := &in.VolumeHostCIDRDenylist, &out.VolumeHostCIDRDenylist + *out = make([]string, len(*in)) + copy(*out, *in) + } return } diff --git a/pkg/controller/volume/persistentvolume/pv_controller.go b/pkg/controller/volume/persistentvolume/pv_controller.go index 61b1ed1f3ef..28ee91912d3 100644 --- a/pkg/controller/volume/persistentvolume/pv_controller.go +++ b/pkg/controller/volume/persistentvolume/pv_controller.go @@ -45,6 +45,7 @@ import ( "k8s.io/kubernetes/pkg/controller/volume/persistentvolume/metrics" pvutil "k8s.io/kubernetes/pkg/controller/volume/persistentvolume/util" "k8s.io/kubernetes/pkg/features" + proxyutil "k8s.io/kubernetes/pkg/proxy/util" "k8s.io/kubernetes/pkg/util/goroutinemap" "k8s.io/kubernetes/pkg/util/goroutinemap/exponentialbackoff" vol "k8s.io/kubernetes/pkg/volume" @@ -235,6 +236,9 @@ type PersistentVolumeController struct { translator CSINameTranslator csiMigratedPluginManager CSIMigratedPluginManager + + // filteredDialOptions configures any dialing done by the controller. + filteredDialOptions *proxyutil.FilteredDialOptions } // syncClaim is the main controller method to decide what to do with a claim. diff --git a/pkg/controller/volume/persistentvolume/pv_controller_base.go b/pkg/controller/volume/persistentvolume/pv_controller_base.go index 5747db35fd4..38e1d36e2bb 100644 --- a/pkg/controller/volume/persistentvolume/pv_controller_base.go +++ b/pkg/controller/volume/persistentvolume/pv_controller_base.go @@ -44,6 +44,7 @@ import ( "k8s.io/kubernetes/pkg/controller/volume/common" "k8s.io/kubernetes/pkg/controller/volume/persistentvolume/metrics" pvutil "k8s.io/kubernetes/pkg/controller/volume/persistentvolume/util" + proxyutil "k8s.io/kubernetes/pkg/proxy/util" "k8s.io/kubernetes/pkg/util/goroutinemap" vol "k8s.io/kubernetes/pkg/volume" "k8s.io/kubernetes/pkg/volume/csimigration" @@ -70,6 +71,7 @@ type ControllerParameters struct { NodeInformer coreinformers.NodeInformer EventRecorder record.EventRecorder EnableDynamicProvisioning bool + FilteredDialOptions *proxyutil.FilteredDialOptions } // NewController creates a new PersistentVolume controller @@ -142,6 +144,8 @@ func NewController(p ControllerParameters) (*PersistentVolumeController, error) controller.translator = csiTranslator controller.csiMigratedPluginManager = csimigration.NewPluginManager(csiTranslator) + controller.filteredDialOptions = p.FilteredDialOptions + return controller, nil } diff --git a/pkg/controller/volume/persistentvolume/volume_host.go b/pkg/controller/volume/persistentvolume/volume_host.go index d75333f63d3..4030a844bcd 100644 --- a/pkg/controller/volume/persistentvolume/volume_host.go +++ b/pkg/controller/volume/persistentvolume/volume_host.go @@ -30,6 +30,7 @@ import ( clientset "k8s.io/client-go/kubernetes" "k8s.io/client-go/tools/record" cloudprovider "k8s.io/cloud-provider" + proxyutil "k8s.io/kubernetes/pkg/proxy/util" vol "k8s.io/kubernetes/pkg/volume" "k8s.io/kubernetes/pkg/volume/util/subpath" ) @@ -138,3 +139,7 @@ func (ctrl *PersistentVolumeController) GetSubpather() subpath.Interface { // No volume plugin needs Subpaths in PV controller. return nil } + +func (ctrl *PersistentVolumeController) GetFilteredDialOptions() *proxyutil.FilteredDialOptions { + return ctrl.filteredDialOptions +} diff --git a/pkg/kubelet/BUILD b/pkg/kubelet/BUILD index 669b074c798..d13a5f03e55 100644 --- a/pkg/kubelet/BUILD +++ b/pkg/kubelet/BUILD @@ -98,6 +98,7 @@ go_library( "//pkg/kubelet/util/queue:go_default_library", "//pkg/kubelet/util/sliceutils:go_default_library", "//pkg/kubelet/volumemanager:go_default_library", + "//pkg/proxy/util:go_default_library", "//pkg/security/apparmor:go_default_library", "//pkg/security/podsecuritypolicy/sysctl:go_default_library", "//pkg/util/iptables:go_default_library", diff --git a/pkg/kubelet/volume_host.go b/pkg/kubelet/volume_host.go index b9b6a0eae7b..c4e0361577d 100644 --- a/pkg/kubelet/volume_host.go +++ b/pkg/kubelet/volume_host.go @@ -38,6 +38,7 @@ import ( "k8s.io/kubernetes/pkg/kubelet/configmap" "k8s.io/kubernetes/pkg/kubelet/secret" "k8s.io/kubernetes/pkg/kubelet/token" + proxyutil "k8s.io/kubernetes/pkg/proxy/util" "k8s.io/kubernetes/pkg/volume" "k8s.io/kubernetes/pkg/volume/util" "k8s.io/kubernetes/pkg/volume/util/hostutil" @@ -151,6 +152,11 @@ func (kvh *kubeletVolumeHost) GetSubpather() subpath.Interface { return kvh.kubelet.subpather } +func (kvh *kubeletVolumeHost) GetFilteredDialOptions() *proxyutil.FilteredDialOptions { + // FilteredDial is not needed in the kubelet. + return nil +} + func (kvh *kubeletVolumeHost) GetHostUtil() hostutil.HostUtils { return kvh.kubelet.hostutil } diff --git a/pkg/proxy/util/utils.go b/pkg/proxy/util/utils.go index c2bf2c97d15..4cf4e21eaba 100644 --- a/pkg/proxy/util/utils.go +++ b/pkg/proxy/util/utils.go @@ -21,6 +21,7 @@ import ( "errors" "fmt" "net" + "net/http" "strconv" v1 "k8s.io/api/core/v1" @@ -124,6 +125,16 @@ func IsProxyableHostname(ctx context.Context, resolv Resolver, hostname string) return nil } +// IsAllowedHost checks if the given IP host address is in a network in the denied list. +func IsAllowedHost(host net.IP, denied []*net.IPNet) error { + for _, ipNet := range denied { + if ipNet.Contains(host) { + return ErrAddressNotAllowed + } + } + return nil +} + // GetLocalAddrs returns a list of all network addresses on the local system func GetLocalAddrs() ([]net.IP, error) { var localAddrs []net.IP @@ -311,3 +322,57 @@ func EnsureSysctl(sysctl utilsysctl.Interface, name string, newVal int) error { } return nil } + +// DialContext is a dial function matching the signature of net.Dialer.DialContext. +type DialContext = func(context.Context, string, string) (net.Conn, error) + +// FilteredDialOptions configures how a DialContext is wrapped by NewFilteredDialContext. +type FilteredDialOptions struct { + // DialHostIPDenylist restricts hosts from being dialed. + DialHostCIDRDenylist []*net.IPNet + // AllowLocalLoopback controls connections to local loopback hosts (as defined by + // IsProxyableIP). + AllowLocalLoopback bool +} + +// NewFilteredDialContext returns a DialContext function that filters connections based on a FilteredDialOptions. +func NewFilteredDialContext(wrapped DialContext, resolv Resolver, opts *FilteredDialOptions) DialContext { + if wrapped == nil { + wrapped = http.DefaultTransport.(*http.Transport).DialContext + } + if opts == nil { + // Do no filtering + return wrapped + } + if resolv == nil { + resolv = net.DefaultResolver + } + if len(opts.DialHostCIDRDenylist) == 0 && opts.AllowLocalLoopback { + // Do no filtering. + return wrapped + } + return func(ctx context.Context, network, address string) (net.Conn, error) { + resp, err := resolv.LookupIPAddr(ctx, address) + if err != nil { + return nil, err + } + + if len(resp) == 0 { + return nil, ErrNoAddresses + } + + for _, host := range resp { + if !opts.AllowLocalLoopback { + if err := isProxyableIP(host.IP); err != nil { + return nil, err + } + } + if opts.DialHostCIDRDenylist != nil { + if err := IsAllowedHost(host.IP, opts.DialHostCIDRDenylist); err != nil { + return nil, err + } + } + } + return wrapped(ctx, network, address) + } +} diff --git a/pkg/proxy/util/utils_test.go b/pkg/proxy/util/utils_test.go index e563a8da888..e7fa4dcea54 100644 --- a/pkg/proxy/util/utils_test.go +++ b/pkg/proxy/util/utils_test.go @@ -163,6 +163,39 @@ func TestIsProxyableHostname(t *testing.T) { } } +func TestIsAllowedHost(t *testing.T) { + testCases := []struct { + ip string + denied []string + want error + }{ + {"8.8.8.8", []string{}, nil}, + {"169.254.169.254", []string{"169.0.0.0/8"}, ErrAddressNotAllowed}, + {"169.254.169.254", []string{"fce8::/15", "169.254.169.0/24"}, ErrAddressNotAllowed}, + {"fce9:beef::", []string{"fce8::/15", "169.254.169.0/24"}, ErrAddressNotAllowed}, + {"127.0.0.1", []string{"127.0.0.1/32"}, ErrAddressNotAllowed}, + {"34.107.204.206", []string{"fce8::/15"}, nil}, + {"fce9:beef::", []string{"127.0.0.1/32"}, nil}, + {"34.107.204.206", []string{"127.0.0.1/32"}, nil}, + {"127.0.0.1", []string{}, nil}, + } + + for i := range testCases { + var denyList []*net.IPNet + for _, cidrStr := range testCases[i].denied { + _, ipNet, err := net.ParseCIDR(cidrStr) + if err != nil { + t.Fatalf("bad IP for test case: %v: %v", cidrStr, err) + } + denyList = append(denyList, ipNet) + } + got := IsAllowedHost(net.ParseIP(testCases[i].ip), denyList) + if testCases[i].want != got { + t.Errorf("case %d: expected %v, got %v", i, testCases[i].want, got) + } + } +} + func TestShouldSkipService(t *testing.T) { testCases := []struct { service *v1.Service diff --git a/pkg/volume/BUILD b/pkg/volume/BUILD index 61c22c29bdd..c195f857c2a 100644 --- a/pkg/volume/BUILD +++ b/pkg/volume/BUILD @@ -18,6 +18,7 @@ go_library( importpath = "k8s.io/kubernetes/pkg/volume", visibility = ["//visibility:public"], deps = [ + "//pkg/proxy/util:go_default_library", "//pkg/volume/util/fs:go_default_library", "//pkg/volume/util/hostutil:go_default_library", "//pkg/volume/util/recyclerclient:go_default_library", diff --git a/pkg/volume/plugins.go b/pkg/volume/plugins.go index 9feccd04286..20edbb3ef60 100644 --- a/pkg/volume/plugins.go +++ b/pkg/volume/plugins.go @@ -39,6 +39,7 @@ import ( "k8s.io/client-go/tools/cache" "k8s.io/client-go/tools/record" cloudprovider "k8s.io/cloud-provider" + proxyutil "k8s.io/kubernetes/pkg/proxy/util" "k8s.io/kubernetes/pkg/volume/util/hostutil" "k8s.io/kubernetes/pkg/volume/util/recyclerclient" "k8s.io/kubernetes/pkg/volume/util/subpath" @@ -450,6 +451,9 @@ type VolumeHost interface { // Returns an interface that should be used to execute subpath operations GetSubpather() subpath.Interface + + // Returns options to pass for proxyutil filtered dialers. + GetFilteredDialOptions() *proxyutil.FilteredDialOptions } // VolumePluginMgr tracks registered plugins. diff --git a/pkg/volume/scaleio/BUILD b/pkg/volume/scaleio/BUILD index d6aabc7d642..d5dd453e1f1 100644 --- a/pkg/volume/scaleio/BUILD +++ b/pkg/volume/scaleio/BUILD @@ -41,6 +41,7 @@ go_library( ], importpath = "k8s.io/kubernetes/pkg/volume/scaleio", deps = [ + "//pkg/proxy/util:go_default_library", "//pkg/volume:go_default_library", "//pkg/volume/util:go_default_library", "//staging/src/k8s.io/api/core/v1:go_default_library", diff --git a/pkg/volume/scaleio/sio_client.go b/pkg/volume/scaleio/sio_client.go index cdd6c2db631..a9c83267194 100644 --- a/pkg/volume/scaleio/sio_client.go +++ b/pkg/volume/scaleio/sio_client.go @@ -20,6 +20,7 @@ import ( "errors" "fmt" "io/ioutil" + "net/http" "os" "path/filepath" "regexp" @@ -33,6 +34,7 @@ import ( sio "github.com/thecodeteam/goscaleio" siotypes "github.com/thecodeteam/goscaleio/types/v1" "k8s.io/klog/v2" + proxyutil "k8s.io/kubernetes/pkg/proxy/util" ) var ( @@ -56,37 +58,39 @@ type sioInterface interface { } type sioClient struct { - client *sio.Client - gateway string - username string - password string - insecure bool - certsEnabled bool - system *siotypes.System - sysName string - sysClient *sio.System - protectionDomain *siotypes.ProtectionDomain - pdName string - pdClient *sio.ProtectionDomain - storagePool *siotypes.StoragePool - spName string - spClient *sio.StoragePool - provisionMode string - sdcPath string - sdcGUID string - instanceID string - inited bool - diskRegex *regexp.Regexp - mtx sync.Mutex - exec utilexec.Interface + client *sio.Client + gateway string + username string + password string + insecure bool + certsEnabled bool + system *siotypes.System + sysName string + sysClient *sio.System + protectionDomain *siotypes.ProtectionDomain + pdName string + pdClient *sio.ProtectionDomain + storagePool *siotypes.StoragePool + spName string + spClient *sio.StoragePool + provisionMode string + sdcPath string + sdcGUID string + instanceID string + inited bool + diskRegex *regexp.Regexp + mtx sync.Mutex + exec utilexec.Interface + filteredDialOptions *proxyutil.FilteredDialOptions } -func newSioClient(gateway, username, password string, sslEnabled bool, exec utilexec.Interface) (*sioClient, error) { +func newSioClient(gateway, username, password string, sslEnabled bool, exec utilexec.Interface, filteredDialOptions *proxyutil.FilteredDialOptions) (*sioClient, error) { client := new(sioClient) client.gateway = gateway client.username = username client.password = password client.exec = exec + client.filteredDialOptions = filteredDialOptions if sslEnabled { client.insecure = false client.certsEnabled = true @@ -118,6 +122,15 @@ func (c *sioClient) init() error { klog.Error(log("failed to create client: %v", err)) return err } + transport, ok := client.Http.Transport.(*http.Transport) + if !ok { + return errors.New("could not set http.Transport options for scaleio client") + } + //lint:ignore SA1019 DialTLS must be used to support legacy clients. + if transport.DialTLS != nil { + return errors.New("DialTLS will be used instead of DialContext") + } + transport.DialContext = proxyutil.NewFilteredDialContext(transport.DialContext, nil, c.filteredDialOptions) c.client = client if _, err = c.client.Authenticate( &sio.ConfigConnect{ diff --git a/pkg/volume/scaleio/sio_mgr.go b/pkg/volume/scaleio/sio_mgr.go index d353fe58ff3..159f040e23a 100644 --- a/pkg/volume/scaleio/sio_mgr.go +++ b/pkg/volume/scaleio/sio_mgr.go @@ -21,6 +21,7 @@ import ( "strconv" "k8s.io/klog/v2" + "k8s.io/kubernetes/pkg/volume" utilexec "k8s.io/utils/exec" siotypes "github.com/thecodeteam/goscaleio/types/v1" @@ -30,9 +31,10 @@ type sioMgr struct { client sioInterface configData map[string]string exec utilexec.Interface + host volume.VolumeHost } -func newSioMgr(configs map[string]string, exec utilexec.Interface) (*sioMgr, error) { +func newSioMgr(configs map[string]string, host volume.VolumeHost, exec utilexec.Interface) (*sioMgr, error) { if configs == nil { return nil, errors.New("missing configuration data") } @@ -41,7 +43,7 @@ func newSioMgr(configs map[string]string, exec utilexec.Interface) (*sioMgr, err configs[confKey.sdcRootPath] = defaultString(configs[confKey.sdcRootPath], sdcRootPath) configs[confKey.storageMode] = defaultString(configs[confKey.storageMode], "ThinProvisioned") - mgr := &sioMgr{configData: configs, exec: exec} + mgr := &sioMgr{configData: configs, host: host, exec: exec} return mgr, nil } @@ -61,7 +63,7 @@ func (m *sioMgr) getClient() (sioInterface, error) { certsEnabled := b klog.V(4).Info(log("creating new client for gateway %s", gateway)) - client, err := newSioClient(gateway, username, password, certsEnabled, m.exec) + client, err := newSioClient(gateway, username, password, certsEnabled, m.exec, m.host.GetFilteredDialOptions()) if err != nil { klog.Error(log("failed to create scaleio client: %v", err)) return nil, err diff --git a/pkg/volume/scaleio/sio_mgr_test.go b/pkg/volume/scaleio/sio_mgr_test.go index f818d2359b3..403b1300c7a 100644 --- a/pkg/volume/scaleio/sio_mgr_test.go +++ b/pkg/volume/scaleio/sio_mgr_test.go @@ -22,6 +22,7 @@ import ( "time" siotypes "github.com/thecodeteam/goscaleio/types/v1" + volumetesting "k8s.io/kubernetes/pkg/volume/testing" "k8s.io/utils/exec/testing" ) @@ -42,7 +43,8 @@ var ( ) func newTestMgr(t *testing.T) *sioMgr { - mgr, err := newSioMgr(fakeConfig, &testingexec.FakeExec{}) + host := volumetesting.NewFakeVolumeHost(t, "/tmp/fake", nil, nil) + mgr, err := newSioMgr(fakeConfig, host, &testingexec.FakeExec{}) if err != nil { t.Error(err) } @@ -51,7 +53,8 @@ func newTestMgr(t *testing.T) *sioMgr { } func TestMgrNew(t *testing.T) { - mgr, err := newSioMgr(fakeConfig, &testingexec.FakeExec{}) + host := volumetesting.NewFakeVolumeHost(t, "/tmp/fake", nil, nil) + mgr, err := newSioMgr(fakeConfig, host, &testingexec.FakeExec{}) if err != nil { t.Fatal(err) } diff --git a/pkg/volume/scaleio/sio_volume.go b/pkg/volume/scaleio/sio_volume.go index 337dba9cb0d..f6d6da975ac 100644 --- a/pkg/volume/scaleio/sio_volume.go +++ b/pkg/volume/scaleio/sio_volume.go @@ -405,7 +405,7 @@ func (v *sioVolume) setSioMgr() error { klog.Error(log("failed to retrieve sdc guid: %v", err)) return err } - mgr, err := newSioMgr(configData, v.plugin.host.GetExec(v.plugin.GetPluginName())) + mgr, err := newSioMgr(configData, v.plugin.host, v.plugin.host.GetExec(v.plugin.GetPluginName())) if err != nil { klog.Error(log("failed to reset sio manager: %v", err)) @@ -444,8 +444,7 @@ func (v *sioVolume) resetSioMgr() error { klog.Error(log("failed to retrieve sdc guid: %v", err)) return err } - - mgr, err := newSioMgr(configData, v.plugin.host.GetExec(v.plugin.GetPluginName())) + mgr, err := newSioMgr(configData, v.plugin.host, v.plugin.host.GetExec(v.plugin.GetPluginName())) if err != nil { klog.Error(log("failed to reset scaleio mgr: %v", err)) @@ -480,8 +479,7 @@ func (v *sioVolume) setSioMgrFromConfig() error { klog.Error(log("failed to load secret: %v", err)) return err } - - mgr, err := newSioMgr(data, v.plugin.host.GetExec(v.plugin.GetPluginName())) + mgr, err := newSioMgr(data, v.plugin.host, v.plugin.host.GetExec(v.plugin.GetPluginName())) if err != nil { klog.Error(log("failed while setting scaleio mgr from config: %v", err)) @@ -516,8 +514,7 @@ func (v *sioVolume) setSioMgrFromSpec() error { klog.Error(log("failed to load secret: %v", err)) return err } - - mgr, err := newSioMgr(configData, v.plugin.host.GetExec(v.plugin.GetPluginName())) + mgr, err := newSioMgr(configData, v.plugin.host, v.plugin.host.GetExec(v.plugin.GetPluginName())) if err != nil { klog.Error(log("failed to reset sio manager: %v", err)) diff --git a/pkg/volume/storageos/BUILD b/pkg/volume/storageos/BUILD index f66bb22b190..dffd6341a45 100644 --- a/pkg/volume/storageos/BUILD +++ b/pkg/volume/storageos/BUILD @@ -15,6 +15,7 @@ go_library( ], importpath = "k8s.io/kubernetes/pkg/volume/storageos", deps = [ + "//pkg/proxy/util:go_default_library", "//pkg/volume:go_default_library", "//pkg/volume/util:go_default_library", "//staging/src/k8s.io/api/core/v1:go_default_library", diff --git a/pkg/volume/storageos/storageos.go b/pkg/volume/storageos/storageos.go index 7243eaccc5c..e1ad8b9b8f3 100644 --- a/pkg/volume/storageos/storageos.go +++ b/pkg/volume/storageos/storageos.go @@ -110,7 +110,7 @@ func (plugin *storageosPlugin) NewMounter(spec *volume.Spec, pod *v1.Pod, _ volu return nil, err } - return plugin.newMounterInternal(spec, pod, apiCfg, &storageosUtil{}, plugin.host.GetMounter(plugin.GetPluginName()), plugin.host.GetExec(plugin.GetPluginName())) + return plugin.newMounterInternal(spec, pod, apiCfg, &storageosUtil{host: plugin.host}, plugin.host.GetMounter(plugin.GetPluginName()), plugin.host.GetExec(plugin.GetPluginName())) } func (plugin *storageosPlugin) newMounterInternal(spec *volume.Spec, pod *v1.Pod, apiCfg *storageosAPIConfig, manager storageosManager, mounter mount.Interface, exec utilexec.Interface) (volume.Mounter, error) { @@ -142,7 +142,7 @@ func (plugin *storageosPlugin) newMounterInternal(spec *volume.Spec, pod *v1.Pod } func (plugin *storageosPlugin) NewUnmounter(pvName string, podUID types.UID) (volume.Unmounter, error) { - return plugin.newUnmounterInternal(pvName, podUID, &storageosUtil{}, plugin.host.GetMounter(plugin.GetPluginName()), plugin.host.GetExec(plugin.GetPluginName())) + return plugin.newUnmounterInternal(pvName, podUID, &storageosUtil{host: plugin.host}, plugin.host.GetMounter(plugin.GetPluginName()), plugin.host.GetExec(plugin.GetPluginName())) } func (plugin *storageosPlugin) newUnmounterInternal(pvName string, podUID types.UID, manager storageosManager, mounter mount.Interface, exec utilexec.Interface) (volume.Unmounter, error) { @@ -194,7 +194,7 @@ func (plugin *storageosPlugin) NewDeleter(spec *volume.Spec) (volume.Deleter, er return nil, fmt.Errorf("failed to get admin secret from [%q/%q]: %v", adminSecretNamespace, adminSecretName, err) } - return plugin.newDeleterInternal(spec, apiCfg, &storageosUtil{}) + return plugin.newDeleterInternal(spec, apiCfg, &storageosUtil{host: plugin.host}) } func (plugin *storageosPlugin) newDeleterInternal(spec *volume.Spec, apiCfg *storageosAPIConfig, manager storageosManager) (volume.Deleter, error) { @@ -215,7 +215,7 @@ func (plugin *storageosPlugin) newDeleterInternal(spec *volume.Spec, apiCfg *sto } func (plugin *storageosPlugin) NewProvisioner(options volume.VolumeOptions) (volume.Provisioner, error) { - return plugin.newProvisionerInternal(options, &storageosUtil{}) + return plugin.newProvisionerInternal(options, &storageosUtil{host: plugin.host}) } func (plugin *storageosPlugin) newProvisionerInternal(options volume.VolumeOptions, manager storageosManager) (volume.Provisioner, error) { diff --git a/pkg/volume/storageos/storageos_util.go b/pkg/volume/storageos/storageos_util.go index 00f2e09a684..8f080e39f9a 100644 --- a/pkg/volume/storageos/storageos_util.go +++ b/pkg/volume/storageos/storageos_util.go @@ -26,6 +26,8 @@ import ( storageosapi "github.com/storageos/go-api" storageostypes "github.com/storageos/go-api/types" "k8s.io/klog/v2" + proxyutil "k8s.io/kubernetes/pkg/proxy/util" + "k8s.io/kubernetes/pkg/volume" utilexec "k8s.io/utils/exec" ) @@ -76,13 +78,17 @@ type apiImplementer interface { // storageosUtil is the utility structure to interact with the StorageOS API. type storageosUtil struct { - api apiImplementer + api apiImplementer + host volume.VolumeHost } func (u *storageosUtil) NewAPI(apiCfg *storageosAPIConfig) error { if u.api != nil { return nil } + if u.host == nil { + return errors.New("host must not be nil") + } if apiCfg == nil { apiCfg = &storageosAPIConfig{ apiAddr: defaultAPIAddress, @@ -98,6 +104,9 @@ func (u *storageosUtil) NewAPI(apiCfg *storageosAPIConfig) error { return err } api.SetAuth(apiCfg.apiUser, apiCfg.apiPass) + if err := api.SetDialContext(proxyutil.NewFilteredDialContext(api.GetDialContext(), nil, u.host.GetFilteredDialOptions())); err != nil { + return fmt.Errorf("failed to set DialContext in storageos client: %v", err) + } u.api = api return nil } diff --git a/pkg/volume/storageos/storageos_util_test.go b/pkg/volume/storageos/storageos_util_test.go index 2c00adce646..c658f71b044 100644 --- a/pkg/volume/storageos/storageos_util_test.go +++ b/pkg/volume/storageos/storageos_util_test.go @@ -49,8 +49,12 @@ func GetAPIConfig() *storageosAPIConfig { } func TestClient(t *testing.T) { - util := storageosUtil{} - err := util.NewAPI(GetAPIConfig()) + tmpDir, err := utiltesting.MkTmpdir("storageos_test") + if err != nil { + t.Fatalf("error creating tmpdir: %v", err) + } + util := storageosUtil{host: volumetest.NewFakeVolumeHost(t, tmpDir, nil, nil)} + err = util.NewAPI(GetAPIConfig()) if err != nil { t.Fatalf("error getting api config: %v", err) } diff --git a/pkg/volume/testing/BUILD b/pkg/volume/testing/BUILD index 58007e7f2e6..84e420944be 100644 --- a/pkg/volume/testing/BUILD +++ b/pkg/volume/testing/BUILD @@ -13,6 +13,7 @@ go_library( ], importpath = "k8s.io/kubernetes/pkg/volume/testing", deps = [ + "//pkg/proxy/util:go_default_library", "//pkg/volume:go_default_library", "//pkg/volume/util:go_default_library", "//pkg/volume/util/hostutil:go_default_library", diff --git a/pkg/volume/testing/testing.go b/pkg/volume/testing/testing.go index f19f913860b..f6884efaa64 100644 --- a/pkg/volume/testing/testing.go +++ b/pkg/volume/testing/testing.go @@ -46,6 +46,7 @@ import ( "k8s.io/client-go/tools/record" utiltesting "k8s.io/client-go/util/testing" cloudprovider "k8s.io/cloud-provider" + proxyutil "k8s.io/kubernetes/pkg/proxy/util" . "k8s.io/kubernetes/pkg/volume" "k8s.io/kubernetes/pkg/volume/util" "k8s.io/kubernetes/pkg/volume/util/hostutil" @@ -118,6 +119,7 @@ type fakeVolumeHost struct { informerFactory informers.SharedInformerFactory kubeletErr error mux sync.Mutex + filteredDialOptions *proxyutil.FilteredDialOptions } var _ VolumeHost = &fakeVolumeHost{} @@ -207,6 +209,10 @@ func (f *fakeVolumeHost) GetSubpather() subpath.Interface { return f.subpather } +func (f *fakeVolumeHost) GetFilteredDialOptions() *proxyutil.FilteredDialOptions { + return f.filteredDialOptions +} + func (f *fakeVolumeHost) GetPluginMgr() *VolumePluginMgr { return f.pluginMgr } diff --git a/staging/src/k8s.io/kube-controller-manager/config/v1alpha1/types.go b/staging/src/k8s.io/kube-controller-manager/config/v1alpha1/types.go index a92805d8c0f..c693f30d95a 100644 --- a/staging/src/k8s.io/kube-controller-manager/config/v1alpha1/types.go +++ b/staging/src/k8s.io/kube-controller-manager/config/v1alpha1/types.go @@ -471,6 +471,12 @@ type PersistentVolumeBinderControllerConfiguration struct { PVClaimBinderSyncPeriod metav1.Duration // volumeConfiguration holds configuration for volume related features. VolumeConfiguration VolumeConfiguration + // VolumeHostCIDRDenylist is a list of CIDRs that should not be reachable by the + // controller from plugins. + VolumeHostCIDRDenylist []string + // VolumeHostAllowLocalLoopback indicates if local loopback hosts (127.0.0.1, etc) + // should be allowed from plugins. + VolumeHostAllowLocalLoopback *bool } // PodGCControllerConfiguration contains elements describing PodGCController. diff --git a/staging/src/k8s.io/kube-controller-manager/config/v1alpha1/zz_generated.deepcopy.go b/staging/src/k8s.io/kube-controller-manager/config/v1alpha1/zz_generated.deepcopy.go index 5e7fc064d95..453675db207 100644 --- a/staging/src/k8s.io/kube-controller-manager/config/v1alpha1/zz_generated.deepcopy.go +++ b/staging/src/k8s.io/kube-controller-manager/config/v1alpha1/zz_generated.deepcopy.go @@ -442,6 +442,16 @@ func (in *PersistentVolumeBinderControllerConfiguration) DeepCopyInto(out *Persi *out = *in out.PVClaimBinderSyncPeriod = in.PVClaimBinderSyncPeriod in.VolumeConfiguration.DeepCopyInto(&out.VolumeConfiguration) + if in.VolumeHostCIDRDenylist != nil { + in, out := &in.VolumeHostCIDRDenylist, &out.VolumeHostCIDRDenylist + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.VolumeHostAllowLocalLoopback != nil { + in, out := &in.VolumeHostAllowLocalLoopback, &out.VolumeHostAllowLocalLoopback + *out = new(bool) + **out = **in + } return } diff --git a/staging/src/k8s.io/mount-utils/BUILD b/staging/src/k8s.io/mount-utils/BUILD index d57b710fe82..26b12dc5555 100644 --- a/staging/src/k8s.io/mount-utils/BUILD +++ b/staging/src/k8s.io/mount-utils/BUILD @@ -35,9 +35,6 @@ go_library( "@io_bazel_rules_go//go/platform:freebsd": [ "//vendor/k8s.io/utils/io:go_default_library", ], - "@io_bazel_rules_go//go/platform:illumos": [ - "//vendor/k8s.io/utils/io:go_default_library", - ], "@io_bazel_rules_go//go/platform:ios": [ "//vendor/k8s.io/utils/io:go_default_library", ], diff --git a/test/integration/volume/attach_detach_test.go b/test/integration/volume/attach_detach_test.go index 4e6d0ffb9f4..116cdfc6b27 100644 --- a/test/integration/volume/attach_detach_test.go +++ b/test/integration/volume/attach_detach_test.go @@ -438,7 +438,9 @@ func createAdClients(ns *v1.Namespace, t *testing.T, server *httptest.Server, sy nil, /* prober */ false, 5*time.Second, - timers) + timers, + nil, /* filteredDialOptions */ + ) if err != nil { t.Fatalf("Error creating AttachDetach : %v", err) From 299a296c7a6e88b49c9d5e5c43749c5f2b7805e1 Mon Sep 17 00:00:00 2001 From: Matthew Cary Date: Fri, 18 Sep 2020 00:44:39 +0000 Subject: [PATCH 3/3] update-bazel Change-Id: Iebc99ee13587f0cd4c43ab85c7295d458d679d1e --- cluster/images/etcd/migrate/BUILD | 3 ++ cmd/kube-proxy/app/BUILD | 20 +++++++++++ pkg/kubelet/cm/BUILD | 5 +++ pkg/kubelet/dockershim/cm/BUILD | 3 ++ pkg/kubelet/dockershim/network/kubenet/BUILD | 5 +++ pkg/kubelet/oom/BUILD | 3 ++ pkg/kubelet/server/stats/BUILD | 4 +++ pkg/kubelet/stats/pidlimit/BUILD | 3 ++ pkg/proxy/userspace/BUILD | 3 ++ pkg/util/ipvs/BUILD | 3 ++ pkg/util/resizefs/BUILD | 3 ++ pkg/volume/azuredd/BUILD | 3 ++ pkg/volume/util/fs/BUILD | 3 ++ pkg/volume/util/subpath/BUILD | 4 +++ .../k8s.io/apiserver/pkg/server/options/BUILD | 3 ++ .../pkg/storage/value/encrypt/envelope/BUILD | 4 +++ .../value/encrypt/envelope/testing/BUILD | 8 +++++ staging/src/k8s.io/kubectl/pkg/util/BUILD | 3 ++ .../src/k8s.io/kubectl/pkg/util/term/BUILD | 3 ++ staging/src/k8s.io/mount-utils/BUILD | 3 ++ test/integration/master/BUILD | 4 +++ vendor/github.com/coreos/pkg/capnslog/BUILD | 3 ++ .../github.com/docker/docker/pkg/term/BUILD | 3 ++ vendor/github.com/miekg/dns/BUILD | 4 +++ vendor/github.com/moby/term/BUILD | 3 ++ .../onsi/ginkgo/internal/remote/BUILD | 1 + .../runc/libcontainer/cgroups/systemd/BUILD | 3 ++ .../runc/libcontainer/system/BUILD | 3 ++ .../prometheus/client_golang/prometheus/BUILD | 3 ++ vendor/github.com/vishvananda/netlink/BUILD | 3 ++ vendor/go.etcd.io/bbolt/BUILD | 1 + vendor/go.etcd.io/etcd/pkg/logutil/BUILD | 4 +++ vendor/golang.org/x/net/internal/socket/BUILD | 6 ++++ vendor/golang.org/x/net/ipv4/BUILD | 3 ++ vendor/golang.org/x/net/ipv6/BUILD | 3 ++ vendor/golang.org/x/sys/cpu/BUILD | 3 ++ vendor/golang.org/x/sys/unix/BUILD | 35 +++++++++++++++++++ vendor/golang.org/x/sys/windows/BUILD | 1 + vendor/golang.org/x/sys/windows/svc/BUILD | 1 + .../grpc/internal/syscall/BUILD | 3 ++ vendor/k8s.io/utils/mount/BUILD | 3 ++ vendor/k8s.io/utils/nsenter/BUILD | 3 ++ 42 files changed, 185 insertions(+) diff --git a/cluster/images/etcd/migrate/BUILD b/cluster/images/etcd/migrate/BUILD index 71b23d350df..0163d666f90 100644 --- a/cluster/images/etcd/migrate/BUILD +++ b/cluster/images/etcd/migrate/BUILD @@ -40,6 +40,9 @@ go_library( "@io_bazel_rules_go//go/platform:freebsd": [ "//vendor/github.com/mrunalp/fileutils:go_default_library", ], + "@io_bazel_rules_go//go/platform:illumos": [ + "//vendor/github.com/mrunalp/fileutils:go_default_library", + ], "@io_bazel_rules_go//go/platform:ios": [ "//vendor/github.com/mrunalp/fileutils:go_default_library", ], diff --git a/cmd/kube-proxy/app/BUILD b/cmd/kube-proxy/app/BUILD index 959212426a3..e76382f0986 100644 --- a/cmd/kube-proxy/app/BUILD +++ b/cmd/kube-proxy/app/BUILD @@ -137,6 +137,18 @@ go_library( "//staging/src/k8s.io/component-base/metrics:go_default_library", "//vendor/k8s.io/utils/net:go_default_library", ], + "@io_bazel_rules_go//go/platform:illumos": [ + "//pkg/proxy/metrics:go_default_library", + "//pkg/proxy/util/iptables:go_default_library", + "//pkg/util/node:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/types:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/util/net:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/watch:go_default_library", + "//staging/src/k8s.io/client-go/tools/cache:go_default_library", + "//staging/src/k8s.io/client-go/tools/watch:go_default_library", + "//staging/src/k8s.io/component-base/metrics:go_default_library", + "//vendor/k8s.io/utils/net:go_default_library", + ], "@io_bazel_rules_go//go/platform:ios": [ "//pkg/proxy/metrics:go_default_library", "//pkg/proxy/util/iptables:go_default_library", @@ -303,6 +315,14 @@ go_test( "//staging/src/k8s.io/api/core/v1:go_default_library", "//staging/src/k8s.io/client-go/kubernetes/fake:go_default_library", ], + "@io_bazel_rules_go//go/platform:illumos": [ + "//pkg/proxy/ipvs:go_default_library", + "//pkg/proxy/util/iptables:go_default_library", + "//pkg/util/iptables:go_default_library", + "//pkg/util/iptables/testing:go_default_library", + "//staging/src/k8s.io/api/core/v1:go_default_library", + "//staging/src/k8s.io/client-go/kubernetes/fake:go_default_library", + ], "@io_bazel_rules_go//go/platform:ios": [ "//pkg/proxy/ipvs:go_default_library", "//pkg/proxy/util/iptables:go_default_library", diff --git a/pkg/kubelet/cm/BUILD b/pkg/kubelet/cm/BUILD index a9216442f49..cb04702db5f 100644 --- a/pkg/kubelet/cm/BUILD +++ b/pkg/kubelet/cm/BUILD @@ -96,6 +96,11 @@ go_library( "//staging/src/k8s.io/client-go/tools/record:go_default_library", "//vendor/k8s.io/utils/mount:go_default_library", ], + "@io_bazel_rules_go//go/platform:illumos": [ + "//pkg/kubelet/cadvisor:go_default_library", + "//staging/src/k8s.io/client-go/tools/record:go_default_library", + "//vendor/k8s.io/utils/mount:go_default_library", + ], "@io_bazel_rules_go//go/platform:ios": [ "//pkg/kubelet/cadvisor:go_default_library", "//staging/src/k8s.io/client-go/tools/record:go_default_library", diff --git a/pkg/kubelet/dockershim/cm/BUILD b/pkg/kubelet/dockershim/cm/BUILD index 6978f08c33d..88028832095 100644 --- a/pkg/kubelet/dockershim/cm/BUILD +++ b/pkg/kubelet/dockershim/cm/BUILD @@ -37,6 +37,9 @@ go_library( "@io_bazel_rules_go//go/platform:freebsd": [ "//pkg/kubelet/dockershim/libdocker:go_default_library", ], + "@io_bazel_rules_go//go/platform:illumos": [ + "//pkg/kubelet/dockershim/libdocker:go_default_library", + ], "@io_bazel_rules_go//go/platform:ios": [ "//pkg/kubelet/dockershim/libdocker:go_default_library", ], diff --git a/pkg/kubelet/dockershim/network/kubenet/BUILD b/pkg/kubelet/dockershim/network/kubenet/BUILD index 30c4a004cb5..e6c1aa4d99e 100644 --- a/pkg/kubelet/dockershim/network/kubenet/BUILD +++ b/pkg/kubelet/dockershim/network/kubenet/BUILD @@ -58,6 +58,11 @@ go_library( "//pkg/kubelet/container:go_default_library", "//pkg/kubelet/dockershim/network:go_default_library", ], + "@io_bazel_rules_go//go/platform:illumos": [ + "//pkg/kubelet/apis/config:go_default_library", + "//pkg/kubelet/container:go_default_library", + "//pkg/kubelet/dockershim/network:go_default_library", + ], "@io_bazel_rules_go//go/platform:ios": [ "//pkg/kubelet/apis/config:go_default_library", "//pkg/kubelet/container:go_default_library", diff --git a/pkg/kubelet/oom/BUILD b/pkg/kubelet/oom/BUILD index f0f33285c40..e38b2f80a37 100644 --- a/pkg/kubelet/oom/BUILD +++ b/pkg/kubelet/oom/BUILD @@ -30,6 +30,9 @@ go_library( "@io_bazel_rules_go//go/platform:freebsd": [ "//staging/src/k8s.io/client-go/tools/record:go_default_library", ], + "@io_bazel_rules_go//go/platform:illumos": [ + "//staging/src/k8s.io/client-go/tools/record:go_default_library", + ], "@io_bazel_rules_go//go/platform:ios": [ "//staging/src/k8s.io/client-go/tools/record:go_default_library", ], diff --git a/pkg/kubelet/server/stats/BUILD b/pkg/kubelet/server/stats/BUILD index a69ea4d1629..71ebd5b0136 100644 --- a/pkg/kubelet/server/stats/BUILD +++ b/pkg/kubelet/server/stats/BUILD @@ -70,6 +70,10 @@ go_test( "//pkg/kubelet/cm:go_default_library", "//vendor/github.com/google/gofuzz:go_default_library", ], + "@io_bazel_rules_go//go/platform:illumos": [ + "//pkg/kubelet/cm:go_default_library", + "//vendor/github.com/google/gofuzz:go_default_library", + ], "@io_bazel_rules_go//go/platform:ios": [ "//pkg/kubelet/cm:go_default_library", "//vendor/github.com/google/gofuzz:go_default_library", diff --git a/pkg/kubelet/stats/pidlimit/BUILD b/pkg/kubelet/stats/pidlimit/BUILD index 01d3960bc89..5317dfd86db 100644 --- a/pkg/kubelet/stats/pidlimit/BUILD +++ b/pkg/kubelet/stats/pidlimit/BUILD @@ -28,6 +28,9 @@ go_library( "@io_bazel_rules_go//go/platform:freebsd": [ "//pkg/kubelet/apis/stats/v1alpha1:go_default_library", ], + "@io_bazel_rules_go//go/platform:illumos": [ + "//pkg/kubelet/apis/stats/v1alpha1:go_default_library", + ], "@io_bazel_rules_go//go/platform:ios": [ "//pkg/kubelet/apis/stats/v1alpha1:go_default_library", ], diff --git a/pkg/proxy/userspace/BUILD b/pkg/proxy/userspace/BUILD index 8a999b719cd..472830df4af 100644 --- a/pkg/proxy/userspace/BUILD +++ b/pkg/proxy/userspace/BUILD @@ -53,6 +53,9 @@ go_library( "@io_bazel_rules_go//go/platform:freebsd": [ "//vendor/golang.org/x/sys/unix:go_default_library", ], + "@io_bazel_rules_go//go/platform:illumos": [ + "//vendor/golang.org/x/sys/unix:go_default_library", + ], "@io_bazel_rules_go//go/platform:ios": [ "//vendor/golang.org/x/sys/unix:go_default_library", ], diff --git a/pkg/util/ipvs/BUILD b/pkg/util/ipvs/BUILD index 87bae3a6a5e..ddc7c45e917 100644 --- a/pkg/util/ipvs/BUILD +++ b/pkg/util/ipvs/BUILD @@ -56,6 +56,9 @@ go_library( "@io_bazel_rules_go//go/platform:freebsd": [ "//vendor/k8s.io/utils/exec:go_default_library", ], + "@io_bazel_rules_go//go/platform:illumos": [ + "//vendor/k8s.io/utils/exec:go_default_library", + ], "@io_bazel_rules_go//go/platform:ios": [ "//vendor/k8s.io/utils/exec:go_default_library", ], diff --git a/pkg/util/resizefs/BUILD b/pkg/util/resizefs/BUILD index 1205cf7de55..7578dd40b83 100644 --- a/pkg/util/resizefs/BUILD +++ b/pkg/util/resizefs/BUILD @@ -25,6 +25,9 @@ go_library( "@io_bazel_rules_go//go/platform:freebsd": [ "//vendor/k8s.io/utils/mount:go_default_library", ], + "@io_bazel_rules_go//go/platform:illumos": [ + "//vendor/k8s.io/utils/mount:go_default_library", + ], "@io_bazel_rules_go//go/platform:ios": [ "//vendor/k8s.io/utils/mount:go_default_library", ], diff --git a/pkg/volume/azuredd/BUILD b/pkg/volume/azuredd/BUILD index a4770647be7..992dd3be784 100644 --- a/pkg/volume/azuredd/BUILD +++ b/pkg/volume/azuredd/BUILD @@ -57,6 +57,9 @@ go_library( "@io_bazel_rules_go//go/platform:freebsd": [ "//vendor/k8s.io/utils/exec:go_default_library", ], + "@io_bazel_rules_go//go/platform:illumos": [ + "//vendor/k8s.io/utils/exec:go_default_library", + ], "@io_bazel_rules_go//go/platform:ios": [ "//vendor/k8s.io/utils/exec:go_default_library", ], diff --git a/pkg/volume/util/fs/BUILD b/pkg/volume/util/fs/BUILD index 73e0f9ee076..b51ee597b53 100644 --- a/pkg/volume/util/fs/BUILD +++ b/pkg/volume/util/fs/BUILD @@ -29,6 +29,9 @@ go_library( "@io_bazel_rules_go//go/platform:freebsd": [ "//staging/src/k8s.io/apimachinery/pkg/api/resource:go_default_library", ], + "@io_bazel_rules_go//go/platform:illumos": [ + "//staging/src/k8s.io/apimachinery/pkg/api/resource:go_default_library", + ], "@io_bazel_rules_go//go/platform:ios": [ "//pkg/volume/util/fsquota:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/api/resource:go_default_library", diff --git a/pkg/volume/util/subpath/BUILD b/pkg/volume/util/subpath/BUILD index e2b34903f95..ff6b29374e0 100644 --- a/pkg/volume/util/subpath/BUILD +++ b/pkg/volume/util/subpath/BUILD @@ -33,6 +33,10 @@ go_library( "//vendor/k8s.io/utils/mount:go_default_library", "//vendor/k8s.io/utils/nsenter:go_default_library", ], + "@io_bazel_rules_go//go/platform:illumos": [ + "//vendor/k8s.io/utils/mount:go_default_library", + "//vendor/k8s.io/utils/nsenter:go_default_library", + ], "@io_bazel_rules_go//go/platform:ios": [ "//vendor/k8s.io/utils/mount:go_default_library", "//vendor/k8s.io/utils/nsenter:go_default_library", diff --git a/staging/src/k8s.io/apiserver/pkg/server/options/BUILD b/staging/src/k8s.io/apiserver/pkg/server/options/BUILD index 019cfa366ff..84a507fe444 100644 --- a/staging/src/k8s.io/apiserver/pkg/server/options/BUILD +++ b/staging/src/k8s.io/apiserver/pkg/server/options/BUILD @@ -103,6 +103,9 @@ go_library( "@io_bazel_rules_go//go/platform:freebsd": [ "//vendor/golang.org/x/sys/unix:go_default_library", ], + "@io_bazel_rules_go//go/platform:illumos": [ + "//vendor/golang.org/x/sys/unix:go_default_library", + ], "@io_bazel_rules_go//go/platform:ios": [ "//vendor/golang.org/x/sys/unix:go_default_library", ], diff --git a/staging/src/k8s.io/apiserver/pkg/storage/value/encrypt/envelope/BUILD b/staging/src/k8s.io/apiserver/pkg/storage/value/encrypt/envelope/BUILD index 7661984ba9b..a2307920c08 100644 --- a/staging/src/k8s.io/apiserver/pkg/storage/value/encrypt/envelope/BUILD +++ b/staging/src/k8s.io/apiserver/pkg/storage/value/encrypt/envelope/BUILD @@ -58,6 +58,10 @@ go_test( "//staging/src/k8s.io/apimachinery/pkg/util/uuid:go_default_library", "//staging/src/k8s.io/apiserver/pkg/storage/value/encrypt/envelope/testing:go_default_library", ], + "@io_bazel_rules_go//go/platform:illumos": [ + "//staging/src/k8s.io/apimachinery/pkg/util/uuid:go_default_library", + "//staging/src/k8s.io/apiserver/pkg/storage/value/encrypt/envelope/testing:go_default_library", + ], "@io_bazel_rules_go//go/platform:ios": [ "//staging/src/k8s.io/apimachinery/pkg/util/uuid:go_default_library", "//staging/src/k8s.io/apiserver/pkg/storage/value/encrypt/envelope/testing:go_default_library", diff --git a/staging/src/k8s.io/apiserver/pkg/storage/value/encrypt/envelope/testing/BUILD b/staging/src/k8s.io/apiserver/pkg/storage/value/encrypt/envelope/testing/BUILD index 8d026b7c132..1b7c320e83d 100644 --- a/staging/src/k8s.io/apiserver/pkg/storage/value/encrypt/envelope/testing/BUILD +++ b/staging/src/k8s.io/apiserver/pkg/storage/value/encrypt/envelope/testing/BUILD @@ -47,6 +47,14 @@ go_library( "//vendor/google.golang.org/grpc/status:go_default_library", "//vendor/k8s.io/klog/v2:go_default_library", ], + "@io_bazel_rules_go//go/platform:illumos": [ + "//staging/src/k8s.io/apimachinery/pkg/util/wait:go_default_library", + "//staging/src/k8s.io/apiserver/pkg/storage/value/encrypt/envelope/v1beta1:go_default_library", + "//vendor/google.golang.org/grpc:go_default_library", + "//vendor/google.golang.org/grpc/codes:go_default_library", + "//vendor/google.golang.org/grpc/status:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", + ], "@io_bazel_rules_go//go/platform:ios": [ "//staging/src/k8s.io/apimachinery/pkg/util/wait:go_default_library", "//staging/src/k8s.io/apiserver/pkg/storage/value/encrypt/envelope/v1beta1:go_default_library", diff --git a/staging/src/k8s.io/kubectl/pkg/util/BUILD b/staging/src/k8s.io/kubectl/pkg/util/BUILD index a9d826ecf9e..d9721864e7c 100644 --- a/staging/src/k8s.io/kubectl/pkg/util/BUILD +++ b/staging/src/k8s.io/kubectl/pkg/util/BUILD @@ -35,6 +35,9 @@ go_library( "@io_bazel_rules_go//go/platform:freebsd": [ "//vendor/golang.org/x/sys/unix:go_default_library", ], + "@io_bazel_rules_go//go/platform:illumos": [ + "//vendor/golang.org/x/sys/unix:go_default_library", + ], "@io_bazel_rules_go//go/platform:ios": [ "//vendor/golang.org/x/sys/unix:go_default_library", ], diff --git a/staging/src/k8s.io/kubectl/pkg/util/term/BUILD b/staging/src/k8s.io/kubectl/pkg/util/term/BUILD index c0a2dfb8625..91ebe3296e5 100644 --- a/staging/src/k8s.io/kubectl/pkg/util/term/BUILD +++ b/staging/src/k8s.io/kubectl/pkg/util/term/BUILD @@ -34,6 +34,9 @@ go_library( "@io_bazel_rules_go//go/platform:freebsd": [ "//vendor/golang.org/x/sys/unix:go_default_library", ], + "@io_bazel_rules_go//go/platform:illumos": [ + "//vendor/golang.org/x/sys/unix:go_default_library", + ], "@io_bazel_rules_go//go/platform:ios": [ "//vendor/golang.org/x/sys/unix:go_default_library", ], diff --git a/staging/src/k8s.io/mount-utils/BUILD b/staging/src/k8s.io/mount-utils/BUILD index 26b12dc5555..d57b710fe82 100644 --- a/staging/src/k8s.io/mount-utils/BUILD +++ b/staging/src/k8s.io/mount-utils/BUILD @@ -35,6 +35,9 @@ go_library( "@io_bazel_rules_go//go/platform:freebsd": [ "//vendor/k8s.io/utils/io:go_default_library", ], + "@io_bazel_rules_go//go/platform:illumos": [ + "//vendor/k8s.io/utils/io:go_default_library", + ], "@io_bazel_rules_go//go/platform:ios": [ "//vendor/k8s.io/utils/io:go_default_library", ], diff --git a/test/integration/master/BUILD b/test/integration/master/BUILD index 154f80fd4c9..f6b1ad3b98b 100644 --- a/test/integration/master/BUILD +++ b/test/integration/master/BUILD @@ -87,6 +87,10 @@ go_test( "//staging/src/k8s.io/apiserver/pkg/storage/value/encrypt/envelope/testing:go_default_library", "//staging/src/k8s.io/apiserver/pkg/storage/value/encrypt/envelope/v1beta1:go_default_library", ], + "@io_bazel_rules_go//go/platform:illumos": [ + "//staging/src/k8s.io/apiserver/pkg/storage/value/encrypt/envelope/testing:go_default_library", + "//staging/src/k8s.io/apiserver/pkg/storage/value/encrypt/envelope/v1beta1:go_default_library", + ], "@io_bazel_rules_go//go/platform:ios": [ "//staging/src/k8s.io/apiserver/pkg/storage/value/encrypt/envelope/testing:go_default_library", "//staging/src/k8s.io/apiserver/pkg/storage/value/encrypt/envelope/v1beta1:go_default_library", diff --git a/vendor/github.com/coreos/pkg/capnslog/BUILD b/vendor/github.com/coreos/pkg/capnslog/BUILD index 1e9e20201f8..ccb1930ccb7 100644 --- a/vendor/github.com/coreos/pkg/capnslog/BUILD +++ b/vendor/github.com/coreos/pkg/capnslog/BUILD @@ -32,6 +32,9 @@ go_library( "@io_bazel_rules_go//go/platform:freebsd": [ "//vendor/github.com/coreos/go-systemd/journal:go_default_library", ], + "@io_bazel_rules_go//go/platform:illumos": [ + "//vendor/github.com/coreos/go-systemd/journal:go_default_library", + ], "@io_bazel_rules_go//go/platform:ios": [ "//vendor/github.com/coreos/go-systemd/journal:go_default_library", ], diff --git a/vendor/github.com/docker/docker/pkg/term/BUILD b/vendor/github.com/docker/docker/pkg/term/BUILD index 755d10034b1..54c7f55afad 100644 --- a/vendor/github.com/docker/docker/pkg/term/BUILD +++ b/vendor/github.com/docker/docker/pkg/term/BUILD @@ -31,6 +31,9 @@ go_library( "@io_bazel_rules_go//go/platform:freebsd": [ "//vendor/golang.org/x/sys/unix:go_default_library", ], + "@io_bazel_rules_go//go/platform:illumos": [ + "//vendor/golang.org/x/sys/unix:go_default_library", + ], "@io_bazel_rules_go//go/platform:ios": [ "//vendor/golang.org/x/sys/unix:go_default_library", ], diff --git a/vendor/github.com/miekg/dns/BUILD b/vendor/github.com/miekg/dns/BUILD index 8ec9a6fb8b8..082c05e7dd2 100644 --- a/vendor/github.com/miekg/dns/BUILD +++ b/vendor/github.com/miekg/dns/BUILD @@ -77,6 +77,10 @@ go_library( "//vendor/golang.org/x/net/ipv6:go_default_library", "//vendor/golang.org/x/sys/unix:go_default_library", ], + "@io_bazel_rules_go//go/platform:illumos": [ + "//vendor/golang.org/x/net/ipv4:go_default_library", + "//vendor/golang.org/x/net/ipv6:go_default_library", + ], "@io_bazel_rules_go//go/platform:ios": [ "//vendor/golang.org/x/net/ipv4:go_default_library", "//vendor/golang.org/x/net/ipv6:go_default_library", diff --git a/vendor/github.com/moby/term/BUILD b/vendor/github.com/moby/term/BUILD index 7302997fb0f..ee10cde993b 100644 --- a/vendor/github.com/moby/term/BUILD +++ b/vendor/github.com/moby/term/BUILD @@ -31,6 +31,9 @@ go_library( "@io_bazel_rules_go//go/platform:freebsd": [ "//vendor/golang.org/x/sys/unix:go_default_library", ], + "@io_bazel_rules_go//go/platform:illumos": [ + "//vendor/golang.org/x/sys/unix:go_default_library", + ], "@io_bazel_rules_go//go/platform:ios": [ "//vendor/golang.org/x/sys/unix:go_default_library", ], diff --git a/vendor/github.com/onsi/ginkgo/internal/remote/BUILD b/vendor/github.com/onsi/ginkgo/internal/remote/BUILD index c7301d783af..5def2fce22d 100644 --- a/vendor/github.com/onsi/ginkgo/internal/remote/BUILD +++ b/vendor/github.com/onsi/ginkgo/internal/remote/BUILD @@ -10,6 +10,7 @@ go_library( "output_interceptor_win.go", "server.go", "syscall_dup_linux_arm64.go", + "syscall_dup_linux_riscv64.go", "syscall_dup_solaris.go", "syscall_dup_unix.go", ], diff --git a/vendor/github.com/opencontainers/runc/libcontainer/cgroups/systemd/BUILD b/vendor/github.com/opencontainers/runc/libcontainer/cgroups/systemd/BUILD index 7cffd1c6fa1..e74b5c0f8fa 100644 --- a/vendor/github.com/opencontainers/runc/libcontainer/cgroups/systemd/BUILD +++ b/vendor/github.com/opencontainers/runc/libcontainer/cgroups/systemd/BUILD @@ -39,6 +39,9 @@ go_library( "@io_bazel_rules_go//go/platform:freebsd": [ "//vendor/github.com/opencontainers/runc/libcontainer/cgroups:go_default_library", ], + "@io_bazel_rules_go//go/platform:illumos": [ + "//vendor/github.com/opencontainers/runc/libcontainer/cgroups:go_default_library", + ], "@io_bazel_rules_go//go/platform:ios": [ "//vendor/github.com/opencontainers/runc/libcontainer/cgroups:go_default_library", ], diff --git a/vendor/github.com/opencontainers/runc/libcontainer/system/BUILD b/vendor/github.com/opencontainers/runc/libcontainer/system/BUILD index f1fe2ad7b3f..e3b9757cc1e 100644 --- a/vendor/github.com/opencontainers/runc/libcontainer/system/BUILD +++ b/vendor/github.com/opencontainers/runc/libcontainer/system/BUILD @@ -29,6 +29,9 @@ go_library( "@io_bazel_rules_go//go/platform:freebsd": [ "//vendor/github.com/opencontainers/runc/libcontainer/user:go_default_library", ], + "@io_bazel_rules_go//go/platform:illumos": [ + "//vendor/github.com/opencontainers/runc/libcontainer/user:go_default_library", + ], "@io_bazel_rules_go//go/platform:ios": [ "//vendor/github.com/opencontainers/runc/libcontainer/user:go_default_library", ], diff --git a/vendor/github.com/prometheus/client_golang/prometheus/BUILD b/vendor/github.com/prometheus/client_golang/prometheus/BUILD index 8f6921b8158..57c00d4d6c9 100644 --- a/vendor/github.com/prometheus/client_golang/prometheus/BUILD +++ b/vendor/github.com/prometheus/client_golang/prometheus/BUILD @@ -56,6 +56,9 @@ go_library( "@io_bazel_rules_go//go/platform:freebsd": [ "//vendor/github.com/prometheus/procfs:go_default_library", ], + "@io_bazel_rules_go//go/platform:illumos": [ + "//vendor/github.com/prometheus/procfs:go_default_library", + ], "@io_bazel_rules_go//go/platform:ios": [ "//vendor/github.com/prometheus/procfs:go_default_library", ], diff --git a/vendor/github.com/vishvananda/netlink/BUILD b/vendor/github.com/vishvananda/netlink/BUILD index cd20c50d91b..0154865f3fe 100644 --- a/vendor/github.com/vishvananda/netlink/BUILD +++ b/vendor/github.com/vishvananda/netlink/BUILD @@ -75,6 +75,9 @@ go_library( "@io_bazel_rules_go//go/platform:freebsd": [ "//vendor/github.com/vishvananda/netns:go_default_library", ], + "@io_bazel_rules_go//go/platform:illumos": [ + "//vendor/github.com/vishvananda/netns:go_default_library", + ], "@io_bazel_rules_go//go/platform:ios": [ "//vendor/github.com/vishvananda/netns:go_default_library", ], diff --git a/vendor/go.etcd.io/bbolt/BUILD b/vendor/go.etcd.io/bbolt/BUILD index 1d656ca424e..53c3dfc46b9 100644 --- a/vendor/go.etcd.io/bbolt/BUILD +++ b/vendor/go.etcd.io/bbolt/BUILD @@ -13,6 +13,7 @@ go_library( "bolt_openbsd.go", "bolt_ppc64.go", "bolt_ppc64le.go", + "bolt_riscv64.go", "bolt_s390x.go", "bolt_unix.go", "bolt_unix_aix.go", diff --git a/vendor/go.etcd.io/etcd/pkg/logutil/BUILD b/vendor/go.etcd.io/etcd/pkg/logutil/BUILD index f7370ee2510..f9d9d9ebe1a 100644 --- a/vendor/go.etcd.io/etcd/pkg/logutil/BUILD +++ b/vendor/go.etcd.io/etcd/pkg/logutil/BUILD @@ -44,6 +44,10 @@ go_library( "//vendor/github.com/coreos/go-systemd/journal:go_default_library", "//vendor/go.etcd.io/etcd/pkg/systemd:go_default_library", ], + "@io_bazel_rules_go//go/platform:illumos": [ + "//vendor/github.com/coreos/go-systemd/journal:go_default_library", + "//vendor/go.etcd.io/etcd/pkg/systemd:go_default_library", + ], "@io_bazel_rules_go//go/platform:ios": [ "//vendor/github.com/coreos/go-systemd/journal:go_default_library", "//vendor/go.etcd.io/etcd/pkg/systemd:go_default_library", diff --git a/vendor/golang.org/x/net/internal/socket/BUILD b/vendor/golang.org/x/net/internal/socket/BUILD index cdfe91f2397..742cb2bbc0c 100644 --- a/vendor/golang.org/x/net/internal/socket/BUILD +++ b/vendor/golang.org/x/net/internal/socket/BUILD @@ -54,6 +54,7 @@ go_library( "sys_linux_mipsle.go", "sys_linux_ppc64.go", "sys_linux_ppc64le.go", + "sys_linux_riscv64.go", "sys_linux_s390x.go", "sys_linux_s390x.s", "sys_netbsd.go", @@ -63,6 +64,7 @@ go_library( "sys_stub.go", "sys_unix.go", "sys_windows.go", + "zsys_aix_ppc64.go", "zsys_darwin_386.go", "zsys_darwin_amd64.go", "zsys_darwin_arm.go", @@ -71,6 +73,7 @@ go_library( "zsys_freebsd_386.go", "zsys_freebsd_amd64.go", "zsys_freebsd_arm.go", + "zsys_freebsd_arm64.go", "zsys_linux_386.go", "zsys_linux_amd64.go", "zsys_linux_arm.go", @@ -81,13 +84,16 @@ go_library( "zsys_linux_mipsle.go", "zsys_linux_ppc64.go", "zsys_linux_ppc64le.go", + "zsys_linux_riscv64.go", "zsys_linux_s390x.go", "zsys_netbsd_386.go", "zsys_netbsd_amd64.go", "zsys_netbsd_arm.go", + "zsys_netbsd_arm64.go", "zsys_openbsd_386.go", "zsys_openbsd_amd64.go", "zsys_openbsd_arm.go", + "zsys_openbsd_arm64.go", "zsys_solaris_amd64.go", ], importmap = "k8s.io/kubernetes/vendor/golang.org/x/net/internal/socket", diff --git a/vendor/golang.org/x/net/ipv4/BUILD b/vendor/golang.org/x/net/ipv4/BUILD index 67f80517d0d..5a52a2649d5 100644 --- a/vendor/golang.org/x/net/ipv4/BUILD +++ b/vendor/golang.org/x/net/ipv4/BUILD @@ -44,11 +44,13 @@ go_library( "sys_ssmreq_stub.go", "sys_stub.go", "sys_windows.go", + "zsys_aix_ppc64.go", "zsys_darwin.go", "zsys_dragonfly.go", "zsys_freebsd_386.go", "zsys_freebsd_amd64.go", "zsys_freebsd_arm.go", + "zsys_freebsd_arm64.go", "zsys_linux_386.go", "zsys_linux_amd64.go", "zsys_linux_arm.go", @@ -60,6 +62,7 @@ go_library( "zsys_linux_ppc.go", "zsys_linux_ppc64.go", "zsys_linux_ppc64le.go", + "zsys_linux_riscv64.go", "zsys_linux_s390x.go", "zsys_netbsd.go", "zsys_openbsd.go", diff --git a/vendor/golang.org/x/net/ipv6/BUILD b/vendor/golang.org/x/net/ipv6/BUILD index 335d3023f82..7efdd4ea185 100644 --- a/vendor/golang.org/x/net/ipv6/BUILD +++ b/vendor/golang.org/x/net/ipv6/BUILD @@ -43,11 +43,13 @@ go_library( "sys_ssmreq_stub.go", "sys_stub.go", "sys_windows.go", + "zsys_aix_ppc64.go", "zsys_darwin.go", "zsys_dragonfly.go", "zsys_freebsd_386.go", "zsys_freebsd_amd64.go", "zsys_freebsd_arm.go", + "zsys_freebsd_arm64.go", "zsys_linux_386.go", "zsys_linux_amd64.go", "zsys_linux_arm.go", @@ -59,6 +61,7 @@ go_library( "zsys_linux_ppc.go", "zsys_linux_ppc64.go", "zsys_linux_ppc64le.go", + "zsys_linux_riscv64.go", "zsys_linux_s390x.go", "zsys_netbsd.go", "zsys_openbsd.go", diff --git a/vendor/golang.org/x/sys/cpu/BUILD b/vendor/golang.org/x/sys/cpu/BUILD index c5fc879478c..5f02c25d9ee 100644 --- a/vendor/golang.org/x/sys/cpu/BUILD +++ b/vendor/golang.org/x/sys/cpu/BUILD @@ -3,6 +3,7 @@ load("@io_bazel_rules_go//go:def.bzl", "go_library") go_library( name = "go_default_library", srcs = [ + "asm_aix_ppc64.s", "byteorder.go", "cpu.go", "cpu_aix.go", @@ -22,11 +23,13 @@ go_library( "cpu_mips64x.go", "cpu_mipsx.go", "cpu_other_arm64.go", + "cpu_riscv64.go", "cpu_s390x.s", "cpu_wasm.go", "cpu_x86.go", "cpu_x86.s", "hwcap_linux.go", + "syscall_aix_ppc64_gc.go", ], importmap = "k8s.io/kubernetes/vendor/golang.org/x/sys/cpu", importpath = "golang.org/x/sys/cpu", diff --git a/vendor/golang.org/x/sys/unix/BUILD b/vendor/golang.org/x/sys/unix/BUILD index a8ba430e71b..1fe841101b9 100644 --- a/vendor/golang.org/x/sys/unix/BUILD +++ b/vendor/golang.org/x/sys/unix/BUILD @@ -5,6 +5,7 @@ go_library( srcs = [ "affinity_linux.go", "aliases.go", + "asm_aix_ppc64.s", "asm_darwin_386.s", "asm_darwin_amd64.s", "asm_darwin_arm.s", @@ -13,6 +14,7 @@ go_library( "asm_freebsd_386.s", "asm_freebsd_amd64.s", "asm_freebsd_arm.s", + "asm_freebsd_arm64.s", "asm_linux_386.s", "asm_linux_amd64.s", "asm_linux_arm.s", @@ -20,17 +22,21 @@ go_library( "asm_linux_mips64x.s", "asm_linux_mipsx.s", "asm_linux_ppc64x.s", + "asm_linux_riscv64.s", "asm_linux_s390x.s", "asm_netbsd_386.s", "asm_netbsd_amd64.s", "asm_netbsd_arm.s", + "asm_netbsd_arm64.s", "asm_openbsd_386.s", "asm_openbsd_amd64.s", "asm_openbsd_arm.s", + "asm_openbsd_arm64.s", "asm_solaris_amd64.s", "bluetooth_linux.go", "cap_freebsd.go", "constants.go", + "dev_aix_ppc64.go", "dev_darwin.go", "dev_dragonfly.go", "dev_freebsd.go", @@ -44,6 +50,7 @@ go_library( "errors_freebsd_386.go", "errors_freebsd_amd64.go", "errors_freebsd_arm.go", + "errors_freebsd_arm64.go", "fcntl.go", "fcntl_darwin.go", "fcntl_linux_32bit.go", @@ -62,6 +69,7 @@ go_library( "str.go", "syscall.go", "syscall_aix.go", + "syscall_aix_ppc64.go", "syscall_bsd.go", "syscall_darwin.1_12.go", "syscall_darwin.1_13.go", @@ -81,6 +89,8 @@ go_library( "syscall_freebsd_386.go", "syscall_freebsd_amd64.go", "syscall_freebsd_arm.go", + "syscall_freebsd_arm64.go", + "syscall_illumos.go", "syscall_linux.go", "syscall_linux_386.go", "syscall_linux_amd64.go", @@ -92,15 +102,18 @@ go_library( "syscall_linux_mips64x.go", "syscall_linux_mipsx.go", "syscall_linux_ppc64x.go", + "syscall_linux_riscv64.go", "syscall_linux_s390x.go", "syscall_netbsd.go", "syscall_netbsd_386.go", "syscall_netbsd_amd64.go", "syscall_netbsd_arm.go", + "syscall_netbsd_arm64.go", "syscall_openbsd.go", "syscall_openbsd_386.go", "syscall_openbsd_amd64.go", "syscall_openbsd_arm.go", + "syscall_openbsd_arm64.go", "syscall_solaris.go", "syscall_solaris_amd64.go", "syscall_unix.go", @@ -109,6 +122,7 @@ go_library( "timestruct.go", "unveil_openbsd.go", "xattr_bsd.go", + "zerrors_aix_ppc64.go", "zerrors_darwin_386.go", "zerrors_darwin_amd64.go", "zerrors_darwin_arm.go", @@ -117,6 +131,7 @@ go_library( "zerrors_freebsd_386.go", "zerrors_freebsd_amd64.go", "zerrors_freebsd_arm.go", + "zerrors_freebsd_arm64.go", "zerrors_linux.go", "zerrors_linux_386.go", "zerrors_linux_amd64.go", @@ -128,19 +143,24 @@ go_library( "zerrors_linux_mipsle.go", "zerrors_linux_ppc64.go", "zerrors_linux_ppc64le.go", + "zerrors_linux_riscv64.go", "zerrors_linux_s390x.go", "zerrors_netbsd_386.go", "zerrors_netbsd_amd64.go", "zerrors_netbsd_arm.go", + "zerrors_netbsd_arm64.go", "zerrors_openbsd_386.go", "zerrors_openbsd_amd64.go", "zerrors_openbsd_arm.go", + "zerrors_openbsd_arm64.go", "zerrors_solaris_amd64.go", "zptrace_armnn_linux.go", "zptrace_linux_arm64.go", "zptrace_mipsnn_linux.go", "zptrace_mipsnnle_linux.go", "zptrace_x86_linux.go", + "zsyscall_aix_ppc64.go", + "zsyscall_aix_ppc64_gc.go", "zsyscall_darwin_386.1_11.go", "zsyscall_darwin_386.1_13.go", "zsyscall_darwin_386.1_13.s", @@ -165,6 +185,8 @@ go_library( "zsyscall_freebsd_386.go", "zsyscall_freebsd_amd64.go", "zsyscall_freebsd_arm.go", + "zsyscall_freebsd_arm64.go", + "zsyscall_illumos_amd64.go", "zsyscall_linux.go", "zsyscall_linux_386.go", "zsyscall_linux_amd64.go", @@ -176,17 +198,21 @@ go_library( "zsyscall_linux_mipsle.go", "zsyscall_linux_ppc64.go", "zsyscall_linux_ppc64le.go", + "zsyscall_linux_riscv64.go", "zsyscall_linux_s390x.go", "zsyscall_netbsd_386.go", "zsyscall_netbsd_amd64.go", "zsyscall_netbsd_arm.go", + "zsyscall_netbsd_arm64.go", "zsyscall_openbsd_386.go", "zsyscall_openbsd_amd64.go", "zsyscall_openbsd_arm.go", + "zsyscall_openbsd_arm64.go", "zsyscall_solaris_amd64.go", "zsysctl_openbsd_386.go", "zsysctl_openbsd_amd64.go", "zsysctl_openbsd_arm.go", + "zsysctl_openbsd_arm64.go", "zsysnum_darwin_386.go", "zsysnum_darwin_amd64.go", "zsysnum_darwin_arm.go", @@ -195,6 +221,7 @@ go_library( "zsysnum_freebsd_386.go", "zsysnum_freebsd_amd64.go", "zsysnum_freebsd_arm.go", + "zsysnum_freebsd_arm64.go", "zsysnum_linux_386.go", "zsysnum_linux_amd64.go", "zsysnum_linux_arm.go", @@ -205,13 +232,17 @@ go_library( "zsysnum_linux_mipsle.go", "zsysnum_linux_ppc64.go", "zsysnum_linux_ppc64le.go", + "zsysnum_linux_riscv64.go", "zsysnum_linux_s390x.go", "zsysnum_netbsd_386.go", "zsysnum_netbsd_amd64.go", "zsysnum_netbsd_arm.go", + "zsysnum_netbsd_arm64.go", "zsysnum_openbsd_386.go", "zsysnum_openbsd_amd64.go", "zsysnum_openbsd_arm.go", + "zsysnum_openbsd_arm64.go", + "ztypes_aix_ppc64.go", "ztypes_darwin_386.go", "ztypes_darwin_amd64.go", "ztypes_darwin_arm.go", @@ -220,6 +251,7 @@ go_library( "ztypes_freebsd_386.go", "ztypes_freebsd_amd64.go", "ztypes_freebsd_arm.go", + "ztypes_freebsd_arm64.go", "ztypes_linux.go", "ztypes_linux_386.go", "ztypes_linux_amd64.go", @@ -231,13 +263,16 @@ go_library( "ztypes_linux_mipsle.go", "ztypes_linux_ppc64.go", "ztypes_linux_ppc64le.go", + "ztypes_linux_riscv64.go", "ztypes_linux_s390x.go", "ztypes_netbsd_386.go", "ztypes_netbsd_amd64.go", "ztypes_netbsd_arm.go", + "ztypes_netbsd_arm64.go", "ztypes_openbsd_386.go", "ztypes_openbsd_amd64.go", "ztypes_openbsd_arm.go", + "ztypes_openbsd_arm64.go", "ztypes_solaris_amd64.go", ], cgo = True, diff --git a/vendor/golang.org/x/sys/windows/BUILD b/vendor/golang.org/x/sys/windows/BUILD index 9cbddcedf20..2145ed0e4bc 100644 --- a/vendor/golang.org/x/sys/windows/BUILD +++ b/vendor/golang.org/x/sys/windows/BUILD @@ -20,6 +20,7 @@ go_library( "types_windows.go", "types_windows_386.go", "types_windows_amd64.go", + "types_windows_arm.go", "zerrors_windows.go", "zknownfolderids_windows.go", "zsyscall_windows.go", diff --git a/vendor/golang.org/x/sys/windows/svc/BUILD b/vendor/golang.org/x/sys/windows/svc/BUILD index 128ae21a6ce..1ab636749fa 100644 --- a/vendor/golang.org/x/sys/windows/svc/BUILD +++ b/vendor/golang.org/x/sys/windows/svc/BUILD @@ -10,6 +10,7 @@ go_library( "service.go", "sys_386.s", "sys_amd64.s", + "sys_arm.s", ], importmap = "k8s.io/kubernetes/vendor/golang.org/x/sys/windows/svc", importpath = "golang.org/x/sys/windows/svc", diff --git a/vendor/google.golang.org/grpc/internal/syscall/BUILD b/vendor/google.golang.org/grpc/internal/syscall/BUILD index 3cb389ece97..9b6243efcd7 100644 --- a/vendor/google.golang.org/grpc/internal/syscall/BUILD +++ b/vendor/google.golang.org/grpc/internal/syscall/BUILD @@ -26,6 +26,9 @@ go_library( "@io_bazel_rules_go//go/platform:freebsd": [ "//vendor/google.golang.org/grpc/grpclog:go_default_library", ], + "@io_bazel_rules_go//go/platform:illumos": [ + "//vendor/google.golang.org/grpc/grpclog:go_default_library", + ], "@io_bazel_rules_go//go/platform:ios": [ "//vendor/google.golang.org/grpc/grpclog:go_default_library", ], diff --git a/vendor/k8s.io/utils/mount/BUILD b/vendor/k8s.io/utils/mount/BUILD index f825c2040bc..2dded4405aa 100644 --- a/vendor/k8s.io/utils/mount/BUILD +++ b/vendor/k8s.io/utils/mount/BUILD @@ -35,6 +35,9 @@ go_library( "@io_bazel_rules_go//go/platform:freebsd": [ "//vendor/k8s.io/utils/io:go_default_library", ], + "@io_bazel_rules_go//go/platform:illumos": [ + "//vendor/k8s.io/utils/io:go_default_library", + ], "@io_bazel_rules_go//go/platform:ios": [ "//vendor/k8s.io/utils/io:go_default_library", ], diff --git a/vendor/k8s.io/utils/nsenter/BUILD b/vendor/k8s.io/utils/nsenter/BUILD index fd100a0d839..8c08b176e50 100644 --- a/vendor/k8s.io/utils/nsenter/BUILD +++ b/vendor/k8s.io/utils/nsenter/BUILD @@ -26,6 +26,9 @@ go_library( "@io_bazel_rules_go//go/platform:freebsd": [ "//vendor/k8s.io/utils/exec:go_default_library", ], + "@io_bazel_rules_go//go/platform:illumos": [ + "//vendor/k8s.io/utils/exec:go_default_library", + ], "@io_bazel_rules_go//go/platform:ios": [ "//vendor/k8s.io/utils/exec:go_default_library", ],