mirror of https://github.com/k3s-io/k3s
Update to v1.21.6 (#4355)
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>pull/4362/head
parent
7d0ecf3ab2
commit
998e2bb5fa
76
go.mod
76
go.mod
|
@ -36,34 +36,34 @@ replace (
|
||||||
google.golang.org/genproto => google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884
|
google.golang.org/genproto => google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884
|
||||||
google.golang.org/grpc => google.golang.org/grpc v1.27.1
|
google.golang.org/grpc => google.golang.org/grpc v1.27.1
|
||||||
gopkg.in/square/go-jose.v2 => gopkg.in/square/go-jose.v2 v2.2.2
|
gopkg.in/square/go-jose.v2 => gopkg.in/square/go-jose.v2 v2.2.2
|
||||||
k8s.io/api => github.com/k3s-io/kubernetes/staging/src/k8s.io/api v1.21.5-k3s1
|
k8s.io/api => github.com/k3s-io/kubernetes/staging/src/k8s.io/api v1.21.6-k3s1
|
||||||
k8s.io/apiextensions-apiserver => github.com/k3s-io/kubernetes/staging/src/k8s.io/apiextensions-apiserver v1.21.5-k3s1
|
k8s.io/apiextensions-apiserver => github.com/k3s-io/kubernetes/staging/src/k8s.io/apiextensions-apiserver v1.21.6-k3s1
|
||||||
k8s.io/apimachinery => github.com/k3s-io/kubernetes/staging/src/k8s.io/apimachinery v1.21.5-k3s1
|
k8s.io/apimachinery => github.com/k3s-io/kubernetes/staging/src/k8s.io/apimachinery v1.21.6-k3s1
|
||||||
k8s.io/apiserver => github.com/k3s-io/kubernetes/staging/src/k8s.io/apiserver v1.21.5-k3s1
|
k8s.io/apiserver => github.com/k3s-io/kubernetes/staging/src/k8s.io/apiserver v1.21.6-k3s1
|
||||||
k8s.io/cli-runtime => github.com/k3s-io/kubernetes/staging/src/k8s.io/cli-runtime v1.21.5-k3s1
|
k8s.io/cli-runtime => github.com/k3s-io/kubernetes/staging/src/k8s.io/cli-runtime v1.21.6-k3s1
|
||||||
k8s.io/client-go => github.com/k3s-io/kubernetes/staging/src/k8s.io/client-go v1.21.5-k3s1
|
k8s.io/client-go => github.com/k3s-io/kubernetes/staging/src/k8s.io/client-go v1.21.6-k3s1
|
||||||
k8s.io/cloud-provider => github.com/k3s-io/kubernetes/staging/src/k8s.io/cloud-provider v1.21.5-k3s1
|
k8s.io/cloud-provider => github.com/k3s-io/kubernetes/staging/src/k8s.io/cloud-provider v1.21.6-k3s1
|
||||||
k8s.io/cluster-bootstrap => github.com/k3s-io/kubernetes/staging/src/k8s.io/cluster-bootstrap v1.21.5-k3s1
|
k8s.io/cluster-bootstrap => github.com/k3s-io/kubernetes/staging/src/k8s.io/cluster-bootstrap v1.21.6-k3s1
|
||||||
k8s.io/code-generator => github.com/k3s-io/kubernetes/staging/src/k8s.io/code-generator v1.21.5-k3s1
|
k8s.io/code-generator => github.com/k3s-io/kubernetes/staging/src/k8s.io/code-generator v1.21.6-k3s1
|
||||||
k8s.io/component-base => github.com/k3s-io/kubernetes/staging/src/k8s.io/component-base v1.21.5-k3s1
|
k8s.io/component-base => github.com/k3s-io/kubernetes/staging/src/k8s.io/component-base v1.21.6-k3s1
|
||||||
k8s.io/component-helpers => github.com/k3s-io/kubernetes/staging/src/k8s.io/component-helpers v1.21.5-k3s1
|
k8s.io/component-helpers => github.com/k3s-io/kubernetes/staging/src/k8s.io/component-helpers v1.21.6-k3s1
|
||||||
k8s.io/controller-manager => github.com/k3s-io/kubernetes/staging/src/k8s.io/controller-manager v1.21.5-k3s1
|
k8s.io/controller-manager => github.com/k3s-io/kubernetes/staging/src/k8s.io/controller-manager v1.21.6-k3s1
|
||||||
k8s.io/cri-api => github.com/k3s-io/kubernetes/staging/src/k8s.io/cri-api v1.21.5-k3s1
|
k8s.io/cri-api => github.com/k3s-io/kubernetes/staging/src/k8s.io/cri-api v1.21.6-k3s1
|
||||||
k8s.io/csi-translation-lib => github.com/k3s-io/kubernetes/staging/src/k8s.io/csi-translation-lib v1.21.5-k3s1
|
k8s.io/csi-translation-lib => github.com/k3s-io/kubernetes/staging/src/k8s.io/csi-translation-lib v1.21.6-k3s1
|
||||||
k8s.io/kube-aggregator => github.com/k3s-io/kubernetes/staging/src/k8s.io/kube-aggregator v1.21.5-k3s1
|
k8s.io/kube-aggregator => github.com/k3s-io/kubernetes/staging/src/k8s.io/kube-aggregator v1.21.6-k3s1
|
||||||
k8s.io/kube-controller-manager => github.com/k3s-io/kubernetes/staging/src/k8s.io/kube-controller-manager v1.21.5-k3s1
|
k8s.io/kube-controller-manager => github.com/k3s-io/kubernetes/staging/src/k8s.io/kube-controller-manager v1.21.6-k3s1
|
||||||
k8s.io/kube-proxy => github.com/k3s-io/kubernetes/staging/src/k8s.io/kube-proxy v1.21.5-k3s1
|
k8s.io/kube-proxy => github.com/k3s-io/kubernetes/staging/src/k8s.io/kube-proxy v1.21.6-k3s1
|
||||||
k8s.io/kube-scheduler => github.com/k3s-io/kubernetes/staging/src/k8s.io/kube-scheduler v1.21.5-k3s1
|
k8s.io/kube-scheduler => github.com/k3s-io/kubernetes/staging/src/k8s.io/kube-scheduler v1.21.6-k3s1
|
||||||
k8s.io/kubectl => github.com/k3s-io/kubernetes/staging/src/k8s.io/kubectl v1.21.5-k3s1
|
k8s.io/kubectl => github.com/k3s-io/kubernetes/staging/src/k8s.io/kubectl v1.21.6-k3s1
|
||||||
k8s.io/kubelet => github.com/k3s-io/kubernetes/staging/src/k8s.io/kubelet v1.21.5-k3s1
|
k8s.io/kubelet => github.com/k3s-io/kubernetes/staging/src/k8s.io/kubelet v1.21.6-k3s1
|
||||||
k8s.io/kubernetes => github.com/k3s-io/kubernetes v1.21.5-k3s1
|
k8s.io/kubernetes => github.com/k3s-io/kubernetes v1.21.6-k3s1
|
||||||
k8s.io/legacy-cloud-providers => github.com/k3s-io/kubernetes/staging/src/k8s.io/legacy-cloud-providers v1.21.5-k3s1
|
k8s.io/legacy-cloud-providers => github.com/k3s-io/kubernetes/staging/src/k8s.io/legacy-cloud-providers v1.21.6-k3s1
|
||||||
k8s.io/metrics => github.com/k3s-io/kubernetes/staging/src/k8s.io/metrics v1.21.5-k3s1
|
k8s.io/metrics => github.com/k3s-io/kubernetes/staging/src/k8s.io/metrics v1.21.6-k3s1
|
||||||
k8s.io/mount-utils => github.com/k3s-io/kubernetes/staging/src/k8s.io/mount-utils v1.21.5-k3s1
|
k8s.io/mount-utils => github.com/k3s-io/kubernetes/staging/src/k8s.io/mount-utils v1.21.6-k3s1
|
||||||
k8s.io/node-api => github.com/k3s-io/kubernetes/staging/src/k8s.io/node-api v1.21.5-k3s1
|
k8s.io/node-api => github.com/k3s-io/kubernetes/staging/src/k8s.io/node-api v1.21.6-k3s1
|
||||||
k8s.io/sample-apiserver => github.com/k3s-io/kubernetes/staging/src/k8s.io/sample-apiserver v1.21.5-k3s1
|
k8s.io/sample-apiserver => github.com/k3s-io/kubernetes/staging/src/k8s.io/sample-apiserver v1.21.6-k3s1
|
||||||
k8s.io/sample-cli-plugin => github.com/k3s-io/kubernetes/staging/src/k8s.io/sample-cli-plugin v1.21.5-k3s1
|
k8s.io/sample-cli-plugin => github.com/k3s-io/kubernetes/staging/src/k8s.io/sample-cli-plugin v1.21.6-k3s1
|
||||||
k8s.io/sample-controller => github.com/k3s-io/kubernetes/staging/src/k8s.io/sample-controller v1.21.5-k3s1
|
k8s.io/sample-controller => github.com/k3s-io/kubernetes/staging/src/k8s.io/sample-controller v1.21.6-k3s1
|
||||||
mvdan.cc/unparam => mvdan.cc/unparam v0.0.0-20210104141923-aac4ce9116a7
|
mvdan.cc/unparam => mvdan.cc/unparam v0.0.0-20210104141923-aac4ce9116a7
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -123,18 +123,18 @@ require (
|
||||||
google.golang.org/grpc v1.37.0
|
google.golang.org/grpc v1.37.0
|
||||||
gopkg.in/yaml.v2 v2.4.0
|
gopkg.in/yaml.v2 v2.4.0
|
||||||
inet.af/tcpproxy v0.0.0-20200125044825-b6bb9b5b8252
|
inet.af/tcpproxy v0.0.0-20200125044825-b6bb9b5b8252
|
||||||
k8s.io/api v0.21.5
|
k8s.io/api v0.21.6
|
||||||
k8s.io/apimachinery v0.21.5
|
k8s.io/apimachinery v0.21.6
|
||||||
k8s.io/apiserver v0.21.5
|
k8s.io/apiserver v0.21.6
|
||||||
k8s.io/client-go v11.0.1-0.20190409021438-1a26190bd76a+incompatible
|
k8s.io/client-go v11.0.1-0.20190409021438-1a26190bd76a+incompatible
|
||||||
k8s.io/cloud-provider v0.21.5
|
k8s.io/cloud-provider v0.21.6
|
||||||
k8s.io/component-base v0.21.5
|
k8s.io/component-base v0.21.6
|
||||||
k8s.io/controller-manager v0.21.5 // indirect
|
k8s.io/controller-manager v0.21.6 // indirect
|
||||||
k8s.io/cri-api v0.21.5
|
k8s.io/cri-api v0.21.6
|
||||||
k8s.io/klog v1.0.0
|
k8s.io/klog v1.0.0
|
||||||
k8s.io/klog/v2 v2.8.0
|
k8s.io/klog/v2 v2.9.0
|
||||||
k8s.io/kubectl v0.21.5
|
k8s.io/kubectl v0.21.6
|
||||||
k8s.io/kubernetes v1.21.5
|
k8s.io/kubernetes v1.21.6
|
||||||
k8s.io/utils v0.0.0-20201110183641-67b214c5f920
|
k8s.io/utils v0.0.0-20201110183641-67b214c5f920
|
||||||
sigs.k8s.io/yaml v1.2.0
|
sigs.k8s.io/yaml v1.2.0
|
||||||
)
|
)
|
||||||
|
|
104
go.sum
104
go.sum
|
@ -539,55 +539,55 @@ github.com/k3s-io/helm-controller v0.10.8 h1:O7zoqUBp3W+6+nRCUWNiAoQMzOX6xw9IsBD
|
||||||
github.com/k3s-io/helm-controller v0.10.8/go.mod h1:nZP8FH3KZrNNUf5r+SwwiMR63HS6lxdHdpHijgPfF74=
|
github.com/k3s-io/helm-controller v0.10.8/go.mod h1:nZP8FH3KZrNNUf5r+SwwiMR63HS6lxdHdpHijgPfF74=
|
||||||
github.com/k3s-io/kine v0.6.2 h1:1aJTPfB8HG4exqMKFVE5H0z4bepF05tJHtYNXotWXa4=
|
github.com/k3s-io/kine v0.6.2 h1:1aJTPfB8HG4exqMKFVE5H0z4bepF05tJHtYNXotWXa4=
|
||||||
github.com/k3s-io/kine v0.6.2/go.mod h1:rzCs93+rQHZGOiewMd84PDrER92QeZ6eeHbWkfEy4+w=
|
github.com/k3s-io/kine v0.6.2/go.mod h1:rzCs93+rQHZGOiewMd84PDrER92QeZ6eeHbWkfEy4+w=
|
||||||
github.com/k3s-io/kubernetes v1.21.5-k3s1 h1:XN3kDM8+HNdyM6gB8dH3A8OrVcNfqPtGe1VrepI6ed0=
|
github.com/k3s-io/kubernetes v1.21.6-k3s1 h1:HsiQ/OtXP0H72QkQJu5AqL6lohRDzx4VuEVtkSErvRs=
|
||||||
github.com/k3s-io/kubernetes v1.21.5-k3s1/go.mod h1:o8QsgtH5UB3z9BYhcUZt9S6zjcJ4vdFsj2ACinL44Ss=
|
github.com/k3s-io/kubernetes v1.21.6-k3s1/go.mod h1:fhjjdD6kyZTCtggL22q32PwAzTyE5kv7CbzSYa5r/cQ=
|
||||||
github.com/k3s-io/kubernetes/staging/src/k8s.io/api v1.21.5-k3s1 h1:dD2rE/ZcnIa06omDu0Zu/K0hlXd45ofqb+bDm5Cu47o=
|
github.com/k3s-io/kubernetes/staging/src/k8s.io/api v1.21.6-k3s1 h1:GVn1gZtWdB7psjWKG8Tcq4UiI3YInZd6S/AyT8gYOVk=
|
||||||
github.com/k3s-io/kubernetes/staging/src/k8s.io/api v1.21.5-k3s1/go.mod h1:DKjoC7WTLvupppdmb5jEvRDPQENLZqz/stEUs19TOOc=
|
github.com/k3s-io/kubernetes/staging/src/k8s.io/api v1.21.6-k3s1/go.mod h1:DKjoC7WTLvupppdmb5jEvRDPQENLZqz/stEUs19TOOc=
|
||||||
github.com/k3s-io/kubernetes/staging/src/k8s.io/apiextensions-apiserver v1.21.5-k3s1 h1:EAETOoTx7zV9kIObiC6u+s7X+gao1lmY7cFsj0NWGKk=
|
github.com/k3s-io/kubernetes/staging/src/k8s.io/apiextensions-apiserver v1.21.6-k3s1 h1:GCmOFqi0mChxJIb3DAsMgAOuD/mtkfvpZl9/mUxRC5c=
|
||||||
github.com/k3s-io/kubernetes/staging/src/k8s.io/apiextensions-apiserver v1.21.5-k3s1/go.mod h1:5NdpL8OJ0/hxg03eubxGwZxiCAq1d3hzTiphJPVkWUI=
|
github.com/k3s-io/kubernetes/staging/src/k8s.io/apiextensions-apiserver v1.21.6-k3s1/go.mod h1:0HR5OXMBK/8392fH2uwiut1bAviooqS8Gq4l8DmcPdk=
|
||||||
github.com/k3s-io/kubernetes/staging/src/k8s.io/apimachinery v1.21.5-k3s1 h1:SIRlJfQmTJ/4QJQmYdUoqzXlMKN/4elpVtFd5DFdkbg=
|
github.com/k3s-io/kubernetes/staging/src/k8s.io/apimachinery v1.21.6-k3s1 h1:Zhr3X9wgVBKoRGJ1jhkQhjaJ2ss5AliYCTws9slzJ/Y=
|
||||||
github.com/k3s-io/kubernetes/staging/src/k8s.io/apimachinery v1.21.5-k3s1/go.mod h1:RofUIvoel6QTwv0KbRAovj5OJMoqe4oLR2aFUt7OUjI=
|
github.com/k3s-io/kubernetes/staging/src/k8s.io/apimachinery v1.21.6-k3s1/go.mod h1:PqG0iRzU38rKZ1iWT35AxpoiAMISUuEzxSCs3MT8rh0=
|
||||||
github.com/k3s-io/kubernetes/staging/src/k8s.io/apiserver v1.21.5-k3s1 h1:u+TBNm5HjiFcho8UynTUaBeNGL8wOK+cd2SAZcecqsU=
|
github.com/k3s-io/kubernetes/staging/src/k8s.io/apiserver v1.21.6-k3s1 h1:/X7k88EdYQS3YAj2niQJQ6X92dS46l/8LY21Vi6To1g=
|
||||||
github.com/k3s-io/kubernetes/staging/src/k8s.io/apiserver v1.21.5-k3s1/go.mod h1:YeRM+ndW1YuiX924RUwnyYehdaPzgInIShuVi1g1oU0=
|
github.com/k3s-io/kubernetes/staging/src/k8s.io/apiserver v1.21.6-k3s1/go.mod h1:k+VUSwIsUmY4IFy3tdbVy9LmGOB3hcr7UzanjBlGXag=
|
||||||
github.com/k3s-io/kubernetes/staging/src/k8s.io/cli-runtime v1.21.5-k3s1 h1:BhEJISrYi9koZN9H2HGB8m2VFUZorT0HVCYolvjPLa8=
|
github.com/k3s-io/kubernetes/staging/src/k8s.io/cli-runtime v1.21.6-k3s1 h1:S6K26hgocKREwM/4k70JUi6OJb/AUzIEvflIj+Ox7wQ=
|
||||||
github.com/k3s-io/kubernetes/staging/src/k8s.io/cli-runtime v1.21.5-k3s1/go.mod h1:4vy7xXlS9QNceWCoFBkdxsp50ToEpoM5TjtRKTRxyF0=
|
github.com/k3s-io/kubernetes/staging/src/k8s.io/cli-runtime v1.21.6-k3s1/go.mod h1:QSZneoGpGHCXzmtQxaGWwjhUG5o7Pm4p3hXFJGdIqTg=
|
||||||
github.com/k3s-io/kubernetes/staging/src/k8s.io/client-go v1.21.5-k3s1 h1:TwDORresIP/Kwn8ia6XQ85Fg9UO39rS7ltrCRWyy/l4=
|
github.com/k3s-io/kubernetes/staging/src/k8s.io/client-go v1.21.6-k3s1 h1:qdVS9nxSdk2pe9eyiKzoMQIKnlgfmoOY0zS8b9QN7/Y=
|
||||||
github.com/k3s-io/kubernetes/staging/src/k8s.io/client-go v1.21.5-k3s1/go.mod h1:Tmy73mj7pKXpaT95djoKoENRN2WcPFnErq2R7s4LQIA=
|
github.com/k3s-io/kubernetes/staging/src/k8s.io/client-go v1.21.6-k3s1/go.mod h1:y2aIW+cP8G8VfUte3u3MiQ3L/PERQqRGygDRcDN5T1o=
|
||||||
github.com/k3s-io/kubernetes/staging/src/k8s.io/cloud-provider v1.21.5-k3s1 h1:WtChiZEAwepdvfBySxstX8iSVCp+jJnmHv9ozXw/fxc=
|
github.com/k3s-io/kubernetes/staging/src/k8s.io/cloud-provider v1.21.6-k3s1 h1:1kZPmgYFBVr388lO4cFhreVNm0ytOT6DtNUF43BmJFM=
|
||||||
github.com/k3s-io/kubernetes/staging/src/k8s.io/cloud-provider v1.21.5-k3s1/go.mod h1:4O1kHUHXMt1gT1efBcqY0lepb8+NxQfo57Y8KA5MOaA=
|
github.com/k3s-io/kubernetes/staging/src/k8s.io/cloud-provider v1.21.6-k3s1/go.mod h1:jnyFNYjLh6zDVDX8lPJoM0ROFnElSukoYofP69gatTY=
|
||||||
github.com/k3s-io/kubernetes/staging/src/k8s.io/cluster-bootstrap v1.21.5-k3s1 h1:7iP5bnzkNmlUKf22ozu8RxKlCQMvQzSWDq+AmfqOS/4=
|
github.com/k3s-io/kubernetes/staging/src/k8s.io/cluster-bootstrap v1.21.6-k3s1 h1:ZkCSjDoX8e9Gz6C5N/vQhG+uQA4PG+CXeU79CaKAK9k=
|
||||||
github.com/k3s-io/kubernetes/staging/src/k8s.io/cluster-bootstrap v1.21.5-k3s1/go.mod h1:yvPZprzrt0uOuPx/Tkg3zCSdulxPWxWU2nznGYKmMVk=
|
github.com/k3s-io/kubernetes/staging/src/k8s.io/cluster-bootstrap v1.21.6-k3s1/go.mod h1:GesL7UUjYCAvxEJANbK4ou9nteXGxMZeI7IBuW+LO0k=
|
||||||
github.com/k3s-io/kubernetes/staging/src/k8s.io/code-generator v1.21.5-k3s1 h1:8aPJbO809YmhTdsc1QyTgNVH3exApihYVuYWSg/O+l0=
|
github.com/k3s-io/kubernetes/staging/src/k8s.io/code-generator v1.21.6-k3s1 h1:vEOZCbKktnkQxmSTVvX1aW9B0oAYdP8xJWgfZek1Ai0=
|
||||||
github.com/k3s-io/kubernetes/staging/src/k8s.io/code-generator v1.21.5-k3s1/go.mod h1:E06RSzcG076Hr0tiusNMQQADjzlddt45yksmW32lan4=
|
github.com/k3s-io/kubernetes/staging/src/k8s.io/code-generator v1.21.6-k3s1/go.mod h1:OmGWNrMJ55atJlvsSEBey/8y/yZb6V5SfZ31tx2dXH4=
|
||||||
github.com/k3s-io/kubernetes/staging/src/k8s.io/component-base v1.21.5-k3s1 h1:paD8bzI1lGUtEomBiZfaypu/fwfJ7nuoOOBv+ogSepA=
|
github.com/k3s-io/kubernetes/staging/src/k8s.io/component-base v1.21.6-k3s1 h1:J/0cxc4y7AMrHvAWBPyb+1ZIBWY4AGMtXw7abLDKBFk=
|
||||||
github.com/k3s-io/kubernetes/staging/src/k8s.io/component-base v1.21.5-k3s1/go.mod h1:57sZfpsbTvei9caIWx0wEddFjfnDBTtbXckIsMPnyC8=
|
github.com/k3s-io/kubernetes/staging/src/k8s.io/component-base v1.21.6-k3s1/go.mod h1:L0Jb24aSdhNNo8/7xn37p2gYNQJp6u+hSNRdBI/+8ZA=
|
||||||
github.com/k3s-io/kubernetes/staging/src/k8s.io/component-helpers v1.21.5-k3s1 h1:9wGYeZsAiI660NnhAhL8VLAA8/c8mu8w1k8/xTeUPG0=
|
github.com/k3s-io/kubernetes/staging/src/k8s.io/component-helpers v1.21.6-k3s1 h1:pjYjAe8lF7hOCSCth9NYlqbirC8tew0QcGhKmIq0ng0=
|
||||||
github.com/k3s-io/kubernetes/staging/src/k8s.io/component-helpers v1.21.5-k3s1/go.mod h1:RGjD1ztCGEjfXKUEXsNkfvC3KZwd9Xv0dosrh2IfOyM=
|
github.com/k3s-io/kubernetes/staging/src/k8s.io/component-helpers v1.21.6-k3s1/go.mod h1:4EyOROwpTr3dSoIV3Uyi971zUBRAAnWqaLtHwWd8A90=
|
||||||
github.com/k3s-io/kubernetes/staging/src/k8s.io/controller-manager v1.21.5-k3s1 h1:vNUHLvW9NbxFf1ZbYHSKQmjbvCAczDl2xUW6ulBuvho=
|
github.com/k3s-io/kubernetes/staging/src/k8s.io/controller-manager v1.21.6-k3s1 h1:NhC3hZze/QnYK9AQAYF4X+9Qc+OY2AOW1bN5CylZvQ0=
|
||||||
github.com/k3s-io/kubernetes/staging/src/k8s.io/controller-manager v1.21.5-k3s1/go.mod h1:SnaQa8bOBayBORIZwicYBm9QrlwUPi2PKlMQOhI6HAU=
|
github.com/k3s-io/kubernetes/staging/src/k8s.io/controller-manager v1.21.6-k3s1/go.mod h1:0TTu5j8ujROYaYr3gNVhUDJj1OblJw8b/bjg5dRWumU=
|
||||||
github.com/k3s-io/kubernetes/staging/src/k8s.io/cri-api v1.21.5-k3s1 h1:K2lO+mREoJZKwBNFejcMFpqxeXH3WWt/1CbQG/Wojfc=
|
github.com/k3s-io/kubernetes/staging/src/k8s.io/cri-api v1.21.6-k3s1 h1:3DsQu35y6YWflkhQkf5P9sskkc7XH7xNlL31NsWaKSY=
|
||||||
github.com/k3s-io/kubernetes/staging/src/k8s.io/cri-api v1.21.5-k3s1/go.mod h1:VbdGnkmlBN84zbK0BmcBRbMOHwJcOzRn4EEOkRpPulc=
|
github.com/k3s-io/kubernetes/staging/src/k8s.io/cri-api v1.21.6-k3s1/go.mod h1:AtNyV6bU8OshuUzl3fdp7IoK3Xmwyfa1CKXxIKKI1V4=
|
||||||
github.com/k3s-io/kubernetes/staging/src/k8s.io/csi-translation-lib v1.21.5-k3s1 h1:B+bcwotydCQLvC8s8zEDTxcmasnZgr8lqsGVkmr4DAI=
|
github.com/k3s-io/kubernetes/staging/src/k8s.io/csi-translation-lib v1.21.6-k3s1 h1:QJfJcckEYgpS2eFBnb3ylyKDPpThuEbHkF8XKR3LM1s=
|
||||||
github.com/k3s-io/kubernetes/staging/src/k8s.io/csi-translation-lib v1.21.5-k3s1/go.mod h1:NmtKDopOnphD2IlcH9OjoxoI4mEkkgGhVw7dTbdBTY0=
|
github.com/k3s-io/kubernetes/staging/src/k8s.io/csi-translation-lib v1.21.6-k3s1/go.mod h1:mS+uRrOptcYqC6ePTYfP0/5qbIKjFUFY6NwgffdzhDI=
|
||||||
github.com/k3s-io/kubernetes/staging/src/k8s.io/kube-aggregator v1.21.5-k3s1 h1:JUWGXhZuq82Dxt3pvxCU2jOnNWuNLvb02pOhzpGvEQw=
|
github.com/k3s-io/kubernetes/staging/src/k8s.io/kube-aggregator v1.21.6-k3s1 h1:VkLMuUXF4R6m2wMVbxL4TR5YXmtVnL4NP9A8SvcdDyM=
|
||||||
github.com/k3s-io/kubernetes/staging/src/k8s.io/kube-aggregator v1.21.5-k3s1/go.mod h1:45U8VTZzQ7HFiUs2ZYWXpqBQVVfaD4W964AG+MQuNHM=
|
github.com/k3s-io/kubernetes/staging/src/k8s.io/kube-aggregator v1.21.6-k3s1/go.mod h1:QOxvp5HtilAGgSIIEeQJ6kzgxwLwGh/ZezXpIC5y8xU=
|
||||||
github.com/k3s-io/kubernetes/staging/src/k8s.io/kube-controller-manager v1.21.5-k3s1 h1:DlA3TXlDwflLN7bOfNzIW9w9XkcrdgoIkFB8FpIkpz4=
|
github.com/k3s-io/kubernetes/staging/src/k8s.io/kube-controller-manager v1.21.6-k3s1 h1:8QP4mj3Nsq5PiNhSLhIOq97r8zwFztOXynp7sI/s2F8=
|
||||||
github.com/k3s-io/kubernetes/staging/src/k8s.io/kube-controller-manager v1.21.5-k3s1/go.mod h1:46iKO45TZat/zvPyqe8TjLLrTS/U/nGB92Ft63PEPF0=
|
github.com/k3s-io/kubernetes/staging/src/k8s.io/kube-controller-manager v1.21.6-k3s1/go.mod h1:46iKO45TZat/zvPyqe8TjLLrTS/U/nGB92Ft63PEPF0=
|
||||||
github.com/k3s-io/kubernetes/staging/src/k8s.io/kube-proxy v1.21.5-k3s1 h1:WQTEBEfI/27210ac/9Poynm5fhyB5Kd3RGha+LkYIoQ=
|
github.com/k3s-io/kubernetes/staging/src/k8s.io/kube-proxy v1.21.6-k3s1 h1:b9/7kUy4OjLVnNfoGZj93lRPHwqZpPAgN16mxbEqwI4=
|
||||||
github.com/k3s-io/kubernetes/staging/src/k8s.io/kube-proxy v1.21.5-k3s1/go.mod h1:6mEp02ABsuOeeBuUrrol78v9LYysX7Z8CZOMFlkPOOI=
|
github.com/k3s-io/kubernetes/staging/src/k8s.io/kube-proxy v1.21.6-k3s1/go.mod h1:6mEp02ABsuOeeBuUrrol78v9LYysX7Z8CZOMFlkPOOI=
|
||||||
github.com/k3s-io/kubernetes/staging/src/k8s.io/kube-scheduler v1.21.5-k3s1 h1:4c9zhap2sM05YlbnKlayfTDGpDAqyu9Y+9UwFgnU10s=
|
github.com/k3s-io/kubernetes/staging/src/k8s.io/kube-scheduler v1.21.6-k3s1 h1:b6qC7ljPR4na4466OM/XV2bXvl1dg4aNy+YPZHvRicU=
|
||||||
github.com/k3s-io/kubernetes/staging/src/k8s.io/kube-scheduler v1.21.5-k3s1/go.mod h1:xZnfOrGTta6rB9IWNKl82yzWKpMSUXVmyGHRilQ9kzM=
|
github.com/k3s-io/kubernetes/staging/src/k8s.io/kube-scheduler v1.21.6-k3s1/go.mod h1:xZnfOrGTta6rB9IWNKl82yzWKpMSUXVmyGHRilQ9kzM=
|
||||||
github.com/k3s-io/kubernetes/staging/src/k8s.io/kubectl v1.21.5-k3s1 h1:waBDRvPHOxIQdAxVcUAqnHiAVF9hYI9YkFgGJrs49hU=
|
github.com/k3s-io/kubernetes/staging/src/k8s.io/kubectl v1.21.6-k3s1 h1:QXz7daJCRJynCYR3il0IjI6bJ8UtQcZJoEK89XaGdAU=
|
||||||
github.com/k3s-io/kubernetes/staging/src/k8s.io/kubectl v1.21.5-k3s1/go.mod h1:bWZXiWybngiOLog0bSQqPMwp1PFnr/U2F2cQMlcPhvE=
|
github.com/k3s-io/kubernetes/staging/src/k8s.io/kubectl v1.21.6-k3s1/go.mod h1:Ksrw4vdv7AcyWcNGKiGPotnRrUE+Ylh0FuzXq/pG0gc=
|
||||||
github.com/k3s-io/kubernetes/staging/src/k8s.io/kubelet v1.21.5-k3s1 h1:I2hW1hy2sZTTsGRJ6RNMhPybizi0ZRoXaaQQt/xrBdQ=
|
github.com/k3s-io/kubernetes/staging/src/k8s.io/kubelet v1.21.6-k3s1 h1:SURH+F2o9oswIOG8ZWHXlUQcq19cji4hVOvduxvOZpk=
|
||||||
github.com/k3s-io/kubernetes/staging/src/k8s.io/kubelet v1.21.5-k3s1/go.mod h1:o8/6oYd5NojfXqZcgzwRY6/N9H0txmvDbs4Sk6Laz0A=
|
github.com/k3s-io/kubernetes/staging/src/k8s.io/kubelet v1.21.6-k3s1/go.mod h1:o8/6oYd5NojfXqZcgzwRY6/N9H0txmvDbs4Sk6Laz0A=
|
||||||
github.com/k3s-io/kubernetes/staging/src/k8s.io/legacy-cloud-providers v1.21.5-k3s1 h1:LTtMGzkZKbnyuRCZ+LastEecPxr+lADMqpsbaz6S+u8=
|
github.com/k3s-io/kubernetes/staging/src/k8s.io/legacy-cloud-providers v1.21.6-k3s1 h1:QlW15p2B1qPH3xGalrISTo27+VUYocuoC6aXJ4/+zR4=
|
||||||
github.com/k3s-io/kubernetes/staging/src/k8s.io/legacy-cloud-providers v1.21.5-k3s1/go.mod h1:KP5rJ3JTgvTVF55Sze1pvSD9tDALLWJhFA9VzP9psRM=
|
github.com/k3s-io/kubernetes/staging/src/k8s.io/legacy-cloud-providers v1.21.6-k3s1/go.mod h1:/Dg7uX8zXtkXFOKWmNMByBfKKHlw2BvXZ6b/TgnN7+Q=
|
||||||
github.com/k3s-io/kubernetes/staging/src/k8s.io/metrics v1.21.5-k3s1 h1:Qc235E7WKk69XM/DYl3IWOVAkwewKLKJJKx4OOt+dlk=
|
github.com/k3s-io/kubernetes/staging/src/k8s.io/metrics v1.21.6-k3s1 h1:LR6w8QU4yaxwyPLk/zZsRzyqxpmTLrXDGPG4OxJ8fr0=
|
||||||
github.com/k3s-io/kubernetes/staging/src/k8s.io/metrics v1.21.5-k3s1/go.mod h1:/SknInvlq+Fm+vrO/Z7JYHjxwIsxAl32mAI9tUH/lGY=
|
github.com/k3s-io/kubernetes/staging/src/k8s.io/metrics v1.21.6-k3s1/go.mod h1:/SknInvlq+Fm+vrO/Z7JYHjxwIsxAl32mAI9tUH/lGY=
|
||||||
github.com/k3s-io/kubernetes/staging/src/k8s.io/mount-utils v1.21.5-k3s1 h1:bxJLBJBRizcTmqs7+R2LKoR1h1RXVtXouV9j6t9olyc=
|
github.com/k3s-io/kubernetes/staging/src/k8s.io/mount-utils v1.21.6-k3s1 h1:Yo7UntbRMG9JCWQDrpHUbvyLxZ81SYBu6j/6dLQS5ms=
|
||||||
github.com/k3s-io/kubernetes/staging/src/k8s.io/mount-utils v1.21.5-k3s1/go.mod h1:99KFJSKqMgMvpCWJr4w6ooLZgR+2usWp5GPaILFNq9k=
|
github.com/k3s-io/kubernetes/staging/src/k8s.io/mount-utils v1.21.6-k3s1/go.mod h1:Ta+up70W/DYR4krb0PCKZMrrALZVs7FRaRMWGh0OeUQ=
|
||||||
github.com/k3s-io/kubernetes/staging/src/k8s.io/sample-apiserver v1.21.5-k3s1/go.mod h1:WkDfrpYVRWS0Muw8Vg5XicfVdTxnLvgiT8tX8DSD0Zo=
|
github.com/k3s-io/kubernetes/staging/src/k8s.io/sample-apiserver v1.21.6-k3s1/go.mod h1:zlsrh6rIF8B7aGFyjGXq379Gp6b6oh9U6h7BwQxNI0E=
|
||||||
github.com/k3s-io/protobuf v1.4.3-k3s1 h1:gduXrSm/6KkbTuctP6bASYqKQ/tyC/PNYqxBmJnk4Tc=
|
github.com/k3s-io/protobuf v1.4.3-k3s1 h1:gduXrSm/6KkbTuctP6bASYqKQ/tyC/PNYqxBmJnk4Tc=
|
||||||
github.com/k3s-io/protobuf v1.4.3-k3s1/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
|
github.com/k3s-io/protobuf v1.4.3-k3s1/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
|
||||||
github.com/karrick/godirwalk v1.16.1 h1:DynhcF+bztK8gooS0+NDJFrdNZjJ3gzVzC545UNA9iw=
|
github.com/karrick/godirwalk v1.16.1 h1:DynhcF+bztK8gooS0+NDJFrdNZjJ3gzVzC545UNA9iw=
|
||||||
|
@ -1053,8 +1053,9 @@ golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||||
golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||||
golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
|
golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
|
||||||
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||||
golang.org/x/text v0.3.4 h1:0YWbFKbhXG/wIiuHDSKpS0Iy7FSA+u45VtBMfQcFTTc=
|
|
||||||
golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||||
|
golang.org/x/text v0.3.6 h1:aRYxNxv6iGQlyVaZmk6ZgYEDa+Jg18DxebPSrd6bg1M=
|
||||||
|
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||||
golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
||||||
golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
||||||
golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
||||||
|
@ -1227,8 +1228,9 @@ k8s.io/klog v1.0.0/go.mod h1:4Bi6QPql/J/LkTDqv7R/cd3hPo4k2DG6Ptcz060Ez5I=
|
||||||
k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE=
|
k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE=
|
||||||
k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y=
|
k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y=
|
||||||
k8s.io/klog/v2 v2.4.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y=
|
k8s.io/klog/v2 v2.4.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y=
|
||||||
k8s.io/klog/v2 v2.8.0 h1:Q3gmuM9hKEjefWFFYF0Mat+YyFJvsUyYuwyNNJ5C9Ts=
|
|
||||||
k8s.io/klog/v2 v2.8.0/go.mod h1:hy9LJ/NvuK+iVyP4Ehqva4HxZG/oXyIS3n3Jmire4Ec=
|
k8s.io/klog/v2 v2.8.0/go.mod h1:hy9LJ/NvuK+iVyP4Ehqva4HxZG/oXyIS3n3Jmire4Ec=
|
||||||
|
k8s.io/klog/v2 v2.9.0 h1:D7HV+n1V57XeZ0m6tdRkfknthUaM06VFbWldOFh8kzM=
|
||||||
|
k8s.io/klog/v2 v2.9.0/go.mod h1:hy9LJ/NvuK+iVyP4Ehqva4HxZG/oXyIS3n3Jmire4Ec=
|
||||||
k8s.io/kube-openapi v0.0.0-20190502190224-411b2483e503/go.mod h1:iU+ZGYsNlvU9XKUSso6SQfKTCCw7lFduMZy26Mgr2Fw=
|
k8s.io/kube-openapi v0.0.0-20190502190224-411b2483e503/go.mod h1:iU+ZGYsNlvU9XKUSso6SQfKTCCw7lFduMZy26Mgr2Fw=
|
||||||
k8s.io/kube-openapi v0.0.0-20210305001622-591a79e4bda7 h1:vEx13qjvaZ4yfObSSXW7BrMc/KQBBT/Jyee8XtLf4x0=
|
k8s.io/kube-openapi v0.0.0-20210305001622-591a79e4bda7 h1:vEx13qjvaZ4yfObSSXW7BrMc/KQBBT/Jyee8XtLf4x0=
|
||||||
k8s.io/kube-openapi v0.0.0-20210305001622-591a79e4bda7/go.mod h1:wXW5VT87nVfh/iLV8FpR2uDvrFyomxbtb1KivDbvPTE=
|
k8s.io/kube-openapi v0.0.0-20210305001622-591a79e4bda7/go.mod h1:wXW5VT87nVfh/iLV8FpR2uDvrFyomxbtb1KivDbvPTE=
|
||||||
|
|
|
@ -57,7 +57,7 @@ loop:
|
||||||
err = transform.ErrShortSrc
|
err = transform.ErrShortSrc
|
||||||
break loop
|
break loop
|
||||||
}
|
}
|
||||||
r = utf8.RuneError
|
r, size = utf8.RuneError, 1
|
||||||
goto write
|
goto write
|
||||||
}
|
}
|
||||||
size = 2
|
size = 2
|
||||||
|
|
|
@ -303,9 +303,17 @@ func (t Tag) Extensions() []string {
|
||||||
// are of the allowed values defined for the Unicode locale extension ('u') in
|
// are of the allowed values defined for the Unicode locale extension ('u') in
|
||||||
// https://www.unicode.org/reports/tr35/#Unicode_Language_and_Locale_Identifiers.
|
// https://www.unicode.org/reports/tr35/#Unicode_Language_and_Locale_Identifiers.
|
||||||
// TypeForKey will traverse the inheritance chain to get the correct value.
|
// TypeForKey will traverse the inheritance chain to get the correct value.
|
||||||
|
//
|
||||||
|
// If there are multiple types associated with a key, only the first will be
|
||||||
|
// returned. If there is no type associated with a key, it returns the empty
|
||||||
|
// string.
|
||||||
func (t Tag) TypeForKey(key string) string {
|
func (t Tag) TypeForKey(key string) string {
|
||||||
if start, end, _ := t.findTypeForKey(key); end != start {
|
if _, start, end, _ := t.findTypeForKey(key); end != start {
|
||||||
return t.str[start:end]
|
s := t.str[start:end]
|
||||||
|
if p := strings.IndexByte(s, '-'); p >= 0 {
|
||||||
|
s = s[:p]
|
||||||
|
}
|
||||||
|
return s
|
||||||
}
|
}
|
||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
|
@ -329,13 +337,13 @@ func (t Tag) SetTypeForKey(key, value string) (Tag, error) {
|
||||||
|
|
||||||
// Remove the setting if value is "".
|
// Remove the setting if value is "".
|
||||||
if value == "" {
|
if value == "" {
|
||||||
start, end, _ := t.findTypeForKey(key)
|
start, sep, end, _ := t.findTypeForKey(key)
|
||||||
if start != end {
|
if start != sep {
|
||||||
// Remove key tag and leading '-'.
|
|
||||||
start -= 4
|
|
||||||
|
|
||||||
// Remove a possible empty extension.
|
// Remove a possible empty extension.
|
||||||
if (end == len(t.str) || t.str[end+2] == '-') && t.str[start-2] == '-' {
|
switch {
|
||||||
|
case t.str[start-2] != '-': // has previous elements.
|
||||||
|
case end == len(t.str), // end of string
|
||||||
|
end+2 < len(t.str) && t.str[end+2] == '-': // end of extension
|
||||||
start -= 2
|
start -= 2
|
||||||
}
|
}
|
||||||
if start == int(t.pVariant) && end == len(t.str) {
|
if start == int(t.pVariant) && end == len(t.str) {
|
||||||
|
@ -381,14 +389,14 @@ func (t Tag) SetTypeForKey(key, value string) (Tag, error) {
|
||||||
t.str = string(buf[:uStart+len(b)])
|
t.str = string(buf[:uStart+len(b)])
|
||||||
} else {
|
} else {
|
||||||
s := t.str
|
s := t.str
|
||||||
start, end, hasExt := t.findTypeForKey(key)
|
start, sep, end, hasExt := t.findTypeForKey(key)
|
||||||
if start == end {
|
if start == sep {
|
||||||
if hasExt {
|
if hasExt {
|
||||||
b = b[2:]
|
b = b[2:]
|
||||||
}
|
}
|
||||||
t.str = fmt.Sprintf("%s-%s%s", s[:start], b, s[end:])
|
t.str = fmt.Sprintf("%s-%s%s", s[:sep], b, s[end:])
|
||||||
} else {
|
} else {
|
||||||
t.str = fmt.Sprintf("%s%s%s", s[:start], value, s[end:])
|
t.str = fmt.Sprintf("%s-%s%s", s[:start+3], value, s[end:])
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return t, nil
|
return t, nil
|
||||||
|
@ -399,10 +407,10 @@ func (t Tag) SetTypeForKey(key, value string) (Tag, error) {
|
||||||
// wasn't found. The hasExt return value reports whether an -u extension was present.
|
// wasn't found. The hasExt return value reports whether an -u extension was present.
|
||||||
// Note: the extensions are typically very small and are likely to contain
|
// Note: the extensions are typically very small and are likely to contain
|
||||||
// only one key-type pair.
|
// only one key-type pair.
|
||||||
func (t Tag) findTypeForKey(key string) (start, end int, hasExt bool) {
|
func (t Tag) findTypeForKey(key string) (start, sep, end int, hasExt bool) {
|
||||||
p := int(t.pExt)
|
p := int(t.pExt)
|
||||||
if len(key) != 2 || p == len(t.str) || p == 0 {
|
if len(key) != 2 || p == len(t.str) || p == 0 {
|
||||||
return p, p, false
|
return p, p, p, false
|
||||||
}
|
}
|
||||||
s := t.str
|
s := t.str
|
||||||
|
|
||||||
|
@ -410,10 +418,10 @@ func (t Tag) findTypeForKey(key string) (start, end int, hasExt bool) {
|
||||||
for p++; s[p] != 'u'; p++ {
|
for p++; s[p] != 'u'; p++ {
|
||||||
if s[p] > 'u' {
|
if s[p] > 'u' {
|
||||||
p--
|
p--
|
||||||
return p, p, false
|
return p, p, p, false
|
||||||
}
|
}
|
||||||
if p = nextExtension(s, p); p == len(s) {
|
if p = nextExtension(s, p); p == len(s) {
|
||||||
return len(s), len(s), false
|
return len(s), len(s), len(s), false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Proceed to the hyphen following the extension name.
|
// Proceed to the hyphen following the extension name.
|
||||||
|
@ -424,40 +432,28 @@ func (t Tag) findTypeForKey(key string) (start, end int, hasExt bool) {
|
||||||
|
|
||||||
// Iterate over keys until we get the end of a section.
|
// Iterate over keys until we get the end of a section.
|
||||||
for {
|
for {
|
||||||
// p points to the hyphen preceding the current token.
|
end = p
|
||||||
if p3 := p + 3; s[p3] == '-' {
|
for p++; p < len(s) && s[p] != '-'; p++ {
|
||||||
// Found a key.
|
}
|
||||||
// Check whether we just processed the key that was requested.
|
n := p - end - 1
|
||||||
if curKey == key {
|
if n <= 2 && curKey == key {
|
||||||
return start, p, true
|
if sep < end {
|
||||||
|
sep++
|
||||||
}
|
}
|
||||||
// Set to the next key and continue scanning type tokens.
|
return start, sep, end, true
|
||||||
curKey = s[p+1 : p3]
|
}
|
||||||
|
switch n {
|
||||||
|
case 0, // invalid string
|
||||||
|
1: // next extension
|
||||||
|
return end, end, end, true
|
||||||
|
case 2:
|
||||||
|
// next key
|
||||||
|
curKey = s[end+1 : p]
|
||||||
if curKey > key {
|
if curKey > key {
|
||||||
return p, p, true
|
return end, end, end, true
|
||||||
}
|
}
|
||||||
// Start of the type token sequence.
|
start = end
|
||||||
start = p + 4
|
sep = p
|
||||||
// A type is at least 3 characters long.
|
|
||||||
p += 7 // 4 + 3
|
|
||||||
} else {
|
|
||||||
// Attribute or type, which is at least 3 characters long.
|
|
||||||
p += 4
|
|
||||||
}
|
|
||||||
// p points past the third character of a type or attribute.
|
|
||||||
max := p + 5 // maximum length of token plus hyphen.
|
|
||||||
if len(s) < max {
|
|
||||||
max = len(s)
|
|
||||||
}
|
|
||||||
for ; p < max && s[p] != '-'; p++ {
|
|
||||||
}
|
|
||||||
// Bail if we have exhausted all tokens or if the next token starts
|
|
||||||
// a new extension.
|
|
||||||
if p == len(s) || s[p+2] == '-' {
|
|
||||||
if curKey == key {
|
|
||||||
return start, p, true
|
|
||||||
}
|
|
||||||
return p, p, true
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -133,14 +133,15 @@ func (s *scanner) resizeRange(oldStart, oldEnd, newSize int) {
|
||||||
s.start = oldStart
|
s.start = oldStart
|
||||||
if end := oldStart + newSize; end != oldEnd {
|
if end := oldStart + newSize; end != oldEnd {
|
||||||
diff := end - oldEnd
|
diff := end - oldEnd
|
||||||
if end < cap(s.b) {
|
var b []byte
|
||||||
b := make([]byte, len(s.b)+diff)
|
if n := len(s.b) + diff; n > cap(s.b) {
|
||||||
|
b = make([]byte, n)
|
||||||
copy(b, s.b[:oldStart])
|
copy(b, s.b[:oldStart])
|
||||||
copy(b[end:], s.b[oldEnd:])
|
|
||||||
s.b = b
|
|
||||||
} else {
|
} else {
|
||||||
s.b = append(s.b[end:], s.b[oldEnd:]...)
|
b = s.b[:n]
|
||||||
}
|
}
|
||||||
|
copy(b[end:], s.b[oldEnd:])
|
||||||
|
s.b = b
|
||||||
s.next = end + (s.next - s.end)
|
s.next = end + (s.next - s.end)
|
||||||
s.end = end
|
s.end = end
|
||||||
}
|
}
|
||||||
|
@ -482,7 +483,7 @@ func parseExtensions(scan *scanner) int {
|
||||||
func parseExtension(scan *scanner) int {
|
func parseExtension(scan *scanner) int {
|
||||||
start, end := scan.start, scan.end
|
start, end := scan.start, scan.end
|
||||||
switch scan.token[0] {
|
switch scan.token[0] {
|
||||||
case 'u':
|
case 'u': // https://www.ietf.org/rfc/rfc6067.txt
|
||||||
attrStart := end
|
attrStart := end
|
||||||
scan.scan()
|
scan.scan()
|
||||||
for last := []byte{}; len(scan.token) > 2; scan.scan() {
|
for last := []byte{}; len(scan.token) > 2; scan.scan() {
|
||||||
|
@ -502,27 +503,29 @@ func parseExtension(scan *scanner) int {
|
||||||
last = scan.token
|
last = scan.token
|
||||||
end = scan.end
|
end = scan.end
|
||||||
}
|
}
|
||||||
|
// Scan key-type sequences. A key is of length 2 and may be followed
|
||||||
|
// by 0 or more "type" subtags from 3 to the maximum of 8 letters.
|
||||||
var last, key []byte
|
var last, key []byte
|
||||||
for attrEnd := end; len(scan.token) == 2; last = key {
|
for attrEnd := end; len(scan.token) == 2; last = key {
|
||||||
key = scan.token
|
key = scan.token
|
||||||
keyEnd := scan.end
|
end = scan.end
|
||||||
end = scan.acceptMinSize(3)
|
for scan.scan(); end < scan.end && len(scan.token) > 2; scan.scan() {
|
||||||
|
end = scan.end
|
||||||
|
}
|
||||||
// TODO: check key value validity
|
// TODO: check key value validity
|
||||||
if keyEnd == end || bytes.Compare(key, last) != 1 {
|
if bytes.Compare(key, last) != 1 || scan.err != nil {
|
||||||
// We have an invalid key or the keys are not sorted.
|
// We have an invalid key or the keys are not sorted.
|
||||||
// Start scanning keys from scratch and reorder.
|
// Start scanning keys from scratch and reorder.
|
||||||
p := attrEnd + 1
|
p := attrEnd + 1
|
||||||
scan.next = p
|
scan.next = p
|
||||||
keys := [][]byte{}
|
keys := [][]byte{}
|
||||||
for scan.scan(); len(scan.token) == 2; {
|
for scan.scan(); len(scan.token) == 2; {
|
||||||
keyStart, keyEnd := scan.start, scan.end
|
keyStart := scan.start
|
||||||
end = scan.acceptMinSize(3)
|
end = scan.end
|
||||||
if keyEnd != end {
|
for scan.scan(); end < scan.end && len(scan.token) > 2; scan.scan() {
|
||||||
keys = append(keys, scan.b[keyStart:end])
|
end = scan.end
|
||||||
} else {
|
|
||||||
scan.setError(ErrSyntax)
|
|
||||||
end = keyStart
|
|
||||||
}
|
}
|
||||||
|
keys = append(keys, scan.b[keyStart:end])
|
||||||
}
|
}
|
||||||
sort.Stable(bytesSort{keys, 2})
|
sort.Stable(bytesSort{keys, 2})
|
||||||
if n := len(keys); n > 0 {
|
if n := len(keys); n > 0 {
|
||||||
|
@ -546,7 +549,7 @@ func parseExtension(scan *scanner) int {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
case 't':
|
case 't': // https://www.ietf.org/rfc/rfc6497.txt
|
||||||
scan.scan()
|
scan.scan()
|
||||||
if n := len(scan.token); n >= 2 && n <= 3 && isAlpha(scan.token[1]) {
|
if n := len(scan.token); n >= 2 && n <= 3 && isAlpha(scan.token[1]) {
|
||||||
_, end = parseTag(scan)
|
_, end = parseTag(scan)
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
// Use of this source code is governed by a BSD-style
|
// Use of this source code is governed by a BSD-style
|
||||||
// license that can be found in the LICENSE file.
|
// license that can be found in the LICENSE file.
|
||||||
|
|
||||||
|
//go:build !go1.2
|
||||||
// +build !go1.2
|
// +build !go1.2
|
||||||
|
|
||||||
package language
|
package language
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
// Use of this source code is governed by a BSD-style
|
// Use of this source code is governed by a BSD-style
|
||||||
// license that can be found in the LICENSE file.
|
// license that can be found in the LICENSE file.
|
||||||
|
|
||||||
|
//go:build go1.2
|
||||||
// +build go1.2
|
// +build go1.2
|
||||||
|
|
||||||
package language
|
package language
|
||||||
|
|
|
@ -412,6 +412,10 @@ func (t Tag) Extensions() []Extension {
|
||||||
// are of the allowed values defined for the Unicode locale extension ('u') in
|
// are of the allowed values defined for the Unicode locale extension ('u') in
|
||||||
// https://www.unicode.org/reports/tr35/#Unicode_Language_and_Locale_Identifiers.
|
// https://www.unicode.org/reports/tr35/#Unicode_Language_and_Locale_Identifiers.
|
||||||
// TypeForKey will traverse the inheritance chain to get the correct value.
|
// TypeForKey will traverse the inheritance chain to get the correct value.
|
||||||
|
//
|
||||||
|
// If there are multiple types associated with a key, only the first will be
|
||||||
|
// returned. If there is no type associated with a key, it returns the empty
|
||||||
|
// string.
|
||||||
func (t Tag) TypeForKey(key string) string {
|
func (t Tag) TypeForKey(key string) string {
|
||||||
if !compact.Tag(t).MayHaveExtensions() {
|
if !compact.Tag(t).MayHaveExtensions() {
|
||||||
if key != "rg" && key != "va" {
|
if key != "rg" && key != "va" {
|
||||||
|
|
|
@ -47,7 +47,7 @@ const (
|
||||||
_Zzzz = 251
|
_Zzzz = 251
|
||||||
)
|
)
|
||||||
|
|
||||||
var regionToGroups = []uint8{ // 357 elements
|
var regionToGroups = []uint8{ // 358 elements
|
||||||
// Entry 0 - 3F
|
// Entry 0 - 3F
|
||||||
0x00, 0x00, 0x00, 0x04, 0x04, 0x00, 0x00, 0x04,
|
0x00, 0x00, 0x00, 0x04, 0x04, 0x00, 0x00, 0x04,
|
||||||
0x00, 0x00, 0x00, 0x00, 0x04, 0x04, 0x04, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x04, 0x04, 0x04, 0x00,
|
||||||
|
@ -98,8 +98,8 @@ var regionToGroups = []uint8{ // 357 elements
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
} // Size: 381 bytes
|
} // Size: 382 bytes
|
||||||
|
|
||||||
var paradigmLocales = [][3]uint16{ // 3 elements
|
var paradigmLocales = [][3]uint16{ // 3 elements
|
||||||
0: [3]uint16{0x139, 0x0, 0x7b},
|
0: [3]uint16{0x139, 0x0, 0x7b},
|
||||||
|
@ -295,4 +295,4 @@ var matchRegion = []regionIntelligibility{ // 15 elements
|
||||||
14: {lang: 0x529, script: 0x3c, group: 0x80, distance: 0x5},
|
14: {lang: 0x529, script: 0x3c, group: 0x80, distance: 0x5},
|
||||||
} // Size: 114 bytes
|
} // Size: 114 bytes
|
||||||
|
|
||||||
// Total table size 1471 bytes (1KiB); checksum: 4CB1CD46
|
// Total table size 1472 bytes (1KiB); checksum: F86C669
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
// Use of this source code is governed by a BSD-style
|
// Use of this source code is governed by a BSD-style
|
||||||
// license that can be found in the LICENSE file.
|
// license that can be found in the LICENSE file.
|
||||||
|
|
||||||
|
//go:build go1.10
|
||||||
// +build go1.10
|
// +build go1.10
|
||||||
|
|
||||||
package bidirule
|
package bidirule
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
// Use of this source code is governed by a BSD-style
|
// Use of this source code is governed by a BSD-style
|
||||||
// license that can be found in the LICENSE file.
|
// license that can be found in the LICENSE file.
|
||||||
|
|
||||||
|
//go:build !go1.10
|
||||||
// +build !go1.10
|
// +build !go1.10
|
||||||
|
|
||||||
package bidirule
|
package bidirule
|
||||||
|
|
|
@ -12,15 +12,14 @@
|
||||||
// and without notice.
|
// and without notice.
|
||||||
package bidi // import "golang.org/x/text/unicode/bidi"
|
package bidi // import "golang.org/x/text/unicode/bidi"
|
||||||
|
|
||||||
// TODO:
|
// TODO
|
||||||
// The following functionality would not be hard to implement, but hinges on
|
|
||||||
// the definition of a Segmenter interface. For now this is up to the user.
|
|
||||||
// - Iterate over paragraphs
|
|
||||||
// - Segmenter to iterate over runs directly from a given text.
|
|
||||||
// Also:
|
|
||||||
// - Transformer for reordering?
|
// - Transformer for reordering?
|
||||||
// - Transformer (validator, really) for Bidi Rule.
|
// - Transformer (validator, really) for Bidi Rule.
|
||||||
|
|
||||||
|
import (
|
||||||
|
"bytes"
|
||||||
|
)
|
||||||
|
|
||||||
// This API tries to avoid dealing with embedding levels for now. Under the hood
|
// This API tries to avoid dealing with embedding levels for now. Under the hood
|
||||||
// these will be computed, but the question is to which extent the user should
|
// these will be computed, but the question is to which extent the user should
|
||||||
// know they exist. We should at some point allow the user to specify an
|
// know they exist. We should at some point allow the user to specify an
|
||||||
|
@ -49,7 +48,9 @@ const (
|
||||||
Neutral
|
Neutral
|
||||||
)
|
)
|
||||||
|
|
||||||
type options struct{}
|
type options struct {
|
||||||
|
defaultDirection Direction
|
||||||
|
}
|
||||||
|
|
||||||
// An Option is an option for Bidi processing.
|
// An Option is an option for Bidi processing.
|
||||||
type Option func(*options)
|
type Option func(*options)
|
||||||
|
@ -66,12 +67,62 @@ type Option func(*options)
|
||||||
// DefaultDirection sets the default direction for a Paragraph. The direction is
|
// DefaultDirection sets the default direction for a Paragraph. The direction is
|
||||||
// overridden if the text contains directional characters.
|
// overridden if the text contains directional characters.
|
||||||
func DefaultDirection(d Direction) Option {
|
func DefaultDirection(d Direction) Option {
|
||||||
panic("unimplemented")
|
return func(opts *options) {
|
||||||
|
opts.defaultDirection = d
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// A Paragraph holds a single Paragraph for Bidi processing.
|
// A Paragraph holds a single Paragraph for Bidi processing.
|
||||||
type Paragraph struct {
|
type Paragraph struct {
|
||||||
// buffers
|
p []byte
|
||||||
|
o Ordering
|
||||||
|
opts []Option
|
||||||
|
types []Class
|
||||||
|
pairTypes []bracketType
|
||||||
|
pairValues []rune
|
||||||
|
runes []rune
|
||||||
|
options options
|
||||||
|
}
|
||||||
|
|
||||||
|
// Initialize the p.pairTypes, p.pairValues and p.types from the input previously
|
||||||
|
// set by p.SetBytes() or p.SetString(). Also limit the input up to (and including) a paragraph
|
||||||
|
// separator (bidi class B).
|
||||||
|
//
|
||||||
|
// The function p.Order() needs these values to be set, so this preparation could be postponed.
|
||||||
|
// But since the SetBytes and SetStrings functions return the length of the input up to the paragraph
|
||||||
|
// separator, the whole input needs to be processed anyway and should not be done twice.
|
||||||
|
//
|
||||||
|
// The function has the same return values as SetBytes() / SetString()
|
||||||
|
func (p *Paragraph) prepareInput() (n int, err error) {
|
||||||
|
p.runes = bytes.Runes(p.p)
|
||||||
|
bytecount := 0
|
||||||
|
// clear slices from previous SetString or SetBytes
|
||||||
|
p.pairTypes = nil
|
||||||
|
p.pairValues = nil
|
||||||
|
p.types = nil
|
||||||
|
|
||||||
|
for _, r := range p.runes {
|
||||||
|
props, i := LookupRune(r)
|
||||||
|
bytecount += i
|
||||||
|
cls := props.Class()
|
||||||
|
if cls == B {
|
||||||
|
return bytecount, nil
|
||||||
|
}
|
||||||
|
p.types = append(p.types, cls)
|
||||||
|
if props.IsOpeningBracket() {
|
||||||
|
p.pairTypes = append(p.pairTypes, bpOpen)
|
||||||
|
p.pairValues = append(p.pairValues, r)
|
||||||
|
} else if props.IsBracket() {
|
||||||
|
// this must be a closing bracket,
|
||||||
|
// since IsOpeningBracket is not true
|
||||||
|
p.pairTypes = append(p.pairTypes, bpClose)
|
||||||
|
p.pairValues = append(p.pairValues, r)
|
||||||
|
} else {
|
||||||
|
p.pairTypes = append(p.pairTypes, bpNone)
|
||||||
|
p.pairValues = append(p.pairValues, 0)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return bytecount, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// SetBytes configures p for the given paragraph text. It replaces text
|
// SetBytes configures p for the given paragraph text. It replaces text
|
||||||
|
@ -80,70 +131,150 @@ type Paragraph struct {
|
||||||
// consumed from b including this separator. Error may be non-nil if options are
|
// consumed from b including this separator. Error may be non-nil if options are
|
||||||
// given.
|
// given.
|
||||||
func (p *Paragraph) SetBytes(b []byte, opts ...Option) (n int, err error) {
|
func (p *Paragraph) SetBytes(b []byte, opts ...Option) (n int, err error) {
|
||||||
panic("unimplemented")
|
p.p = b
|
||||||
|
p.opts = opts
|
||||||
|
return p.prepareInput()
|
||||||
}
|
}
|
||||||
|
|
||||||
// SetString configures p for the given paragraph text. It replaces text
|
// SetString configures s for the given paragraph text. It replaces text
|
||||||
// previously set by SetBytes or SetString. If b contains a paragraph separator
|
// previously set by SetBytes or SetString. If s contains a paragraph separator
|
||||||
// it will only process the first paragraph and report the number of bytes
|
// it will only process the first paragraph and report the number of bytes
|
||||||
// consumed from b including this separator. Error may be non-nil if options are
|
// consumed from s including this separator. Error may be non-nil if options are
|
||||||
// given.
|
// given.
|
||||||
func (p *Paragraph) SetString(s string, opts ...Option) (n int, err error) {
|
func (p *Paragraph) SetString(s string, opts ...Option) (n int, err error) {
|
||||||
panic("unimplemented")
|
p.p = []byte(s)
|
||||||
|
p.opts = opts
|
||||||
|
return p.prepareInput()
|
||||||
}
|
}
|
||||||
|
|
||||||
// IsLeftToRight reports whether the principle direction of rendering for this
|
// IsLeftToRight reports whether the principle direction of rendering for this
|
||||||
// paragraphs is left-to-right. If this returns false, the principle direction
|
// paragraphs is left-to-right. If this returns false, the principle direction
|
||||||
// of rendering is right-to-left.
|
// of rendering is right-to-left.
|
||||||
func (p *Paragraph) IsLeftToRight() bool {
|
func (p *Paragraph) IsLeftToRight() bool {
|
||||||
panic("unimplemented")
|
return p.Direction() == LeftToRight
|
||||||
}
|
}
|
||||||
|
|
||||||
// Direction returns the direction of the text of this paragraph.
|
// Direction returns the direction of the text of this paragraph.
|
||||||
//
|
//
|
||||||
// The direction may be LeftToRight, RightToLeft, Mixed, or Neutral.
|
// The direction may be LeftToRight, RightToLeft, Mixed, or Neutral.
|
||||||
func (p *Paragraph) Direction() Direction {
|
func (p *Paragraph) Direction() Direction {
|
||||||
panic("unimplemented")
|
return p.o.Direction()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO: what happens if the position is > len(input)? This should return an error.
|
||||||
|
|
||||||
// RunAt reports the Run at the given position of the input text.
|
// RunAt reports the Run at the given position of the input text.
|
||||||
//
|
//
|
||||||
// This method can be used for computing line breaks on paragraphs.
|
// This method can be used for computing line breaks on paragraphs.
|
||||||
func (p *Paragraph) RunAt(pos int) Run {
|
func (p *Paragraph) RunAt(pos int) Run {
|
||||||
panic("unimplemented")
|
c := 0
|
||||||
|
runNumber := 0
|
||||||
|
for i, r := range p.o.runes {
|
||||||
|
c += len(r)
|
||||||
|
if pos < c {
|
||||||
|
runNumber = i
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return p.o.Run(runNumber)
|
||||||
|
}
|
||||||
|
|
||||||
|
func calculateOrdering(levels []level, runes []rune) Ordering {
|
||||||
|
var curDir Direction
|
||||||
|
|
||||||
|
prevDir := Neutral
|
||||||
|
prevI := 0
|
||||||
|
|
||||||
|
o := Ordering{}
|
||||||
|
// lvl = 0,2,4,...: left to right
|
||||||
|
// lvl = 1,3,5,...: right to left
|
||||||
|
for i, lvl := range levels {
|
||||||
|
if lvl%2 == 0 {
|
||||||
|
curDir = LeftToRight
|
||||||
|
} else {
|
||||||
|
curDir = RightToLeft
|
||||||
|
}
|
||||||
|
if curDir != prevDir {
|
||||||
|
if i > 0 {
|
||||||
|
o.runes = append(o.runes, runes[prevI:i])
|
||||||
|
o.directions = append(o.directions, prevDir)
|
||||||
|
o.startpos = append(o.startpos, prevI)
|
||||||
|
}
|
||||||
|
prevI = i
|
||||||
|
prevDir = curDir
|
||||||
|
}
|
||||||
|
}
|
||||||
|
o.runes = append(o.runes, runes[prevI:])
|
||||||
|
o.directions = append(o.directions, prevDir)
|
||||||
|
o.startpos = append(o.startpos, prevI)
|
||||||
|
return o
|
||||||
}
|
}
|
||||||
|
|
||||||
// Order computes the visual ordering of all the runs in a Paragraph.
|
// Order computes the visual ordering of all the runs in a Paragraph.
|
||||||
func (p *Paragraph) Order() (Ordering, error) {
|
func (p *Paragraph) Order() (Ordering, error) {
|
||||||
panic("unimplemented")
|
if len(p.types) == 0 {
|
||||||
|
return Ordering{}, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
for _, fn := range p.opts {
|
||||||
|
fn(&p.options)
|
||||||
|
}
|
||||||
|
lvl := level(-1)
|
||||||
|
if p.options.defaultDirection == RightToLeft {
|
||||||
|
lvl = 1
|
||||||
|
}
|
||||||
|
para, err := newParagraph(p.types, p.pairTypes, p.pairValues, lvl)
|
||||||
|
if err != nil {
|
||||||
|
return Ordering{}, err
|
||||||
|
}
|
||||||
|
|
||||||
|
levels := para.getLevels([]int{len(p.types)})
|
||||||
|
|
||||||
|
p.o = calculateOrdering(levels, p.runes)
|
||||||
|
return p.o, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// Line computes the visual ordering of runs for a single line starting and
|
// Line computes the visual ordering of runs for a single line starting and
|
||||||
// ending at the given positions in the original text.
|
// ending at the given positions in the original text.
|
||||||
func (p *Paragraph) Line(start, end int) (Ordering, error) {
|
func (p *Paragraph) Line(start, end int) (Ordering, error) {
|
||||||
panic("unimplemented")
|
lineTypes := p.types[start:end]
|
||||||
|
para, err := newParagraph(lineTypes, p.pairTypes[start:end], p.pairValues[start:end], -1)
|
||||||
|
if err != nil {
|
||||||
|
return Ordering{}, err
|
||||||
|
}
|
||||||
|
levels := para.getLevels([]int{len(lineTypes)})
|
||||||
|
o := calculateOrdering(levels, p.runes[start:end])
|
||||||
|
return o, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// An Ordering holds the computed visual order of runs of a Paragraph. Calling
|
// An Ordering holds the computed visual order of runs of a Paragraph. Calling
|
||||||
// SetBytes or SetString on the originating Paragraph invalidates an Ordering.
|
// SetBytes or SetString on the originating Paragraph invalidates an Ordering.
|
||||||
// The methods of an Ordering should only be called by one goroutine at a time.
|
// The methods of an Ordering should only be called by one goroutine at a time.
|
||||||
type Ordering struct{}
|
type Ordering struct {
|
||||||
|
runes [][]rune
|
||||||
|
directions []Direction
|
||||||
|
startpos []int
|
||||||
|
}
|
||||||
|
|
||||||
// Direction reports the directionality of the runs.
|
// Direction reports the directionality of the runs.
|
||||||
//
|
//
|
||||||
// The direction may be LeftToRight, RightToLeft, Mixed, or Neutral.
|
// The direction may be LeftToRight, RightToLeft, Mixed, or Neutral.
|
||||||
func (o *Ordering) Direction() Direction {
|
func (o *Ordering) Direction() Direction {
|
||||||
panic("unimplemented")
|
return o.directions[0]
|
||||||
}
|
}
|
||||||
|
|
||||||
// NumRuns returns the number of runs.
|
// NumRuns returns the number of runs.
|
||||||
func (o *Ordering) NumRuns() int {
|
func (o *Ordering) NumRuns() int {
|
||||||
panic("unimplemented")
|
return len(o.runes)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Run returns the ith run within the ordering.
|
// Run returns the ith run within the ordering.
|
||||||
func (o *Ordering) Run(i int) Run {
|
func (o *Ordering) Run(i int) Run {
|
||||||
panic("unimplemented")
|
r := Run{
|
||||||
|
runes: o.runes[i],
|
||||||
|
direction: o.directions[i],
|
||||||
|
startpos: o.startpos[i],
|
||||||
|
}
|
||||||
|
return r
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: perhaps with options.
|
// TODO: perhaps with options.
|
||||||
|
@ -155,16 +286,19 @@ func (o *Ordering) Run(i int) Run {
|
||||||
|
|
||||||
// A Run is a continuous sequence of characters of a single direction.
|
// A Run is a continuous sequence of characters of a single direction.
|
||||||
type Run struct {
|
type Run struct {
|
||||||
|
runes []rune
|
||||||
|
direction Direction
|
||||||
|
startpos int
|
||||||
}
|
}
|
||||||
|
|
||||||
// String returns the text of the run in its original order.
|
// String returns the text of the run in its original order.
|
||||||
func (r *Run) String() string {
|
func (r *Run) String() string {
|
||||||
panic("unimplemented")
|
return string(r.runes)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Bytes returns the text of the run in its original order.
|
// Bytes returns the text of the run in its original order.
|
||||||
func (r *Run) Bytes() []byte {
|
func (r *Run) Bytes() []byte {
|
||||||
panic("unimplemented")
|
return []byte(r.String())
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: methods for
|
// TODO: methods for
|
||||||
|
@ -174,25 +308,52 @@ func (r *Run) Bytes() []byte {
|
||||||
|
|
||||||
// Direction reports the direction of the run.
|
// Direction reports the direction of the run.
|
||||||
func (r *Run) Direction() Direction {
|
func (r *Run) Direction() Direction {
|
||||||
panic("unimplemented")
|
return r.direction
|
||||||
}
|
}
|
||||||
|
|
||||||
// Position of the Run within the text passed to SetBytes or SetString of the
|
// Pos returns the position of the Run within the text passed to SetBytes or SetString of the
|
||||||
// originating Paragraph value.
|
// originating Paragraph value.
|
||||||
func (r *Run) Pos() (start, end int) {
|
func (r *Run) Pos() (start, end int) {
|
||||||
panic("unimplemented")
|
return r.startpos, r.startpos + len(r.runes) - 1
|
||||||
}
|
}
|
||||||
|
|
||||||
// AppendReverse reverses the order of characters of in, appends them to out,
|
// AppendReverse reverses the order of characters of in, appends them to out,
|
||||||
// and returns the result. Modifiers will still follow the runes they modify.
|
// and returns the result. Modifiers will still follow the runes they modify.
|
||||||
// Brackets are replaced with their counterparts.
|
// Brackets are replaced with their counterparts.
|
||||||
func AppendReverse(out, in []byte) []byte {
|
func AppendReverse(out, in []byte) []byte {
|
||||||
panic("unimplemented")
|
ret := make([]byte, len(in)+len(out))
|
||||||
|
copy(ret, out)
|
||||||
|
inRunes := bytes.Runes(in)
|
||||||
|
|
||||||
|
for i, r := range inRunes {
|
||||||
|
prop, _ := LookupRune(r)
|
||||||
|
if prop.IsBracket() {
|
||||||
|
inRunes[i] = prop.reverseBracket(r)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
for i, j := 0, len(inRunes)-1; i < j; i, j = i+1, j-1 {
|
||||||
|
inRunes[i], inRunes[j] = inRunes[j], inRunes[i]
|
||||||
|
}
|
||||||
|
copy(ret[len(out):], string(inRunes))
|
||||||
|
|
||||||
|
return ret
|
||||||
}
|
}
|
||||||
|
|
||||||
// ReverseString reverses the order of characters in s and returns a new string.
|
// ReverseString reverses the order of characters in s and returns a new string.
|
||||||
// Modifiers will still follow the runes they modify. Brackets are replaced with
|
// Modifiers will still follow the runes they modify. Brackets are replaced with
|
||||||
// their counterparts.
|
// their counterparts.
|
||||||
func ReverseString(s string) string {
|
func ReverseString(s string) string {
|
||||||
panic("unimplemented")
|
input := []rune(s)
|
||||||
|
li := len(input)
|
||||||
|
ret := make([]rune, li)
|
||||||
|
for i, r := range input {
|
||||||
|
prop, _ := LookupRune(r)
|
||||||
|
if prop.IsBracket() {
|
||||||
|
ret[li-i-1] = prop.reverseBracket(r)
|
||||||
|
} else {
|
||||||
|
ret[li-i-1] = r
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return string(ret)
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,7 +4,10 @@
|
||||||
|
|
||||||
package bidi
|
package bidi
|
||||||
|
|
||||||
import "log"
|
import (
|
||||||
|
"fmt"
|
||||||
|
"log"
|
||||||
|
)
|
||||||
|
|
||||||
// This implementation is a port based on the reference implementation found at:
|
// This implementation is a port based on the reference implementation found at:
|
||||||
// https://www.unicode.org/Public/PROGRAMS/BidiReferenceJava/
|
// https://www.unicode.org/Public/PROGRAMS/BidiReferenceJava/
|
||||||
|
@ -97,13 +100,20 @@ type paragraph struct {
|
||||||
// rune (suggested is the rune of the open bracket for opening and matching
|
// rune (suggested is the rune of the open bracket for opening and matching
|
||||||
// close brackets, after normalization). The embedding levels are optional, but
|
// close brackets, after normalization). The embedding levels are optional, but
|
||||||
// may be supplied to encode embedding levels of styled text.
|
// may be supplied to encode embedding levels of styled text.
|
||||||
//
|
func newParagraph(types []Class, pairTypes []bracketType, pairValues []rune, levels level) (*paragraph, error) {
|
||||||
// TODO: return an error.
|
var err error
|
||||||
func newParagraph(types []Class, pairTypes []bracketType, pairValues []rune, levels level) *paragraph {
|
if err = validateTypes(types); err != nil {
|
||||||
validateTypes(types)
|
return nil, err
|
||||||
validatePbTypes(pairTypes)
|
}
|
||||||
validatePbValues(pairValues, pairTypes)
|
if err = validatePbTypes(pairTypes); err != nil {
|
||||||
validateParagraphEmbeddingLevel(levels)
|
return nil, err
|
||||||
|
}
|
||||||
|
if err = validatePbValues(pairValues, pairTypes); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if err = validateParagraphEmbeddingLevel(levels); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
p := ¶graph{
|
p := ¶graph{
|
||||||
initialTypes: append([]Class(nil), types...),
|
initialTypes: append([]Class(nil), types...),
|
||||||
|
@ -115,7 +125,7 @@ func newParagraph(types []Class, pairTypes []bracketType, pairValues []rune, lev
|
||||||
resultTypes: append([]Class(nil), types...),
|
resultTypes: append([]Class(nil), types...),
|
||||||
}
|
}
|
||||||
p.run()
|
p.run()
|
||||||
return p
|
return p, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (p *paragraph) Len() int { return len(p.initialTypes) }
|
func (p *paragraph) Len() int { return len(p.initialTypes) }
|
||||||
|
@ -1001,58 +1011,61 @@ func typeForLevel(level level) Class {
|
||||||
return R
|
return R
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: change validation to not panic
|
func validateTypes(types []Class) error {
|
||||||
|
|
||||||
func validateTypes(types []Class) {
|
|
||||||
if len(types) == 0 {
|
if len(types) == 0 {
|
||||||
log.Panic("types is null")
|
return fmt.Errorf("types is null")
|
||||||
}
|
}
|
||||||
for i, t := range types[:len(types)-1] {
|
for i, t := range types[:len(types)-1] {
|
||||||
if t == B {
|
if t == B {
|
||||||
log.Panicf("B type before end of paragraph at index: %d", i)
|
return fmt.Errorf("B type before end of paragraph at index: %d", i)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func validateParagraphEmbeddingLevel(embeddingLevel level) {
|
func validateParagraphEmbeddingLevel(embeddingLevel level) error {
|
||||||
if embeddingLevel != implicitLevel &&
|
if embeddingLevel != implicitLevel &&
|
||||||
embeddingLevel != 0 &&
|
embeddingLevel != 0 &&
|
||||||
embeddingLevel != 1 {
|
embeddingLevel != 1 {
|
||||||
log.Panicf("illegal paragraph embedding level: %d", embeddingLevel)
|
return fmt.Errorf("illegal paragraph embedding level: %d", embeddingLevel)
|
||||||
}
|
}
|
||||||
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func validateLineBreaks(linebreaks []int, textLength int) {
|
func validateLineBreaks(linebreaks []int, textLength int) error {
|
||||||
prev := 0
|
prev := 0
|
||||||
for i, next := range linebreaks {
|
for i, next := range linebreaks {
|
||||||
if next <= prev {
|
if next <= prev {
|
||||||
log.Panicf("bad linebreak: %d at index: %d", next, i)
|
return fmt.Errorf("bad linebreak: %d at index: %d", next, i)
|
||||||
}
|
}
|
||||||
prev = next
|
prev = next
|
||||||
}
|
}
|
||||||
if prev != textLength {
|
if prev != textLength {
|
||||||
log.Panicf("last linebreak was %d, want %d", prev, textLength)
|
return fmt.Errorf("last linebreak was %d, want %d", prev, textLength)
|
||||||
}
|
}
|
||||||
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func validatePbTypes(pairTypes []bracketType) {
|
func validatePbTypes(pairTypes []bracketType) error {
|
||||||
if len(pairTypes) == 0 {
|
if len(pairTypes) == 0 {
|
||||||
log.Panic("pairTypes is null")
|
return fmt.Errorf("pairTypes is null")
|
||||||
}
|
}
|
||||||
for i, pt := range pairTypes {
|
for i, pt := range pairTypes {
|
||||||
switch pt {
|
switch pt {
|
||||||
case bpNone, bpOpen, bpClose:
|
case bpNone, bpOpen, bpClose:
|
||||||
default:
|
default:
|
||||||
log.Panicf("illegal pairType value at %d: %v", i, pairTypes[i])
|
return fmt.Errorf("illegal pairType value at %d: %v", i, pairTypes[i])
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func validatePbValues(pairValues []rune, pairTypes []bracketType) {
|
func validatePbValues(pairValues []rune, pairTypes []bracketType) error {
|
||||||
if pairValues == nil {
|
if pairValues == nil {
|
||||||
log.Panic("pairValues is null")
|
return fmt.Errorf("pairValues is null")
|
||||||
}
|
}
|
||||||
if len(pairTypes) != len(pairValues) {
|
if len(pairTypes) != len(pairValues) {
|
||||||
log.Panic("pairTypes is different length from pairValues")
|
return fmt.Errorf("pairTypes is different length from pairValues")
|
||||||
}
|
}
|
||||||
|
return nil
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
// Code generated by running "go generate" in golang.org/x/text. DO NOT EDIT.
|
// Code generated by running "go generate" in golang.org/x/text. DO NOT EDIT.
|
||||||
|
|
||||||
|
//go:build go1.10 && !go1.13
|
||||||
// +build go1.10,!go1.13
|
// +build go1.10,!go1.13
|
||||||
|
|
||||||
package bidi
|
package bidi
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
// Code generated by running "go generate" in golang.org/x/text. DO NOT EDIT.
|
// Code generated by running "go generate" in golang.org/x/text. DO NOT EDIT.
|
||||||
|
|
||||||
|
//go:build go1.13 && !go1.14
|
||||||
// +build go1.13,!go1.14
|
// +build go1.13,!go1.14
|
||||||
|
|
||||||
package bidi
|
package bidi
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
// Code generated by running "go generate" in golang.org/x/text. DO NOT EDIT.
|
// Code generated by running "go generate" in golang.org/x/text. DO NOT EDIT.
|
||||||
|
|
||||||
|
//go:build go1.14 && !go1.16
|
||||||
// +build go1.14,!go1.16
|
// +build go1.14,!go1.16
|
||||||
|
|
||||||
package bidi
|
package bidi
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
// Code generated by running "go generate" in golang.org/x/text. DO NOT EDIT.
|
// Code generated by running "go generate" in golang.org/x/text. DO NOT EDIT.
|
||||||
|
|
||||||
|
//go:build go1.16
|
||||||
// +build go1.16
|
// +build go1.16
|
||||||
|
|
||||||
package bidi
|
package bidi
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
// Code generated by running "go generate" in golang.org/x/text. DO NOT EDIT.
|
// Code generated by running "go generate" in golang.org/x/text. DO NOT EDIT.
|
||||||
|
|
||||||
|
//go:build !go1.10
|
||||||
// +build !go1.10
|
// +build !go1.10
|
||||||
|
|
||||||
package bidi
|
package bidi
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
// Code generated by running "go generate" in golang.org/x/text. DO NOT EDIT.
|
// Code generated by running "go generate" in golang.org/x/text. DO NOT EDIT.
|
||||||
|
|
||||||
|
//go:build go1.10 && !go1.13
|
||||||
// +build go1.10,!go1.13
|
// +build go1.10,!go1.13
|
||||||
|
|
||||||
package norm
|
package norm
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
// Code generated by running "go generate" in golang.org/x/text. DO NOT EDIT.
|
// Code generated by running "go generate" in golang.org/x/text. DO NOT EDIT.
|
||||||
|
|
||||||
|
//go:build go1.13 && !go1.14
|
||||||
// +build go1.13,!go1.14
|
// +build go1.13,!go1.14
|
||||||
|
|
||||||
package norm
|
package norm
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
// Code generated by running "go generate" in golang.org/x/text. DO NOT EDIT.
|
// Code generated by running "go generate" in golang.org/x/text. DO NOT EDIT.
|
||||||
|
|
||||||
|
//go:build go1.14 && !go1.16
|
||||||
// +build go1.14,!go1.16
|
// +build go1.14,!go1.16
|
||||||
|
|
||||||
package norm
|
package norm
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
// Code generated by running "go generate" in golang.org/x/text. DO NOT EDIT.
|
// Code generated by running "go generate" in golang.org/x/text. DO NOT EDIT.
|
||||||
|
|
||||||
|
//go:build go1.16
|
||||||
// +build go1.16
|
// +build go1.16
|
||||||
|
|
||||||
package norm
|
package norm
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
// Code generated by running "go generate" in golang.org/x/text. DO NOT EDIT.
|
// Code generated by running "go generate" in golang.org/x/text. DO NOT EDIT.
|
||||||
|
|
||||||
|
//go:build !go1.10
|
||||||
// +build !go1.10
|
// +build !go1.10
|
||||||
|
|
||||||
package norm
|
package norm
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
// Code generated by running "go generate" in golang.org/x/text. DO NOT EDIT.
|
// Code generated by running "go generate" in golang.org/x/text. DO NOT EDIT.
|
||||||
|
|
||||||
|
//go:build go1.10 && !go1.13
|
||||||
// +build go1.10,!go1.13
|
// +build go1.10,!go1.13
|
||||||
|
|
||||||
package width
|
package width
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
// Code generated by running "go generate" in golang.org/x/text. DO NOT EDIT.
|
// Code generated by running "go generate" in golang.org/x/text. DO NOT EDIT.
|
||||||
|
|
||||||
|
//go:build go1.13 && !go1.14
|
||||||
// +build go1.13,!go1.14
|
// +build go1.13,!go1.14
|
||||||
|
|
||||||
package width
|
package width
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
// Code generated by running "go generate" in golang.org/x/text. DO NOT EDIT.
|
// Code generated by running "go generate" in golang.org/x/text. DO NOT EDIT.
|
||||||
|
|
||||||
|
//go:build go1.14 && !go1.16
|
||||||
// +build go1.14,!go1.16
|
// +build go1.14,!go1.16
|
||||||
|
|
||||||
package width
|
package width
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
// Code generated by running "go generate" in golang.org/x/text. DO NOT EDIT.
|
// Code generated by running "go generate" in golang.org/x/text. DO NOT EDIT.
|
||||||
|
|
||||||
|
//go:build go1.16
|
||||||
// +build go1.16
|
// +build go1.16
|
||||||
|
|
||||||
package width
|
package width
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
// Code generated by running "go generate" in golang.org/x/text. DO NOT EDIT.
|
// Code generated by running "go generate" in golang.org/x/text. DO NOT EDIT.
|
||||||
|
|
||||||
|
//go:build !go1.10
|
||||||
// +build !go1.10
|
// +build !go1.10
|
||||||
|
|
||||||
package width
|
package width
|
||||||
|
|
|
@ -17,6 +17,8 @@ limitations under the License.
|
||||||
package v1
|
package v1
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"bytes"
|
||||||
|
|
||||||
"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions"
|
"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions"
|
||||||
apiequality "k8s.io/apimachinery/pkg/api/equality"
|
apiequality "k8s.io/apimachinery/pkg/api/equality"
|
||||||
"k8s.io/apimachinery/pkg/conversion"
|
"k8s.io/apimachinery/pkg/conversion"
|
||||||
|
@ -36,20 +38,29 @@ func Convert_apiextensions_JSONSchemaProps_To_v1_JSONSchemaProps(in *apiextensio
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var nullLiteral = []byte(`null`)
|
||||||
|
|
||||||
func Convert_apiextensions_JSON_To_v1_JSON(in *apiextensions.JSON, out *JSON, s conversion.Scope) error {
|
func Convert_apiextensions_JSON_To_v1_JSON(in *apiextensions.JSON, out *JSON, s conversion.Scope) error {
|
||||||
raw, err := json.Marshal(*in)
|
raw, err := json.Marshal(*in)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
out.Raw = raw
|
if len(raw) == 0 || bytes.Equal(raw, nullLiteral) {
|
||||||
|
// match JSON#UnmarshalJSON treatment of literal nulls
|
||||||
|
out.Raw = nil
|
||||||
|
} else {
|
||||||
|
out.Raw = raw
|
||||||
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func Convert_v1_JSON_To_apiextensions_JSON(in *JSON, out *apiextensions.JSON, s conversion.Scope) error {
|
func Convert_v1_JSON_To_apiextensions_JSON(in *JSON, out *apiextensions.JSON, s conversion.Scope) error {
|
||||||
if in != nil {
|
if in != nil {
|
||||||
var i interface{}
|
var i interface{}
|
||||||
if err := json.Unmarshal(in.Raw, &i); err != nil {
|
if len(in.Raw) > 0 && !bytes.Equal(in.Raw, nullLiteral) {
|
||||||
return err
|
if err := json.Unmarshal(in.Raw, &i); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
}
|
}
|
||||||
*out = i
|
*out = i
|
||||||
} else {
|
} else {
|
||||||
|
@ -103,7 +114,7 @@ func Convert_apiextensions_CustomResourceDefinitionSpec_To_v1_CustomResourceDefi
|
||||||
|
|
||||||
func Convert_v1_CustomResourceDefinitionSpec_To_apiextensions_CustomResourceDefinitionSpec(in *CustomResourceDefinitionSpec, out *apiextensions.CustomResourceDefinitionSpec, s conversion.Scope) error {
|
func Convert_v1_CustomResourceDefinitionSpec_To_apiextensions_CustomResourceDefinitionSpec(in *CustomResourceDefinitionSpec, out *apiextensions.CustomResourceDefinitionSpec, s conversion.Scope) error {
|
||||||
if err := autoConvert_v1_CustomResourceDefinitionSpec_To_apiextensions_CustomResourceDefinitionSpec(in, out, s); err != nil {
|
if err := autoConvert_v1_CustomResourceDefinitionSpec_To_apiextensions_CustomResourceDefinitionSpec(in, out, s); err != nil {
|
||||||
return nil
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
if len(out.Versions) == 0 {
|
if len(out.Versions) == 0 {
|
||||||
|
|
|
@ -17,6 +17,7 @@ limitations under the License.
|
||||||
package v1
|
package v1
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"bytes"
|
||||||
"errors"
|
"errors"
|
||||||
|
|
||||||
"k8s.io/apimachinery/pkg/util/json"
|
"k8s.io/apimachinery/pkg/util/json"
|
||||||
|
@ -128,7 +129,7 @@ func (s JSON) MarshalJSON() ([]byte, error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *JSON) UnmarshalJSON(data []byte) error {
|
func (s *JSON) UnmarshalJSON(data []byte) error {
|
||||||
if len(data) > 0 && string(data) != "null" {
|
if len(data) > 0 && !bytes.Equal(data, nullLiteral) {
|
||||||
s.Raw = data
|
s.Raw = data
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
|
|
17
vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/conversion.go
generated
vendored
17
vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/conversion.go
generated
vendored
|
@ -17,6 +17,8 @@ limitations under the License.
|
||||||
package v1beta1
|
package v1beta1
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"bytes"
|
||||||
|
|
||||||
"k8s.io/apimachinery/pkg/conversion"
|
"k8s.io/apimachinery/pkg/conversion"
|
||||||
"k8s.io/apimachinery/pkg/util/json"
|
"k8s.io/apimachinery/pkg/util/json"
|
||||||
|
|
||||||
|
@ -36,20 +38,29 @@ func Convert_apiextensions_JSONSchemaProps_To_v1beta1_JSONSchemaProps(in *apiext
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var nullLiteral = []byte(`null`)
|
||||||
|
|
||||||
func Convert_apiextensions_JSON_To_v1beta1_JSON(in *apiextensions.JSON, out *JSON, s conversion.Scope) error {
|
func Convert_apiextensions_JSON_To_v1beta1_JSON(in *apiextensions.JSON, out *JSON, s conversion.Scope) error {
|
||||||
raw, err := json.Marshal(*in)
|
raw, err := json.Marshal(*in)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
out.Raw = raw
|
if len(raw) == 0 || bytes.Equal(raw, nullLiteral) {
|
||||||
|
// match JSON#UnmarshalJSON treatment of literal nulls
|
||||||
|
out.Raw = nil
|
||||||
|
} else {
|
||||||
|
out.Raw = raw
|
||||||
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func Convert_v1beta1_JSON_To_apiextensions_JSON(in *JSON, out *apiextensions.JSON, s conversion.Scope) error {
|
func Convert_v1beta1_JSON_To_apiextensions_JSON(in *JSON, out *apiextensions.JSON, s conversion.Scope) error {
|
||||||
if in != nil {
|
if in != nil {
|
||||||
var i interface{}
|
var i interface{}
|
||||||
if err := json.Unmarshal(in.Raw, &i); err != nil {
|
if len(in.Raw) > 0 && !bytes.Equal(in.Raw, nullLiteral) {
|
||||||
return err
|
if err := json.Unmarshal(in.Raw, &i); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
}
|
}
|
||||||
*out = i
|
*out = i
|
||||||
} else {
|
} else {
|
||||||
|
|
3
vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/marshal.go
generated
vendored
3
vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/marshal.go
generated
vendored
|
@ -17,6 +17,7 @@ limitations under the License.
|
||||||
package v1beta1
|
package v1beta1
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"bytes"
|
||||||
"errors"
|
"errors"
|
||||||
|
|
||||||
"k8s.io/apimachinery/pkg/util/json"
|
"k8s.io/apimachinery/pkg/util/json"
|
||||||
|
@ -128,7 +129,7 @@ func (s JSON) MarshalJSON() ([]byte, error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *JSON) UnmarshalJSON(data []byte) error {
|
func (s *JSON) UnmarshalJSON(data []byte) error {
|
||||||
if len(data) > 0 && string(data) != "null" {
|
if len(data) > 0 && !bytes.Equal(data, nullLiteral) {
|
||||||
s.Raw = data
|
s.Raw = data
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
|
|
|
@ -362,6 +362,16 @@ func NewEgressSelector(config *apiserver.EgressSelectorConfiguration) (*EgressSe
|
||||||
return cs, nil
|
return cs, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// NewEgressSelectorWithMap returns a EgressSelector with the supplied EgressType to DialFunc map.
|
||||||
|
func NewEgressSelectorWithMap(m map[EgressType]utilnet.DialFunc) *EgressSelector {
|
||||||
|
if m == nil {
|
||||||
|
m = make(map[EgressType]utilnet.DialFunc)
|
||||||
|
}
|
||||||
|
return &EgressSelector{
|
||||||
|
egressToDialer: m,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Lookup gets the dialer function for the network context.
|
// Lookup gets the dialer function for the network context.
|
||||||
// This is configured for the Kubernetes API Server at startup.
|
// This is configured for the Kubernetes API Server at startup.
|
||||||
func (cs *EgressSelector) Lookup(networkContext NetworkContext) (utilnet.DialFunc, error) {
|
func (cs *EgressSelector) Lookup(networkContext NetworkContext) (utilnet.DialFunc, error) {
|
||||||
|
|
|
@ -67,6 +67,14 @@ const timeFmt = "2006-01-02T15:04:05.999"
|
||||||
// undesired becomes completely unused, all the config objects are
|
// undesired becomes completely unused, all the config objects are
|
||||||
// read and processed as a whole.
|
// read and processed as a whole.
|
||||||
|
|
||||||
|
// The funcs in this package follow the naming convention that the suffix
|
||||||
|
// "Locked" means the relevant mutex must be locked at the start of each
|
||||||
|
// call and will be locked upon return. For a configController, the
|
||||||
|
// suffix "ReadLocked" stipulates a read lock while just "Locked"
|
||||||
|
// stipulates a full lock. Absence of either suffix means that either
|
||||||
|
// (a) the lock must NOT be held at call time and will not be held
|
||||||
|
// upon return or (b) locking is irrelevant.
|
||||||
|
|
||||||
// StartFunction begins the process of handling a request. If the
|
// StartFunction begins the process of handling a request. If the
|
||||||
// request gets queued then this function uses the given hashValue as
|
// request gets queued then this function uses the given hashValue as
|
||||||
// the source of entropy as it shuffle-shards the request into a
|
// the source of entropy as it shuffle-shards the request into a
|
||||||
|
@ -123,10 +131,22 @@ type configController struct {
|
||||||
// requestWaitLimit comes from server configuration.
|
// requestWaitLimit comes from server configuration.
|
||||||
requestWaitLimit time.Duration
|
requestWaitLimit time.Duration
|
||||||
|
|
||||||
|
// the most recent update attempts, ordered by increasing age.
|
||||||
|
// Consumer trims to keep only the last minute's worth of entries.
|
||||||
|
// The controller uses this to limit itself to at most six updates
|
||||||
|
// to a given FlowSchema in any minute.
|
||||||
|
// This may only be accessed from the one and only worker goroutine.
|
||||||
|
mostRecentUpdates []updateAttempt
|
||||||
|
|
||||||
// This must be locked while accessing flowSchemas or
|
// This must be locked while accessing flowSchemas or
|
||||||
// priorityLevelStates. It is the lock involved in
|
// priorityLevelStates. A lock for writing is needed
|
||||||
// LockingWriteMultiple.
|
// for writing to any of the following:
|
||||||
lock sync.Mutex
|
// - the flowSchemas field
|
||||||
|
// - the slice held in the flowSchemas field
|
||||||
|
// - the priorityLevelStates field
|
||||||
|
// - the map held in the priorityLevelStates field
|
||||||
|
// - any field of a priorityLevelState held in that map
|
||||||
|
lock sync.RWMutex
|
||||||
|
|
||||||
// flowSchemas holds the flow schema objects, sorted by increasing
|
// flowSchemas holds the flow schema objects, sorted by increasing
|
||||||
// numerical (decreasing logical) matching precedence. Every
|
// numerical (decreasing logical) matching precedence. Every
|
||||||
|
@ -137,13 +157,6 @@ type configController struct {
|
||||||
// name to the state for that level. Every name referenced from a
|
// name to the state for that level. Every name referenced from a
|
||||||
// member of `flowSchemas` has an entry here.
|
// member of `flowSchemas` has an entry here.
|
||||||
priorityLevelStates map[string]*priorityLevelState
|
priorityLevelStates map[string]*priorityLevelState
|
||||||
|
|
||||||
// the most recent update attempts, ordered by increasing age.
|
|
||||||
// Consumer trims to keep only the last minute's worth of entries.
|
|
||||||
// The controller uses this to limit itself to at most six updates
|
|
||||||
// to a given FlowSchema in any minute.
|
|
||||||
// This may only be accessed from the one and only worker goroutine.
|
|
||||||
mostRecentUpdates []updateAttempt
|
|
||||||
}
|
}
|
||||||
|
|
||||||
type updateAttempt struct {
|
type updateAttempt struct {
|
||||||
|
@ -276,8 +289,8 @@ func (cfgCtlr *configController) MaintainObservations(stopCh <-chan struct{}) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (cfgCtlr *configController) updateObservations() {
|
func (cfgCtlr *configController) updateObservations() {
|
||||||
cfgCtlr.lock.Lock()
|
cfgCtlr.lock.RLock()
|
||||||
defer cfgCtlr.lock.Unlock()
|
defer cfgCtlr.lock.RUnlock()
|
||||||
for _, plc := range cfgCtlr.priorityLevelStates {
|
for _, plc := range cfgCtlr.priorityLevelStates {
|
||||||
if plc.queues != nil {
|
if plc.queues != nil {
|
||||||
plc.queues.UpdateObservations()
|
plc.queues.UpdateObservations()
|
||||||
|
@ -760,8 +773,8 @@ func (immediateRequest) Finish(execute func()) bool {
|
||||||
// waiting in its queue, or `Time{}` if this did not happen.
|
// waiting in its queue, or `Time{}` if this did not happen.
|
||||||
func (cfgCtlr *configController) startRequest(ctx context.Context, rd RequestDigest, queueNoteFn fq.QueueNoteFn) (fs *flowcontrol.FlowSchema, pl *flowcontrol.PriorityLevelConfiguration, isExempt bool, req fq.Request, startWaitingTime time.Time) {
|
func (cfgCtlr *configController) startRequest(ctx context.Context, rd RequestDigest, queueNoteFn fq.QueueNoteFn) (fs *flowcontrol.FlowSchema, pl *flowcontrol.PriorityLevelConfiguration, isExempt bool, req fq.Request, startWaitingTime time.Time) {
|
||||||
klog.V(7).Infof("startRequest(%#+v)", rd)
|
klog.V(7).Infof("startRequest(%#+v)", rd)
|
||||||
cfgCtlr.lock.Lock()
|
cfgCtlr.lock.RLock()
|
||||||
defer cfgCtlr.lock.Unlock()
|
defer cfgCtlr.lock.RUnlock()
|
||||||
var selectedFlowSchema, catchAllFlowSchema *flowcontrol.FlowSchema
|
var selectedFlowSchema, catchAllFlowSchema *flowcontrol.FlowSchema
|
||||||
for _, fs := range cfgCtlr.flowSchemas {
|
for _, fs := range cfgCtlr.flowSchemas {
|
||||||
if matchesFlowSchema(rd, fs) {
|
if matchesFlowSchema(rd, fs) {
|
||||||
|
@ -806,7 +819,7 @@ func (cfgCtlr *configController) startRequest(ctx context.Context, rd RequestDig
|
||||||
klog.V(7).Infof("startRequest(%#+v) => fsName=%q, distMethod=%#+v, plName=%q, numQueues=%d", rd, selectedFlowSchema.Name, selectedFlowSchema.Spec.DistinguisherMethod, plName, numQueues)
|
klog.V(7).Infof("startRequest(%#+v) => fsName=%q, distMethod=%#+v, plName=%q, numQueues=%d", rd, selectedFlowSchema.Name, selectedFlowSchema.Spec.DistinguisherMethod, plName, numQueues)
|
||||||
req, idle := plState.queues.StartRequest(ctx, hashValue, flowDistinguisher, selectedFlowSchema.Name, rd.RequestInfo, rd.User, queueNoteFn)
|
req, idle := plState.queues.StartRequest(ctx, hashValue, flowDistinguisher, selectedFlowSchema.Name, rd.RequestInfo, rd.User, queueNoteFn)
|
||||||
if idle {
|
if idle {
|
||||||
cfgCtlr.maybeReapLocked(plName, plState)
|
cfgCtlr.maybeReapReadLocked(plName, plState)
|
||||||
}
|
}
|
||||||
return selectedFlowSchema, plState.pl, false, req, startWaitingTime
|
return selectedFlowSchema, plState.pl, false, req, startWaitingTime
|
||||||
}
|
}
|
||||||
|
@ -815,8 +828,8 @@ func (cfgCtlr *configController) startRequest(ctx context.Context, rd RequestDig
|
||||||
// priority level if it has no more use. Call this after getting a
|
// priority level if it has no more use. Call this after getting a
|
||||||
// clue that the given priority level is undesired and idle.
|
// clue that the given priority level is undesired and idle.
|
||||||
func (cfgCtlr *configController) maybeReap(plName string) {
|
func (cfgCtlr *configController) maybeReap(plName string) {
|
||||||
cfgCtlr.lock.Lock()
|
cfgCtlr.lock.RLock()
|
||||||
defer cfgCtlr.lock.Unlock()
|
defer cfgCtlr.lock.RUnlock()
|
||||||
plState := cfgCtlr.priorityLevelStates[plName]
|
plState := cfgCtlr.priorityLevelStates[plName]
|
||||||
if plState == nil {
|
if plState == nil {
|
||||||
klog.V(7).Infof("plName=%s, plState==nil", plName)
|
klog.V(7).Infof("plName=%s, plState==nil", plName)
|
||||||
|
@ -838,7 +851,7 @@ func (cfgCtlr *configController) maybeReap(plName string) {
|
||||||
// it has no more use. Call this if both (1) plState.queues is
|
// it has no more use. Call this if both (1) plState.queues is
|
||||||
// non-nil and reported being idle, and (2) cfgCtlr's lock has not
|
// non-nil and reported being idle, and (2) cfgCtlr's lock has not
|
||||||
// been released since then.
|
// been released since then.
|
||||||
func (cfgCtlr *configController) maybeReapLocked(plName string, plState *priorityLevelState) {
|
func (cfgCtlr *configController) maybeReapReadLocked(plName string, plState *priorityLevelState) {
|
||||||
if !(plState.quiescing && plState.numPending == 0) {
|
if !(plState.quiescing && plState.numPending == 0) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,8 +3,8 @@ package version
|
||||||
var (
|
var (
|
||||||
gitMajor = "1"
|
gitMajor = "1"
|
||||||
gitMinor = "21"
|
gitMinor = "21"
|
||||||
gitVersion = "v1.21.5-k3s1"
|
gitVersion = "v1.21.6-k3s1"
|
||||||
gitCommit = "43d7f3c07ed0f5f1e5a6c7f8f0122ec731aebc05"
|
gitCommit = "2500169b04d85bb5c5541a3c99cb1f0adc77da55"
|
||||||
gitTreeState = "clean"
|
gitTreeState = "clean"
|
||||||
buildDate = "2021-09-16T16:49:15Z"
|
buildDate = "2021-10-28T15:54:24Z"
|
||||||
)
|
)
|
||||||
|
|
|
@ -165,7 +165,7 @@ func Convert_Map_string_To_runtime_Object_To_Slice_v1_NamedExtension(in *map[str
|
||||||
newExtension := (*in)[key]
|
newExtension := (*in)[key]
|
||||||
oldExtension := runtime.RawExtension{}
|
oldExtension := runtime.RawExtension{}
|
||||||
if err := runtime.Convert_runtime_Object_To_runtime_RawExtension(&newExtension, &oldExtension, s); err != nil {
|
if err := runtime.Convert_runtime_Object_To_runtime_RawExtension(&newExtension, &oldExtension, s); err != nil {
|
||||||
return nil
|
return err
|
||||||
}
|
}
|
||||||
namedExtension := NamedExtension{key, oldExtension}
|
namedExtension := NamedExtension{key, oldExtension}
|
||||||
*out = append(*out, namedExtension)
|
*out = append(*out, namedExtension)
|
||||||
|
|
|
@ -15,7 +15,7 @@ require (
|
||||||
k8s.io/client-go v0.0.0
|
k8s.io/client-go v0.0.0
|
||||||
k8s.io/component-base v0.0.0
|
k8s.io/component-base v0.0.0
|
||||||
k8s.io/controller-manager v0.0.0
|
k8s.io/controller-manager v0.0.0
|
||||||
k8s.io/klog/v2 v2.8.0
|
k8s.io/klog/v2 v2.9.0
|
||||||
k8s.io/utils v0.0.0-20201110183641-67b214c5f920
|
k8s.io/utils v0.0.0-20201110183641-67b214c5f920
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -523,8 +523,8 @@ golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||||
golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||||
golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
|
golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
|
||||||
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||||
golang.org/x/text v0.3.4 h1:0YWbFKbhXG/wIiuHDSKpS0Iy7FSA+u45VtBMfQcFTTc=
|
golang.org/x/text v0.3.6 h1:aRYxNxv6iGQlyVaZmk6ZgYEDa+Jg18DxebPSrd6bg1M=
|
||||||
golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||||
golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
||||||
golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
||||||
golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
||||||
|
@ -670,8 +670,8 @@ honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt
|
||||||
honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k=
|
honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k=
|
||||||
k8s.io/gengo v0.0.0-20200413195148-3a45101e95ac/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0=
|
k8s.io/gengo v0.0.0-20200413195148-3a45101e95ac/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0=
|
||||||
k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE=
|
k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE=
|
||||||
k8s.io/klog/v2 v2.8.0 h1:Q3gmuM9hKEjefWFFYF0Mat+YyFJvsUyYuwyNNJ5C9Ts=
|
k8s.io/klog/v2 v2.9.0 h1:D7HV+n1V57XeZ0m6tdRkfknthUaM06VFbWldOFh8kzM=
|
||||||
k8s.io/klog/v2 v2.8.0/go.mod h1:hy9LJ/NvuK+iVyP4Ehqva4HxZG/oXyIS3n3Jmire4Ec=
|
k8s.io/klog/v2 v2.9.0/go.mod h1:hy9LJ/NvuK+iVyP4Ehqva4HxZG/oXyIS3n3Jmire4Ec=
|
||||||
k8s.io/kube-openapi v0.0.0-20210305001622-591a79e4bda7 h1:vEx13qjvaZ4yfObSSXW7BrMc/KQBBT/Jyee8XtLf4x0=
|
k8s.io/kube-openapi v0.0.0-20210305001622-591a79e4bda7 h1:vEx13qjvaZ4yfObSSXW7BrMc/KQBBT/Jyee8XtLf4x0=
|
||||||
k8s.io/kube-openapi v0.0.0-20210305001622-591a79e4bda7/go.mod h1:wXW5VT87nVfh/iLV8FpR2uDvrFyomxbtb1KivDbvPTE=
|
k8s.io/kube-openapi v0.0.0-20210305001622-591a79e4bda7/go.mod h1:wXW5VT87nVfh/iLV8FpR2uDvrFyomxbtb1KivDbvPTE=
|
||||||
k8s.io/utils v0.0.0-20201110183641-67b214c5f920 h1:CbnUZsM497iRC5QMVkHwyl8s2tB3g7yaSHkYPkpgelw=
|
k8s.io/utils v0.0.0-20201110183641-67b214c5f920 h1:CbnUZsM497iRC5QMVkHwyl8s2tB3g7yaSHkYPkpgelw=
|
||||||
|
|
|
@ -3,8 +3,8 @@ package version
|
||||||
var (
|
var (
|
||||||
gitMajor = "1"
|
gitMajor = "1"
|
||||||
gitMinor = "21"
|
gitMinor = "21"
|
||||||
gitVersion = "v1.21.5-k3s1"
|
gitVersion = "v1.21.6-k3s1"
|
||||||
gitCommit = "43d7f3c07ed0f5f1e5a6c7f8f0122ec731aebc05"
|
gitCommit = "2500169b04d85bb5c5541a3c99cb1f0adc77da55"
|
||||||
gitTreeState = "clean"
|
gitTreeState = "clean"
|
||||||
buildDate = "2021-09-16T16:49:15Z"
|
buildDate = "2021-10-28T15:54:24Z"
|
||||||
)
|
)
|
||||||
|
|
|
@ -8,7 +8,7 @@ require (
|
||||||
github.com/stretchr/testify v1.6.1
|
github.com/stretchr/testify v1.6.1
|
||||||
k8s.io/api v0.0.0
|
k8s.io/api v0.0.0
|
||||||
k8s.io/apimachinery v0.0.0
|
k8s.io/apimachinery v0.0.0
|
||||||
k8s.io/klog/v2 v2.8.0
|
k8s.io/klog/v2 v2.9.0
|
||||||
)
|
)
|
||||||
|
|
||||||
replace (
|
replace (
|
||||||
|
|
|
@ -117,8 +117,8 @@ golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9sn
|
||||||
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||||
golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
|
golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
|
||||||
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||||
golang.org/x/text v0.3.4 h1:0YWbFKbhXG/wIiuHDSKpS0Iy7FSA+u45VtBMfQcFTTc=
|
golang.org/x/text v0.3.6 h1:aRYxNxv6iGQlyVaZmk6ZgYEDa+Jg18DxebPSrd6bg1M=
|
||||||
golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||||
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||||
golang.org/x/tools v0.0.0-20190614205625-5aca471b1d59/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
|
golang.org/x/tools v0.0.0-20190614205625-5aca471b1d59/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
|
||||||
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
||||||
|
@ -149,8 +149,8 @@ gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie
|
||||||
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||||
k8s.io/gengo v0.0.0-20200413195148-3a45101e95ac/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0=
|
k8s.io/gengo v0.0.0-20200413195148-3a45101e95ac/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0=
|
||||||
k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE=
|
k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE=
|
||||||
k8s.io/klog/v2 v2.8.0 h1:Q3gmuM9hKEjefWFFYF0Mat+YyFJvsUyYuwyNNJ5C9Ts=
|
k8s.io/klog/v2 v2.9.0 h1:D7HV+n1V57XeZ0m6tdRkfknthUaM06VFbWldOFh8kzM=
|
||||||
k8s.io/klog/v2 v2.8.0/go.mod h1:hy9LJ/NvuK+iVyP4Ehqva4HxZG/oXyIS3n3Jmire4Ec=
|
k8s.io/klog/v2 v2.9.0/go.mod h1:hy9LJ/NvuK+iVyP4Ehqva4HxZG/oXyIS3n3Jmire4Ec=
|
||||||
k8s.io/kube-openapi v0.0.0-20210305001622-591a79e4bda7/go.mod h1:wXW5VT87nVfh/iLV8FpR2uDvrFyomxbtb1KivDbvPTE=
|
k8s.io/kube-openapi v0.0.0-20210305001622-591a79e4bda7/go.mod h1:wXW5VT87nVfh/iLV8FpR2uDvrFyomxbtb1KivDbvPTE=
|
||||||
sigs.k8s.io/structured-merge-diff/v4 v4.0.2/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw=
|
sigs.k8s.io/structured-merge-diff/v4 v4.0.2/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw=
|
||||||
sigs.k8s.io/structured-merge-diff/v4 v4.1.2 h1:Hr/htKFmJEbtMgS/UD0N+gtgctAqz81t3nu+sPzynno=
|
sigs.k8s.io/structured-merge-diff/v4 v4.1.2 h1:Hr/htKFmJEbtMgS/UD0N+gtgctAqz81t3nu+sPzynno=
|
||||||
|
|
|
@ -284,6 +284,7 @@ func (m *moduleSpec) Get() interface{} {
|
||||||
|
|
||||||
var errVmoduleSyntax = errors.New("syntax error: expect comma-separated list of filename=N")
|
var errVmoduleSyntax = errors.New("syntax error: expect comma-separated list of filename=N")
|
||||||
|
|
||||||
|
// Set will sets module value
|
||||||
// Syntax: -vmodule=recordio=2,file=1,gfs*=3
|
// Syntax: -vmodule=recordio=2,file=1,gfs*=3
|
||||||
func (m *moduleSpec) Set(value string) error {
|
func (m *moduleSpec) Set(value string) error {
|
||||||
var filter []modulePat
|
var filter []modulePat
|
||||||
|
@ -362,6 +363,7 @@ func (t *traceLocation) Get() interface{} {
|
||||||
|
|
||||||
var errTraceSyntax = errors.New("syntax error: expect file.go:234")
|
var errTraceSyntax = errors.New("syntax error: expect file.go:234")
|
||||||
|
|
||||||
|
// Set will sets backtrace value
|
||||||
// Syntax: -log_backtrace_at=gopherflakes.go:234
|
// Syntax: -log_backtrace_at=gopherflakes.go:234
|
||||||
// Note that unlike vmodule the file extension is included here.
|
// Note that unlike vmodule the file extension is included here.
|
||||||
func (t *traceLocation) Set(value string) error {
|
func (t *traceLocation) Set(value string) error {
|
||||||
|
@ -708,7 +710,7 @@ func (l *loggingT) println(s severity, logr logr.Logger, filter LogFilter, args
|
||||||
args = filter.Filter(args)
|
args = filter.Filter(args)
|
||||||
}
|
}
|
||||||
fmt.Fprintln(buf, args...)
|
fmt.Fprintln(buf, args...)
|
||||||
l.output(s, logr, buf, file, line, false)
|
l.output(s, logr, buf, 0 /* depth */, file, line, false)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (l *loggingT) print(s severity, logr logr.Logger, filter LogFilter, args ...interface{}) {
|
func (l *loggingT) print(s severity, logr logr.Logger, filter LogFilter, args ...interface{}) {
|
||||||
|
@ -730,7 +732,7 @@ func (l *loggingT) printDepth(s severity, logr logr.Logger, filter LogFilter, de
|
||||||
if buf.Bytes()[buf.Len()-1] != '\n' {
|
if buf.Bytes()[buf.Len()-1] != '\n' {
|
||||||
buf.WriteByte('\n')
|
buf.WriteByte('\n')
|
||||||
}
|
}
|
||||||
l.output(s, logr, buf, file, line, false)
|
l.output(s, logr, buf, depth, file, line, false)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (l *loggingT) printf(s severity, logr logr.Logger, filter LogFilter, format string, args ...interface{}) {
|
func (l *loggingT) printf(s severity, logr logr.Logger, filter LogFilter, format string, args ...interface{}) {
|
||||||
|
@ -748,7 +750,7 @@ func (l *loggingT) printf(s severity, logr logr.Logger, filter LogFilter, format
|
||||||
if buf.Bytes()[buf.Len()-1] != '\n' {
|
if buf.Bytes()[buf.Len()-1] != '\n' {
|
||||||
buf.WriteByte('\n')
|
buf.WriteByte('\n')
|
||||||
}
|
}
|
||||||
l.output(s, logr, buf, file, line, false)
|
l.output(s, logr, buf, 0 /* depth */, file, line, false)
|
||||||
}
|
}
|
||||||
|
|
||||||
// printWithFileLine behaves like print but uses the provided file and line number. If
|
// printWithFileLine behaves like print but uses the provided file and line number. If
|
||||||
|
@ -769,7 +771,7 @@ func (l *loggingT) printWithFileLine(s severity, logr logr.Logger, filter LogFil
|
||||||
if buf.Bytes()[buf.Len()-1] != '\n' {
|
if buf.Bytes()[buf.Len()-1] != '\n' {
|
||||||
buf.WriteByte('\n')
|
buf.WriteByte('\n')
|
||||||
}
|
}
|
||||||
l.output(s, logr, buf, file, line, alsoToStderr)
|
l.output(s, logr, buf, 2 /* depth */, file, line, alsoToStderr)
|
||||||
}
|
}
|
||||||
|
|
||||||
// if loggr is specified, will call loggr.Error, otherwise output with logging module.
|
// if loggr is specified, will call loggr.Error, otherwise output with logging module.
|
||||||
|
@ -778,7 +780,7 @@ func (l *loggingT) errorS(err error, loggr logr.Logger, filter LogFilter, depth
|
||||||
msg, keysAndValues = filter.FilterS(msg, keysAndValues)
|
msg, keysAndValues = filter.FilterS(msg, keysAndValues)
|
||||||
}
|
}
|
||||||
if loggr != nil {
|
if loggr != nil {
|
||||||
loggr.Error(err, msg, keysAndValues...)
|
logr.WithCallDepth(loggr, depth+2).Error(err, msg, keysAndValues...)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
l.printS(err, errorLog, depth+1, msg, keysAndValues...)
|
l.printS(err, errorLog, depth+1, msg, keysAndValues...)
|
||||||
|
@ -790,7 +792,7 @@ func (l *loggingT) infoS(loggr logr.Logger, filter LogFilter, depth int, msg str
|
||||||
msg, keysAndValues = filter.FilterS(msg, keysAndValues)
|
msg, keysAndValues = filter.FilterS(msg, keysAndValues)
|
||||||
}
|
}
|
||||||
if loggr != nil {
|
if loggr != nil {
|
||||||
loggr.Info(msg, keysAndValues...)
|
logr.WithCallDepth(loggr, depth+2).Info(msg, keysAndValues...)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
l.printS(nil, infoLog, depth+1, msg, keysAndValues...)
|
l.printS(nil, infoLog, depth+1, msg, keysAndValues...)
|
||||||
|
@ -825,6 +827,8 @@ func kvListFormat(b *bytes.Buffer, keysAndValues ...interface{}) {
|
||||||
switch v.(type) {
|
switch v.(type) {
|
||||||
case string, error:
|
case string, error:
|
||||||
b.WriteString(fmt.Sprintf("%s=%q", k, v))
|
b.WriteString(fmt.Sprintf("%s=%q", k, v))
|
||||||
|
case []byte:
|
||||||
|
b.WriteString(fmt.Sprintf("%s=%+q", k, v))
|
||||||
default:
|
default:
|
||||||
if _, ok := v.(fmt.Stringer); ok {
|
if _, ok := v.(fmt.Stringer); ok {
|
||||||
b.WriteString(fmt.Sprintf("%s=%q", k, v))
|
b.WriteString(fmt.Sprintf("%s=%q", k, v))
|
||||||
|
@ -855,12 +859,13 @@ func (rb *redirectBuffer) Write(bytes []byte) (n int, err error) {
|
||||||
// SetLogger will set the backing logr implementation for klog.
|
// SetLogger will set the backing logr implementation for klog.
|
||||||
// If set, all log lines will be suppressed from the regular Output, and
|
// If set, all log lines will be suppressed from the regular Output, and
|
||||||
// redirected to the logr implementation.
|
// redirected to the logr implementation.
|
||||||
// All log lines include the 'severity', 'file' and 'line' values attached as
|
|
||||||
// structured logging values.
|
|
||||||
// Use as:
|
// Use as:
|
||||||
// ...
|
// ...
|
||||||
// klog.SetLogger(zapr.NewLogger(zapLog))
|
// klog.SetLogger(zapr.NewLogger(zapLog))
|
||||||
func SetLogger(logr logr.Logger) {
|
func SetLogger(logr logr.Logger) {
|
||||||
|
logging.mu.Lock()
|
||||||
|
defer logging.mu.Unlock()
|
||||||
|
|
||||||
logging.logr = logr
|
logging.logr = logr
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -899,7 +904,7 @@ func LogToStderr(stderr bool) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// output writes the data to the log files and releases the buffer.
|
// output writes the data to the log files and releases the buffer.
|
||||||
func (l *loggingT) output(s severity, log logr.Logger, buf *buffer, file string, line int, alsoToStderr bool) {
|
func (l *loggingT) output(s severity, log logr.Logger, buf *buffer, depth int, file string, line int, alsoToStderr bool) {
|
||||||
l.mu.Lock()
|
l.mu.Lock()
|
||||||
if l.traceLocation.isSet() {
|
if l.traceLocation.isSet() {
|
||||||
if l.traceLocation.match(file, line) {
|
if l.traceLocation.match(file, line) {
|
||||||
|
@ -911,9 +916,9 @@ func (l *loggingT) output(s severity, log logr.Logger, buf *buffer, file string,
|
||||||
// TODO: set 'severity' and caller information as structured log info
|
// TODO: set 'severity' and caller information as structured log info
|
||||||
// keysAndValues := []interface{}{"severity", severityName[s], "file", file, "line", line}
|
// keysAndValues := []interface{}{"severity", severityName[s], "file", file, "line", line}
|
||||||
if s == errorLog {
|
if s == errorLog {
|
||||||
l.logr.Error(nil, string(data))
|
logr.WithCallDepth(l.logr, depth+3).Error(nil, string(data))
|
||||||
} else {
|
} else {
|
||||||
log.Info(string(data))
|
logr.WithCallDepth(log, depth+3).Info(string(data))
|
||||||
}
|
}
|
||||||
} else if l.toStderr {
|
} else if l.toStderr {
|
||||||
os.Stderr.Write(data)
|
os.Stderr.Write(data)
|
||||||
|
|
|
@ -26,7 +26,6 @@ import (
|
||||||
|
|
||||||
"k8s.io/apimachinery/pkg/runtime"
|
"k8s.io/apimachinery/pkg/runtime"
|
||||||
"k8s.io/apimachinery/pkg/util/httpstream"
|
"k8s.io/apimachinery/pkg/util/httpstream"
|
||||||
"k8s.io/apimachinery/pkg/util/httpstream/spdy"
|
|
||||||
utilnet "k8s.io/apimachinery/pkg/util/net"
|
utilnet "k8s.io/apimachinery/pkg/util/net"
|
||||||
"k8s.io/apimachinery/pkg/util/proxy"
|
"k8s.io/apimachinery/pkg/util/proxy"
|
||||||
"k8s.io/apiserver/pkg/endpoints/handlers/responsewriters"
|
"k8s.io/apiserver/pkg/endpoints/handlers/responsewriters"
|
||||||
|
@ -159,23 +158,21 @@ func (r *proxyHandler) ServeHTTP(w http.ResponseWriter, req *http.Request) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
// we need to wrap the roundtripper in another roundtripper which will apply the front proxy headers
|
proxyRoundTripper := handlingInfo.proxyRoundTripper
|
||||||
proxyRoundTripper, upgrade, err := maybeWrapForConnectionUpgrades(handlingInfo.restConfig, handlingInfo.proxyRoundTripper, req)
|
upgrade := httpstream.IsUpgradeRequest(req)
|
||||||
if err != nil {
|
|
||||||
proxyError(w, req, err.Error(), http.StatusInternalServerError)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
proxyRoundTripper = transport.NewAuthProxyRoundTripper(user.GetName(), user.GetGroups(), user.GetExtra(), proxyRoundTripper)
|
proxyRoundTripper = transport.NewAuthProxyRoundTripper(user.GetName(), user.GetGroups(), user.GetExtra(), proxyRoundTripper)
|
||||||
|
|
||||||
// if we are upgrading, then the upgrade path tries to use this request with the TLS config we provide, but it does
|
// If we are upgrading, then the upgrade path tries to use this request with the TLS config we provide, but it does
|
||||||
// NOT use the roundtripper. Its a direct call that bypasses the round tripper. This means that we have to
|
// NOT use the proxyRoundTripper. It's a direct dial that bypasses the proxyRoundTripper. This means that we have to
|
||||||
// attach the "correct" user headers to the request ahead of time. After the initial upgrade, we'll be back
|
// attach the "correct" user headers to the request ahead of time.
|
||||||
// at the roundtripper flow, so we only have to muck with this request, but we do have to do it.
|
|
||||||
if upgrade {
|
if upgrade {
|
||||||
transport.SetAuthProxyHeaders(newReq, user.GetName(), user.GetGroups(), user.GetExtra())
|
transport.SetAuthProxyHeaders(newReq, user.GetName(), user.GetGroups(), user.GetExtra())
|
||||||
}
|
}
|
||||||
|
|
||||||
handler := proxy.NewUpgradeAwareHandler(location, proxyRoundTripper, true, upgrade, &responder{w: w})
|
handler := proxy.NewUpgradeAwareHandler(location, proxyRoundTripper, true, upgrade, &responder{w: w})
|
||||||
|
handler.InterceptRedirects = utilfeature.DefaultFeatureGate.Enabled(genericfeatures.StreamingProxyRedirects)
|
||||||
|
handler.RequireSameHostRedirects = utilfeature.DefaultFeatureGate.Enabled(genericfeatures.ValidateProxyRedirects)
|
||||||
handler.ServeHTTP(w, newReq)
|
handler.ServeHTTP(w, newReq)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -204,27 +201,6 @@ func newRequestForProxy(location *url.URL, req *http.Request) (*http.Request, co
|
||||||
return newReq, cancelFn
|
return newReq, cancelFn
|
||||||
}
|
}
|
||||||
|
|
||||||
// maybeWrapForConnectionUpgrades wraps the roundtripper for upgrades. The bool indicates if it was wrapped
|
|
||||||
func maybeWrapForConnectionUpgrades(restConfig *restclient.Config, rt http.RoundTripper, req *http.Request) (http.RoundTripper, bool, error) {
|
|
||||||
if !httpstream.IsUpgradeRequest(req) {
|
|
||||||
return rt, false, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
tlsConfig, err := restclient.TLSConfigFor(restConfig)
|
|
||||||
if err != nil {
|
|
||||||
return nil, true, err
|
|
||||||
}
|
|
||||||
followRedirects := utilfeature.DefaultFeatureGate.Enabled(genericfeatures.StreamingProxyRedirects)
|
|
||||||
requireSameHostRedirects := utilfeature.DefaultFeatureGate.Enabled(genericfeatures.ValidateProxyRedirects)
|
|
||||||
upgradeRoundTripper := spdy.NewRoundTripper(tlsConfig, followRedirects, requireSameHostRedirects)
|
|
||||||
wrappedRT, err := restclient.HTTPWrappersForConfig(restConfig, upgradeRoundTripper)
|
|
||||||
if err != nil {
|
|
||||||
return nil, true, err
|
|
||||||
}
|
|
||||||
|
|
||||||
return wrappedRT, true, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// responder implements rest.Responder for assisting a connector in writing objects or errors.
|
// responder implements rest.Responder for assisting a connector in writing objects or errors.
|
||||||
type responder struct {
|
type responder struct {
|
||||||
w http.ResponseWriter
|
w http.ResponseWriter
|
||||||
|
|
|
@ -577,7 +577,7 @@ func startPVCProtectionController(ctx ControllerContext) (http.Handler, bool, er
|
||||||
ctx.InformerFactory.Core().V1().Pods(),
|
ctx.InformerFactory.Core().V1().Pods(),
|
||||||
ctx.ClientBuilder.ClientOrDie("pvc-protection-controller"),
|
ctx.ClientBuilder.ClientOrDie("pvc-protection-controller"),
|
||||||
utilfeature.DefaultFeatureGate.Enabled(features.StorageObjectInUseProtection),
|
utilfeature.DefaultFeatureGate.Enabled(features.StorageObjectInUseProtection),
|
||||||
utilfeature.DefaultFeatureGate.Enabled(features.StorageObjectInUseProtection),
|
utilfeature.DefaultFeatureGate.Enabled(features.GenericEphemeralVolume),
|
||||||
)
|
)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, true, fmt.Errorf("failed to start the pvc protection controller: %v", err)
|
return nil, true, fmt.Errorf("failed to start the pvc protection controller: %v", err)
|
||||||
|
|
|
@ -22,11 +22,14 @@ import (
|
||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
|
"net"
|
||||||
"net/http"
|
"net/http"
|
||||||
"os"
|
"os"
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
utilnode "k8s.io/kubernetes/pkg/util/node"
|
||||||
|
|
||||||
"github.com/fsnotify/fsnotify"
|
"github.com/fsnotify/fsnotify"
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
"github.com/spf13/pflag"
|
"github.com/spf13/pflag"
|
||||||
|
@ -83,6 +86,7 @@ import (
|
||||||
utilipvs "k8s.io/kubernetes/pkg/util/ipvs"
|
utilipvs "k8s.io/kubernetes/pkg/util/ipvs"
|
||||||
"k8s.io/kubernetes/pkg/util/oom"
|
"k8s.io/kubernetes/pkg/util/oom"
|
||||||
"k8s.io/utils/exec"
|
"k8s.io/utils/exec"
|
||||||
|
utilsnet "k8s.io/utils/net"
|
||||||
utilpointer "k8s.io/utils/pointer"
|
utilpointer "k8s.io/utils/pointer"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -814,3 +818,36 @@ func (s *ProxyServer) CleanupAndExit() error {
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// detectNodeIP returns the nodeIP used by the proxier
|
||||||
|
// The order of precedence is:
|
||||||
|
// 1. config.bindAddress if bindAddress is not 0.0.0.0 or ::
|
||||||
|
// 2. the primary IP from the Node object, if set
|
||||||
|
// 3. if no IP is found it defaults to 127.0.0.1 and IPv4
|
||||||
|
func detectNodeIP(client clientset.Interface, hostname, bindAddress string) net.IP {
|
||||||
|
nodeIP := net.ParseIP(bindAddress)
|
||||||
|
if nodeIP.IsUnspecified() {
|
||||||
|
nodeIP = utilnode.GetNodeIP(client, hostname)
|
||||||
|
}
|
||||||
|
if nodeIP == nil {
|
||||||
|
klog.V(0).Infof("can't determine this node's IP, assuming 127.0.0.1; if this is incorrect, please set the --bind-address flag")
|
||||||
|
nodeIP = net.ParseIP("127.0.0.1")
|
||||||
|
}
|
||||||
|
return nodeIP
|
||||||
|
}
|
||||||
|
|
||||||
|
// nodeIPTuple takes an addresses and return a tuple (ipv4,ipv6)
|
||||||
|
// The returned tuple is guaranteed to have the order (ipv4,ipv6). The address NOT of the passed address
|
||||||
|
// will have "any" address (0.0.0.0 or ::) inserted.
|
||||||
|
func nodeIPTuple(bindAddress string) [2]net.IP {
|
||||||
|
nodes := [2]net.IP{net.IPv4zero, net.IPv6zero}
|
||||||
|
|
||||||
|
adr := net.ParseIP(bindAddress)
|
||||||
|
if utilsnet.IsIPv6(adr) {
|
||||||
|
nodes[1] = adr
|
||||||
|
} else {
|
||||||
|
nodes[0] = adr
|
||||||
|
}
|
||||||
|
|
||||||
|
return nodes
|
||||||
|
}
|
||||||
|
|
|
@ -435,23 +435,6 @@ func waitForPodCIDR(client clientset.Interface, nodeName string) (*v1.Node, erro
|
||||||
return nil, fmt.Errorf("event object not of type node")
|
return nil, fmt.Errorf("event object not of type node")
|
||||||
}
|
}
|
||||||
|
|
||||||
// detectNodeIP returns the nodeIP used by the proxier
|
|
||||||
// The order of precedence is:
|
|
||||||
// 1. config.bindAddress if bindAddress is not 0.0.0.0 or ::
|
|
||||||
// 2. the primary IP from the Node object, if set
|
|
||||||
// 3. if no IP is found it defaults to 127.0.0.1 and IPv4
|
|
||||||
func detectNodeIP(client clientset.Interface, hostname, bindAddress string) net.IP {
|
|
||||||
nodeIP := net.ParseIP(bindAddress)
|
|
||||||
if nodeIP.IsUnspecified() {
|
|
||||||
nodeIP = utilnode.GetNodeIP(client, hostname)
|
|
||||||
}
|
|
||||||
if nodeIP == nil {
|
|
||||||
klog.V(0).Infof("can't determine this node's IP, assuming 127.0.0.1; if this is incorrect, please set the --bind-address flag")
|
|
||||||
nodeIP = net.ParseIP("127.0.0.1")
|
|
||||||
}
|
|
||||||
return nodeIP
|
|
||||||
}
|
|
||||||
|
|
||||||
func detectNumCPU() int {
|
func detectNumCPU() int {
|
||||||
// try get numCPU from /sys firstly due to a known issue (https://github.com/kubernetes/kubernetes/issues/99225)
|
// try get numCPU from /sys firstly due to a known issue (https://github.com/kubernetes/kubernetes/issues/99225)
|
||||||
_, numCPU, err := machine.GetTopology(sysfs.NewRealSysFs())
|
_, numCPU, err := machine.GetTopology(sysfs.NewRealSysFs())
|
||||||
|
@ -577,22 +560,6 @@ func cidrTuple(cidrList string) [2]string {
|
||||||
return cidrs
|
return cidrs
|
||||||
}
|
}
|
||||||
|
|
||||||
// nodeIPTuple takes an addresses and return a tuple (ipv4,ipv6)
|
|
||||||
// The returned tuple is guaranteed to have the order (ipv4,ipv6). The address NOT of the passed address
|
|
||||||
// will have "any" address (0.0.0.0 or ::) inserted.
|
|
||||||
func nodeIPTuple(bindAddress string) [2]net.IP {
|
|
||||||
nodes := [2]net.IP{net.IPv4zero, net.IPv6zero}
|
|
||||||
|
|
||||||
adr := net.ParseIP(bindAddress)
|
|
||||||
if utilsnet.IsIPv6(adr) {
|
|
||||||
nodes[1] = adr
|
|
||||||
} else {
|
|
||||||
nodes[0] = adr
|
|
||||||
}
|
|
||||||
|
|
||||||
return nodes
|
|
||||||
}
|
|
||||||
|
|
||||||
func getProxyMode(proxyMode string, canUseIPVS bool, kcompat iptables.KernelCompatTester) string {
|
func getProxyMode(proxyMode string, canUseIPVS bool, kcompat iptables.KernelCompatTester) string {
|
||||||
switch proxyMode {
|
switch proxyMode {
|
||||||
case proxyModeUserspace:
|
case proxyModeUserspace:
|
||||||
|
|
|
@ -47,7 +47,6 @@ import (
|
||||||
utilnetsh "k8s.io/kubernetes/pkg/util/netsh"
|
utilnetsh "k8s.io/kubernetes/pkg/util/netsh"
|
||||||
utilnode "k8s.io/kubernetes/pkg/util/node"
|
utilnode "k8s.io/kubernetes/pkg/util/node"
|
||||||
"k8s.io/utils/exec"
|
"k8s.io/utils/exec"
|
||||||
utilsnet "k8s.io/utils/net"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
// NewProxyServer returns a new ProxyServer.
|
// NewProxyServer returns a new ProxyServer.
|
||||||
|
@ -85,6 +84,9 @@ func newProxyServer(config *proxyconfigapi.KubeProxyConfiguration, cleanupAndExi
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
nodeIP := detectNodeIP(client, hostname, config.BindAddress)
|
||||||
|
klog.InfoS("Detected node IP", "IP", nodeIP.String())
|
||||||
|
|
||||||
eventBroadcaster := record.NewBroadcaster()
|
eventBroadcaster := record.NewBroadcaster()
|
||||||
recorder := eventBroadcaster.NewRecorder(proxyconfigscheme.Scheme, v1.EventSource{Component: "kube-proxy", Host: hostname})
|
recorder := eventBroadcaster.NewRecorder(proxyconfigscheme.Scheme, v1.EventSource{Component: "kube-proxy", Host: hostname})
|
||||||
|
|
||||||
|
@ -101,12 +103,11 @@ func newProxyServer(config *proxyconfigapi.KubeProxyConfiguration, cleanupAndExi
|
||||||
}
|
}
|
||||||
|
|
||||||
var proxier proxy.Provider
|
var proxier proxy.Provider
|
||||||
|
|
||||||
proxyMode := getProxyMode(string(config.Mode), winkernel.WindowsKernelCompatTester{})
|
proxyMode := getProxyMode(string(config.Mode), winkernel.WindowsKernelCompatTester{})
|
||||||
|
dualStackMode := getDualStackMode(config.Winkernel.NetworkName, winkernel.DualStackCompatTester{})
|
||||||
if proxyMode == proxyModeKernelspace {
|
if proxyMode == proxyModeKernelspace {
|
||||||
klog.V(0).Info("Using Kernelspace Proxier.")
|
klog.V(0).Info("Using Kernelspace Proxier.")
|
||||||
isIPv6DualStackEnabled := utilfeature.DefaultFeatureGate.Enabled(features.IPv6DualStack)
|
if dualStackMode {
|
||||||
if isIPv6DualStackEnabled {
|
|
||||||
klog.V(0).Info("creating dualStackProxier for Windows kernel.")
|
klog.V(0).Info("creating dualStackProxier for Windows kernel.")
|
||||||
|
|
||||||
proxier, err = winkernel.NewDualStackProxier(
|
proxier, err = winkernel.NewDualStackProxier(
|
||||||
|
@ -130,7 +131,7 @@ func newProxyServer(config *proxyconfigapi.KubeProxyConfiguration, cleanupAndExi
|
||||||
int(*config.IPTables.MasqueradeBit),
|
int(*config.IPTables.MasqueradeBit),
|
||||||
config.ClusterCIDR,
|
config.ClusterCIDR,
|
||||||
hostname,
|
hostname,
|
||||||
utilnode.GetNodeIP(client, hostname),
|
nodeIP,
|
||||||
recorder,
|
recorder,
|
||||||
healthzServer,
|
healthzServer,
|
||||||
config.Winkernel,
|
config.Winkernel,
|
||||||
|
@ -183,6 +184,10 @@ func newProxyServer(config *proxyconfigapi.KubeProxyConfiguration, cleanupAndExi
|
||||||
}, nil
|
}, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func getDualStackMode(networkname string, compatTester winkernel.StackCompatTester) bool {
|
||||||
|
return compatTester.DualStackCompatible(networkname)
|
||||||
|
}
|
||||||
|
|
||||||
func getProxyMode(proxyMode string, kcompat winkernel.KernelCompatTester) string {
|
func getProxyMode(proxyMode string, kcompat winkernel.KernelCompatTester) string {
|
||||||
if proxyMode == proxyModeKernelspace {
|
if proxyMode == proxyModeKernelspace {
|
||||||
return tryWinKernelSpaceProxy(kcompat)
|
return tryWinKernelSpaceProxy(kcompat)
|
||||||
|
@ -211,19 +216,3 @@ func tryWinKernelSpaceProxy(kcompat winkernel.KernelCompatTester) string {
|
||||||
klog.V(1).Infof("Can't use winkernel proxy, using userspace proxier")
|
klog.V(1).Infof("Can't use winkernel proxy, using userspace proxier")
|
||||||
return proxyModeUserspace
|
return proxyModeUserspace
|
||||||
}
|
}
|
||||||
|
|
||||||
// nodeIPTuple takes an addresses and return a tuple (ipv4,ipv6)
|
|
||||||
// The returned tuple is guaranteed to have the order (ipv4,ipv6). The address NOT of the passed address
|
|
||||||
// will have "any" address (0.0.0.0 or ::) inserted.
|
|
||||||
func nodeIPTuple(bindAddress string) [2]net.IP {
|
|
||||||
nodes := [2]net.IP{net.IPv4zero, net.IPv6zero}
|
|
||||||
|
|
||||||
adr := net.ParseIP(bindAddress)
|
|
||||||
if utilsnet.IsIPv6(adr) {
|
|
||||||
nodes[1] = adr
|
|
||||||
} else {
|
|
||||||
nodes[0] = adr
|
|
||||||
}
|
|
||||||
|
|
||||||
return nodes
|
|
||||||
}
|
|
||||||
|
|
|
@ -21,7 +21,7 @@ import (
|
||||||
"reflect"
|
"reflect"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"k8s.io/api/core/v1"
|
v1 "k8s.io/api/core/v1"
|
||||||
eventsv1beta1 "k8s.io/api/events/v1beta1"
|
eventsv1beta1 "k8s.io/api/events/v1beta1"
|
||||||
apimachineryvalidation "k8s.io/apimachinery/pkg/api/validation"
|
apimachineryvalidation "k8s.io/apimachinery/pkg/api/validation"
|
||||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
|
@ -140,7 +140,7 @@ func legacyValidateEvent(event *core.Event) field.ErrorList {
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
if len(event.InvolvedObject.Namespace) == 0 && event.Namespace != metav1.NamespaceSystem {
|
if len(event.InvolvedObject.Namespace) == 0 && event.Namespace != metav1.NamespaceDefault && event.Namespace != metav1.NamespaceSystem {
|
||||||
allErrs = append(allErrs, field.Invalid(field.NewPath("involvedObject", "namespace"), event.InvolvedObject.Namespace, "does not match event.namespace"))
|
allErrs = append(allErrs, field.Invalid(field.NewPath("involvedObject", "namespace"), event.InvolvedObject.Namespace, "does not match event.namespace"))
|
||||||
}
|
}
|
||||||
if len(event.ReportingController) == 0 {
|
if len(event.ReportingController) == 0 {
|
||||||
|
|
|
@ -189,7 +189,7 @@ func Convert_networking_IngressBackend_To_v1beta1_IngressBackend(in *networking.
|
||||||
|
|
||||||
func Convert_v1beta1_IngressSpec_To_networking_IngressSpec(in *extensionsv1beta1.IngressSpec, out *networking.IngressSpec, s conversion.Scope) error {
|
func Convert_v1beta1_IngressSpec_To_networking_IngressSpec(in *extensionsv1beta1.IngressSpec, out *networking.IngressSpec, s conversion.Scope) error {
|
||||||
if err := autoConvert_v1beta1_IngressSpec_To_networking_IngressSpec(in, out, s); err != nil {
|
if err := autoConvert_v1beta1_IngressSpec_To_networking_IngressSpec(in, out, s); err != nil {
|
||||||
return nil
|
return err
|
||||||
}
|
}
|
||||||
if in.Backend != nil {
|
if in.Backend != nil {
|
||||||
out.DefaultBackend = &networking.IngressBackend{}
|
out.DefaultBackend = &networking.IngressBackend{}
|
||||||
|
@ -202,7 +202,7 @@ func Convert_v1beta1_IngressSpec_To_networking_IngressSpec(in *extensionsv1beta1
|
||||||
|
|
||||||
func Convert_networking_IngressSpec_To_v1beta1_IngressSpec(in *networking.IngressSpec, out *extensionsv1beta1.IngressSpec, s conversion.Scope) error {
|
func Convert_networking_IngressSpec_To_v1beta1_IngressSpec(in *networking.IngressSpec, out *extensionsv1beta1.IngressSpec, s conversion.Scope) error {
|
||||||
if err := autoConvert_networking_IngressSpec_To_v1beta1_IngressSpec(in, out, s); err != nil {
|
if err := autoConvert_networking_IngressSpec_To_v1beta1_IngressSpec(in, out, s); err != nil {
|
||||||
return nil
|
return err
|
||||||
}
|
}
|
||||||
if in.DefaultBackend != nil {
|
if in.DefaultBackend != nil {
|
||||||
out.Backend = &extensionsv1beta1.IngressBackend{}
|
out.Backend = &extensionsv1beta1.IngressBackend{}
|
||||||
|
|
|
@ -52,7 +52,7 @@ func Convert_networking_IngressBackend_To_v1beta1_IngressBackend(in *networking.
|
||||||
}
|
}
|
||||||
func Convert_v1beta1_IngressSpec_To_networking_IngressSpec(in *v1beta1.IngressSpec, out *networking.IngressSpec, s conversion.Scope) error {
|
func Convert_v1beta1_IngressSpec_To_networking_IngressSpec(in *v1beta1.IngressSpec, out *networking.IngressSpec, s conversion.Scope) error {
|
||||||
if err := autoConvert_v1beta1_IngressSpec_To_networking_IngressSpec(in, out, s); err != nil {
|
if err := autoConvert_v1beta1_IngressSpec_To_networking_IngressSpec(in, out, s); err != nil {
|
||||||
return nil
|
return err
|
||||||
}
|
}
|
||||||
if in.Backend != nil {
|
if in.Backend != nil {
|
||||||
out.DefaultBackend = &networking.IngressBackend{}
|
out.DefaultBackend = &networking.IngressBackend{}
|
||||||
|
@ -65,7 +65,7 @@ func Convert_v1beta1_IngressSpec_To_networking_IngressSpec(in *v1beta1.IngressSp
|
||||||
|
|
||||||
func Convert_networking_IngressSpec_To_v1beta1_IngressSpec(in *networking.IngressSpec, out *v1beta1.IngressSpec, s conversion.Scope) error {
|
func Convert_networking_IngressSpec_To_v1beta1_IngressSpec(in *networking.IngressSpec, out *v1beta1.IngressSpec, s conversion.Scope) error {
|
||||||
if err := autoConvert_networking_IngressSpec_To_v1beta1_IngressSpec(in, out, s); err != nil {
|
if err := autoConvert_networking_IngressSpec_To_v1beta1_IngressSpec(in, out, s); err != nil {
|
||||||
return nil
|
return err
|
||||||
}
|
}
|
||||||
if in.DefaultBackend != nil {
|
if in.DefaultBackend != nil {
|
||||||
out.Backend = &v1beta1.IngressBackend{}
|
out.Backend = &v1beta1.IngressBackend{}
|
||||||
|
|
|
@ -21,12 +21,15 @@ import (
|
||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
"io"
|
"io"
|
||||||
|
"io/ioutil"
|
||||||
"math/rand"
|
"math/rand"
|
||||||
"net/url"
|
"net/url"
|
||||||
"os"
|
"os"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
|
"regexp"
|
||||||
goruntime "runtime"
|
goruntime "runtime"
|
||||||
"sort"
|
"sort"
|
||||||
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
"sync"
|
"sync"
|
||||||
"time"
|
"time"
|
||||||
|
@ -127,6 +130,40 @@ func (s *startSpec) getTargetID(podStatus *kubecontainer.PodStatus) (*kubecontai
|
||||||
return &targetStatus.ID, nil
|
return &targetStatus.ID, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func calcRestartCountByLogDir(path string) (int, error) {
|
||||||
|
// if the path doesn't exist then it's not an error
|
||||||
|
if _, err := os.Stat(path); err != nil {
|
||||||
|
return 0, nil
|
||||||
|
}
|
||||||
|
restartCount := int(0)
|
||||||
|
files, err := ioutil.ReadDir(path)
|
||||||
|
if err != nil {
|
||||||
|
return 0, err
|
||||||
|
}
|
||||||
|
if len(files) == 0 {
|
||||||
|
return 0, err
|
||||||
|
}
|
||||||
|
restartCountLogFileRegex := regexp.MustCompile(`(\d+).log(\..*)?`)
|
||||||
|
for _, file := range files {
|
||||||
|
if file.IsDir() {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
matches := restartCountLogFileRegex.FindStringSubmatch(file.Name())
|
||||||
|
if len(matches) == 0 {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
count, err := strconv.Atoi(matches[1])
|
||||||
|
if err != nil {
|
||||||
|
return restartCount, err
|
||||||
|
}
|
||||||
|
count++
|
||||||
|
if count > restartCount {
|
||||||
|
restartCount = count
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return restartCount, nil
|
||||||
|
}
|
||||||
|
|
||||||
// startContainer starts a container and returns a message indicates why it is failed on error.
|
// startContainer starts a container and returns a message indicates why it is failed on error.
|
||||||
// It starts the container through the following steps:
|
// It starts the container through the following steps:
|
||||||
// * pull the image
|
// * pull the image
|
||||||
|
@ -150,6 +187,22 @@ func (m *kubeGenericRuntimeManager) startContainer(podSandboxID string, podSandb
|
||||||
containerStatus := podStatus.FindContainerStatusByName(container.Name)
|
containerStatus := podStatus.FindContainerStatusByName(container.Name)
|
||||||
if containerStatus != nil {
|
if containerStatus != nil {
|
||||||
restartCount = containerStatus.RestartCount + 1
|
restartCount = containerStatus.RestartCount + 1
|
||||||
|
} else {
|
||||||
|
// The container runtime keeps state on container statuses and
|
||||||
|
// what the container restart count is. When nodes are rebooted
|
||||||
|
// some container runtimes clear their state which causes the
|
||||||
|
// restartCount to be reset to 0. This causes the logfile to
|
||||||
|
// start at 0.log, which either overwrites or appends to the
|
||||||
|
// already existing log.
|
||||||
|
//
|
||||||
|
// We are checking to see if the log directory exists, and find
|
||||||
|
// the latest restartCount by checking the log name -
|
||||||
|
// {restartCount}.log - and adding 1 to it.
|
||||||
|
logDir := BuildContainerLogsDirectory(pod.Namespace, pod.Name, pod.UID, container.Name)
|
||||||
|
restartCount, err = calcRestartCountByLogDir(logDir)
|
||||||
|
if err != nil {
|
||||||
|
klog.InfoS("Log directory exists but could not calculate restartCount", "logDir", logDir, "err", err)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
target, err := spec.getTargetID(podStatus)
|
target, err := spec.getTargetID(podStatus)
|
||||||
|
|
|
@ -37,7 +37,9 @@ import (
|
||||||
v1 "k8s.io/api/core/v1"
|
v1 "k8s.io/api/core/v1"
|
||||||
"k8s.io/apimachinery/pkg/types"
|
"k8s.io/apimachinery/pkg/types"
|
||||||
"k8s.io/apimachinery/pkg/util/intstr"
|
"k8s.io/apimachinery/pkg/util/intstr"
|
||||||
|
apiutil "k8s.io/apimachinery/pkg/util/net"
|
||||||
"k8s.io/apimachinery/pkg/util/sets"
|
"k8s.io/apimachinery/pkg/util/sets"
|
||||||
|
"k8s.io/apimachinery/pkg/util/version"
|
||||||
"k8s.io/apimachinery/pkg/util/wait"
|
"k8s.io/apimachinery/pkg/util/wait"
|
||||||
utilfeature "k8s.io/apiserver/pkg/util/feature"
|
utilfeature "k8s.io/apiserver/pkg/util/feature"
|
||||||
"k8s.io/client-go/tools/record"
|
"k8s.io/client-go/tools/record"
|
||||||
|
@ -138,6 +140,101 @@ type remoteSubnetInfo struct {
|
||||||
|
|
||||||
const NETWORK_TYPE_OVERLAY = "overlay"
|
const NETWORK_TYPE_OVERLAY = "overlay"
|
||||||
|
|
||||||
|
func newHostNetworkService() (HostNetworkService, hcn.SupportedFeatures) {
|
||||||
|
var hns HostNetworkService
|
||||||
|
hns = hnsV1{}
|
||||||
|
supportedFeatures := hcn.GetSupportedFeatures()
|
||||||
|
if supportedFeatures.Api.V2 {
|
||||||
|
hns = hnsV2{}
|
||||||
|
}
|
||||||
|
|
||||||
|
return hns, supportedFeatures
|
||||||
|
}
|
||||||
|
|
||||||
|
func getNetworkName(hnsNetworkName string) (string, error) {
|
||||||
|
if len(hnsNetworkName) == 0 {
|
||||||
|
klog.V(3).InfoS("network-name flag not set. Checking environment variable")
|
||||||
|
hnsNetworkName = os.Getenv("KUBE_NETWORK")
|
||||||
|
if len(hnsNetworkName) == 0 {
|
||||||
|
return "", fmt.Errorf("Environment variable KUBE_NETWORK and network-flag not initialized")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return hnsNetworkName, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func getNetworkInfo(hns HostNetworkService, hnsNetworkName string) (*hnsNetworkInfo, error) {
|
||||||
|
hnsNetworkInfo, err := hns.getNetworkByName(hnsNetworkName)
|
||||||
|
for err != nil {
|
||||||
|
klog.ErrorS(err, "Unable to find HNS Network specified. Please check network name and CNI deployment", "hnsNetworkName", hnsNetworkName)
|
||||||
|
time.Sleep(1 * time.Second)
|
||||||
|
hnsNetworkInfo, err = hns.getNetworkByName(hnsNetworkName)
|
||||||
|
}
|
||||||
|
return hnsNetworkInfo, err
|
||||||
|
}
|
||||||
|
|
||||||
|
func isOverlay(hnsNetworkInfo *hnsNetworkInfo) bool {
|
||||||
|
return strings.EqualFold(hnsNetworkInfo.networkType, NETWORK_TYPE_OVERLAY)
|
||||||
|
}
|
||||||
|
|
||||||
|
// StackCompatTester tests whether the required kernel and network are dualstack capable
|
||||||
|
type StackCompatTester interface {
|
||||||
|
DualStackCompatible(networkName string) bool
|
||||||
|
}
|
||||||
|
|
||||||
|
type DualStackCompatTester struct{}
|
||||||
|
|
||||||
|
func (t DualStackCompatTester) DualStackCompatible(networkName string) bool {
|
||||||
|
dualStackFeatureEnabled := utilfeature.DefaultFeatureGate.Enabled(kubefeatures.IPv6DualStack)
|
||||||
|
if !dualStackFeatureEnabled {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
globals, err := hcn.GetGlobals()
|
||||||
|
if err != nil {
|
||||||
|
klog.ErrorS(err, "Unable to determine networking stack version. Falling back to single-stack")
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
if !kernelSupportsDualstack(globals.Version) {
|
||||||
|
klog.InfoS("This version of Windows does not support dual-stack. Falling back to single-stack")
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// check if network is using overlay
|
||||||
|
hns, _ := newHostNetworkService()
|
||||||
|
networkName, err = getNetworkName(networkName)
|
||||||
|
if err != nil {
|
||||||
|
klog.ErrorS(err, "unable to determine dual-stack status %v. Falling back to single-stack")
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
networkInfo, err := getNetworkInfo(hns, networkName)
|
||||||
|
if err != nil {
|
||||||
|
klog.ErrorS(err, "unable to determine dual-stack status %v. Falling back to single-stack")
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
if utilfeature.DefaultFeatureGate.Enabled(kubefeatures.WinOverlay) && isOverlay(networkInfo) {
|
||||||
|
// Overlay (VXLAN) networks on Windows do not support dual-stack networking today
|
||||||
|
klog.InfoS("Winoverlay does not support dual-stack. Falling back to single-stack")
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
// The hcsshim version logic has a bug that did not calculate the versioning of DualStack correctly.
|
||||||
|
// DualStack is supported in WS 2004+ (10.0.19041+) where HCN component version is 11.10+
|
||||||
|
// https://github.com/microsoft/hcsshim/pull/1003#issuecomment-827930358
|
||||||
|
func kernelSupportsDualstack(currentVersion hcn.Version) bool {
|
||||||
|
hnsVersion := fmt.Sprintf("%d.%d.0", currentVersion.Major, currentVersion.Minor)
|
||||||
|
v, err := version.ParseSemantic(hnsVersion)
|
||||||
|
if err != nil {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
return v.AtLeast(version.MustParseSemantic("11.10.0"))
|
||||||
|
}
|
||||||
|
|
||||||
func Log(v interface{}, message string, level klog.Level) {
|
func Log(v interface{}, message string, level klog.Level) {
|
||||||
klog.V(level).InfoS("%s", message, "spewConfig", spewSdump(v))
|
klog.V(level).InfoS("%s", message, "spewConfig", spewSdump(v))
|
||||||
}
|
}
|
||||||
|
@ -543,36 +640,24 @@ func NewProxier(
|
||||||
}
|
}
|
||||||
|
|
||||||
serviceHealthServer := healthcheck.NewServiceHealthServer(hostname, recorder)
|
serviceHealthServer := healthcheck.NewServiceHealthServer(hostname, recorder)
|
||||||
var hns HostNetworkService
|
hns, supportedFeatures := newHostNetworkService()
|
||||||
hns = hnsV1{}
|
hnsNetworkName, err := getNetworkName(config.NetworkName)
|
||||||
supportedFeatures := hcn.GetSupportedFeatures()
|
if err != nil {
|
||||||
if supportedFeatures.Api.V2 {
|
return nil, err
|
||||||
hns = hnsV2{}
|
|
||||||
}
|
|
||||||
|
|
||||||
hnsNetworkName := config.NetworkName
|
|
||||||
if len(hnsNetworkName) == 0 {
|
|
||||||
klog.V(3).InfoS("network-name flag not set. Checking environment variable")
|
|
||||||
hnsNetworkName = os.Getenv("KUBE_NETWORK")
|
|
||||||
if len(hnsNetworkName) == 0 {
|
|
||||||
return nil, fmt.Errorf("Environment variable KUBE_NETWORK and network-flag not initialized")
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
klog.V(3).InfoS("Cleaning up old HNS policy lists")
|
klog.V(3).InfoS("Cleaning up old HNS policy lists")
|
||||||
deleteAllHnsLoadBalancerPolicy()
|
deleteAllHnsLoadBalancerPolicy()
|
||||||
|
|
||||||
// Get HNS network information
|
// Get HNS network information
|
||||||
hnsNetworkInfo, err := hns.getNetworkByName(hnsNetworkName)
|
hnsNetworkInfo, err := getNetworkInfo(hns, hnsNetworkName)
|
||||||
for err != nil {
|
if err != nil {
|
||||||
klog.ErrorS(err, "Unable to find HNS Network specified. Please check network name and CNI deployment", "hnsNetworkName", hnsNetworkName)
|
return nil, err
|
||||||
time.Sleep(1 * time.Second)
|
|
||||||
hnsNetworkInfo, err = hns.getNetworkByName(hnsNetworkName)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Network could have been detected before Remote Subnet Routes are applied or ManagementIP is updated
|
// Network could have been detected before Remote Subnet Routes are applied or ManagementIP is updated
|
||||||
// Sleep and update the network to include new information
|
// Sleep and update the network to include new information
|
||||||
if strings.EqualFold(hnsNetworkInfo.networkType, NETWORK_TYPE_OVERLAY) {
|
if isOverlay(hnsNetworkInfo) {
|
||||||
time.Sleep(10 * time.Second)
|
time.Sleep(10 * time.Second)
|
||||||
hnsNetworkInfo, err = hns.getNetworkByName(hnsNetworkName)
|
hnsNetworkInfo, err = hns.getNetworkByName(hnsNetworkName)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -592,7 +677,7 @@ func NewProxier(
|
||||||
|
|
||||||
var sourceVip string
|
var sourceVip string
|
||||||
var hostMac string
|
var hostMac string
|
||||||
if strings.EqualFold(hnsNetworkInfo.networkType, NETWORK_TYPE_OVERLAY) {
|
if isOverlay(hnsNetworkInfo) {
|
||||||
if !utilfeature.DefaultFeatureGate.Enabled(kubefeatures.WinOverlay) {
|
if !utilfeature.DefaultFeatureGate.Enabled(kubefeatures.WinOverlay) {
|
||||||
return nil, fmt.Errorf("WinOverlay feature gate not enabled")
|
return nil, fmt.Errorf("WinOverlay feature gate not enabled")
|
||||||
}
|
}
|
||||||
|
@ -605,6 +690,15 @@ func NewProxier(
|
||||||
return nil, fmt.Errorf("source-vip flag not set")
|
return nil, fmt.Errorf("source-vip flag not set")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if nodeIP.IsUnspecified() {
|
||||||
|
// attempt to get the correct ip address
|
||||||
|
klog.V(2).InfoS("node ip was unspecified. Attempting to find node ip")
|
||||||
|
nodeIP, err = apiutil.ResolveBindAddress(nodeIP)
|
||||||
|
if err != nil {
|
||||||
|
klog.InfoS("failed to find an ip. You may need set the --bind-address flag", "err", err)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
interfaces, _ := net.Interfaces() //TODO create interfaces
|
interfaces, _ := net.Interfaces() //TODO create interfaces
|
||||||
for _, inter := range interfaces {
|
for _, inter := range interfaces {
|
||||||
addresses, _ := inter.Addrs()
|
addresses, _ := inter.Addrs()
|
||||||
|
|
|
@ -744,6 +744,12 @@ func (rs *REST) handleClusterIPsForUpdatedService(oldService *api.Service, servi
|
||||||
}
|
}
|
||||||
|
|
||||||
// CASE B:
|
// CASE B:
|
||||||
|
|
||||||
|
// if headless service then we bail out early (no clusterIPs management needed)
|
||||||
|
if len(oldService.Spec.ClusterIPs) > 0 && oldService.Spec.ClusterIPs[0] == api.ClusterIPNone {
|
||||||
|
return nil, nil, nil
|
||||||
|
}
|
||||||
|
|
||||||
// Update service from non-ExternalName to ExternalName, should release ClusterIP if exists.
|
// Update service from non-ExternalName to ExternalName, should release ClusterIP if exists.
|
||||||
if oldService.Spec.Type != api.ServiceTypeExternalName && service.Spec.Type == api.ServiceTypeExternalName {
|
if oldService.Spec.Type != api.ServiceTypeExternalName && service.Spec.Type == api.ServiceTypeExternalName {
|
||||||
toRelease = make(map[api.IPFamily]string)
|
toRelease = make(map[api.IPFamily]string)
|
||||||
|
@ -760,11 +766,6 @@ func (rs *REST) handleClusterIPsForUpdatedService(oldService *api.Service, servi
|
||||||
return nil, toRelease, nil
|
return nil, toRelease, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// if headless service then we bail out early (no clusterIPs management needed)
|
|
||||||
if len(oldService.Spec.ClusterIPs) > 0 && oldService.Spec.ClusterIPs[0] == api.ClusterIPNone {
|
|
||||||
return nil, nil, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// upgrade and downgrade are specific to dualstack
|
// upgrade and downgrade are specific to dualstack
|
||||||
if !utilfeature.DefaultFeatureGate.Enabled(features.IPv6DualStack) {
|
if !utilfeature.DefaultFeatureGate.Enabled(features.IPv6DualStack) {
|
||||||
return nil, nil, nil
|
return nil, nil, nil
|
||||||
|
|
|
@ -80,16 +80,12 @@ func NewBalancedAllocation(_ runtime.Object, h framework.Handle) (framework.Plug
|
||||||
|
|
||||||
// todo: use resource weights in the scorer function
|
// todo: use resource weights in the scorer function
|
||||||
func balancedResourceScorer(requested, allocable resourceToValueMap, includeVolumes bool, requestedVolumes int, allocatableVolumes int) int64 {
|
func balancedResourceScorer(requested, allocable resourceToValueMap, includeVolumes bool, requestedVolumes int, allocatableVolumes int) int64 {
|
||||||
// This to find a node which has most balanced CPU, memory and volume usage.
|
|
||||||
cpuFraction := fractionOfCapacity(requested[v1.ResourceCPU], allocable[v1.ResourceCPU])
|
cpuFraction := fractionOfCapacity(requested[v1.ResourceCPU], allocable[v1.ResourceCPU])
|
||||||
memoryFraction := fractionOfCapacity(requested[v1.ResourceMemory], allocable[v1.ResourceMemory])
|
memoryFraction := fractionOfCapacity(requested[v1.ResourceMemory], allocable[v1.ResourceMemory])
|
||||||
// fractions might be greater than 1 because pods with no requests get minimum
|
// This to find a node which has most balanced CPU, memory and volume usage.
|
||||||
// values.
|
if cpuFraction >= 1 || memoryFraction >= 1 {
|
||||||
if cpuFraction > 1 {
|
// if requested >= capacity, the corresponding host should never be preferred.
|
||||||
cpuFraction = 1
|
return 0
|
||||||
}
|
|
||||||
if memoryFraction > 1 {
|
|
||||||
memoryFraction = 1
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if includeVolumes && utilfeature.DefaultFeatureGate.Enabled(features.BalanceAttachedNodeVolumes) && allocatableVolumes > 0 {
|
if includeVolumes && utilfeature.DefaultFeatureGate.Enabled(features.BalanceAttachedNodeVolumes) && allocatableVolumes > 0 {
|
||||||
|
|
|
@ -453,5 +453,8 @@ func getValidCreationData(subscriptionID, resourceGroup, sourceResourceID, sourc
|
||||||
|
|
||||||
func isInstanceNotFoundError(err error) bool {
|
func isInstanceNotFoundError(err error) bool {
|
||||||
errMsg := strings.ToLower(err.Error())
|
errMsg := strings.ToLower(err.Error())
|
||||||
|
if strings.Contains(errMsg, strings.ToLower(vmssVMNotActiveErrorMessage)) {
|
||||||
|
return true
|
||||||
|
}
|
||||||
return strings.Contains(errMsg, errStatusCode400) && strings.Contains(errMsg, errInvalidParameter) && strings.Contains(errMsg, errTargetInstanceIds)
|
return strings.Contains(errMsg, errStatusCode400) && strings.Contains(errMsg, errInvalidParameter) && strings.Contains(errMsg, errTargetInstanceIds)
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,6 +20,7 @@ package azure
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
"math"
|
"math"
|
||||||
"reflect"
|
"reflect"
|
||||||
|
@ -309,7 +310,7 @@ func (az *Cloud) cleanBackendpoolForPrimarySLB(primarySLB *network.LoadBalancer,
|
||||||
ipConf := (*bp.BackendIPConfigurations)[i]
|
ipConf := (*bp.BackendIPConfigurations)[i]
|
||||||
ipConfigID := to.String(ipConf.ID)
|
ipConfigID := to.String(ipConf.ID)
|
||||||
_, vmSetName, err := az.VMSet.GetNodeNameByIPConfigurationID(ipConfigID)
|
_, vmSetName, err := az.VMSet.GetNodeNameByIPConfigurationID(ipConfigID)
|
||||||
if err != nil {
|
if err != nil && !errors.Is(err, cloudprovider.InstanceNotFound) {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
primaryVMSetName := az.VMSet.GetPrimaryVMSetName()
|
primaryVMSetName := az.VMSet.GetPrimaryVMSetName()
|
||||||
|
@ -1134,13 +1135,10 @@ func (az *Cloud) reconcileLoadBalancer(clusterName string, service *v1.Service,
|
||||||
for _, ipConf := range *bp.BackendIPConfigurations {
|
for _, ipConf := range *bp.BackendIPConfigurations {
|
||||||
ipConfID := to.String(ipConf.ID)
|
ipConfID := to.String(ipConf.ID)
|
||||||
nodeName, _, err := az.VMSet.GetNodeNameByIPConfigurationID(ipConfID)
|
nodeName, _, err := az.VMSet.GetNodeNameByIPConfigurationID(ipConfID)
|
||||||
if err != nil {
|
if err != nil && !errors.Is(err, cloudprovider.InstanceNotFound) {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
if nodeName == "" {
|
|
||||||
// VM may under deletion
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
// If a node is not supposed to be included in the LB, it
|
// If a node is not supposed to be included in the LB, it
|
||||||
// would not be in the `nodes` slice. We need to check the nodes that
|
// would not be in the `nodes` slice. We need to check the nodes that
|
||||||
// have been added to the LB's backendpool, find the unwanted ones and
|
// have been added to the LB's backendpool, find the unwanted ones and
|
||||||
|
@ -2139,15 +2137,13 @@ func shouldReleaseExistingOwnedPublicIP(existingPip *network.PublicIPAddress, lb
|
||||||
|
|
||||||
// ensurePIPTagged ensures the public IP of the service is tagged as configured
|
// ensurePIPTagged ensures the public IP of the service is tagged as configured
|
||||||
func (az *Cloud) ensurePIPTagged(service *v1.Service, pip *network.PublicIPAddress) bool {
|
func (az *Cloud) ensurePIPTagged(service *v1.Service, pip *network.PublicIPAddress) bool {
|
||||||
changed := false
|
|
||||||
configTags := parseTags(az.Tags)
|
configTags := parseTags(az.Tags)
|
||||||
annotationTags := make(map[string]*string)
|
annotationTags := make(map[string]*string)
|
||||||
if _, ok := service.Annotations[ServiceAnnotationAzurePIPTags]; ok {
|
if _, ok := service.Annotations[ServiceAnnotationAzurePIPTags]; ok {
|
||||||
annotationTags = parseTags(service.Annotations[ServiceAnnotationAzurePIPTags])
|
annotationTags = parseTags(service.Annotations[ServiceAnnotationAzurePIPTags])
|
||||||
}
|
}
|
||||||
for k, v := range annotationTags {
|
configTags, _ = reconcileTags(configTags, annotationTags)
|
||||||
configTags[k] = v
|
|
||||||
}
|
|
||||||
// include the cluster name and service names tags when comparing
|
// include the cluster name and service names tags when comparing
|
||||||
var clusterName, serviceNames *string
|
var clusterName, serviceNames *string
|
||||||
if v, ok := pip.Tags[clusterNameKey]; ok {
|
if v, ok := pip.Tags[clusterNameKey]; ok {
|
||||||
|
@ -2162,12 +2158,10 @@ func (az *Cloud) ensurePIPTagged(service *v1.Service, pip *network.PublicIPAddre
|
||||||
if serviceNames != nil {
|
if serviceNames != nil {
|
||||||
configTags[serviceTagKey] = serviceNames
|
configTags[serviceTagKey] = serviceNames
|
||||||
}
|
}
|
||||||
for k, v := range configTags {
|
|
||||||
if vv, ok := pip.Tags[k]; !ok || !strings.EqualFold(to.String(v), to.String(vv)) {
|
tags, changed := reconcileTags(pip.Tags, configTags)
|
||||||
pip.Tags[k] = v
|
pip.Tags = tags
|
||||||
changed = true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return changed
|
return changed
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2728,7 +2722,6 @@ func unbindServiceFromPIP(pip *network.PublicIPAddress, serviceName string) erro
|
||||||
|
|
||||||
// ensureLoadBalancerTagged ensures every load balancer in the resource group is tagged as configured
|
// ensureLoadBalancerTagged ensures every load balancer in the resource group is tagged as configured
|
||||||
func (az *Cloud) ensureLoadBalancerTagged(lb *network.LoadBalancer) bool {
|
func (az *Cloud) ensureLoadBalancerTagged(lb *network.LoadBalancer) bool {
|
||||||
changed := false
|
|
||||||
if az.Tags == "" {
|
if az.Tags == "" {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
@ -2736,18 +2729,15 @@ func (az *Cloud) ensureLoadBalancerTagged(lb *network.LoadBalancer) bool {
|
||||||
if lb.Tags == nil {
|
if lb.Tags == nil {
|
||||||
lb.Tags = make(map[string]*string)
|
lb.Tags = make(map[string]*string)
|
||||||
}
|
}
|
||||||
for k, v := range tags {
|
|
||||||
if vv, ok := lb.Tags[k]; !ok || !strings.EqualFold(to.String(v), to.String(vv)) {
|
tags, changed := reconcileTags(lb.Tags, tags)
|
||||||
lb.Tags[k] = v
|
lb.Tags = tags
|
||||||
changed = true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return changed
|
return changed
|
||||||
}
|
}
|
||||||
|
|
||||||
// ensureSecurityGroupTagged ensures the security group is tagged as configured
|
// ensureSecurityGroupTagged ensures the security group is tagged as configured
|
||||||
func (az *Cloud) ensureSecurityGroupTagged(sg *network.SecurityGroup) bool {
|
func (az *Cloud) ensureSecurityGroupTagged(sg *network.SecurityGroup) bool {
|
||||||
changed := false
|
|
||||||
if az.Tags == "" {
|
if az.Tags == "" {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
@ -2755,11 +2745,9 @@ func (az *Cloud) ensureSecurityGroupTagged(sg *network.SecurityGroup) bool {
|
||||||
if sg.Tags == nil {
|
if sg.Tags == nil {
|
||||||
sg.Tags = make(map[string]*string)
|
sg.Tags = make(map[string]*string)
|
||||||
}
|
}
|
||||||
for k, v := range tags {
|
|
||||||
if vv, ok := sg.Tags[k]; !ok || !strings.EqualFold(to.String(v), to.String(vv)) {
|
tags, changed := reconcileTags(sg.Tags, tags)
|
||||||
sg.Tags[k] = v
|
sg.Tags = tags
|
||||||
changed = true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return changed
|
return changed
|
||||||
}
|
}
|
||||||
|
|
|
@ -541,16 +541,13 @@ func (az *Cloud) ensureRouteTableTagged(rt *network.RouteTable) (map[string]*str
|
||||||
if az.Tags == "" {
|
if az.Tags == "" {
|
||||||
return nil, false
|
return nil, false
|
||||||
}
|
}
|
||||||
changed := false
|
|
||||||
tags := parseTags(az.Tags)
|
tags := parseTags(az.Tags)
|
||||||
if rt.Tags == nil {
|
if rt.Tags == nil {
|
||||||
rt.Tags = make(map[string]*string)
|
rt.Tags = make(map[string]*string)
|
||||||
}
|
}
|
||||||
for k, v := range tags {
|
|
||||||
if vv, ok := rt.Tags[k]; !ok || !strings.EqualFold(to.String(v), to.String(vv)) {
|
tags, changed := reconcileTags(rt.Tags, tags)
|
||||||
rt.Tags[k] = v
|
rt.Tags = tags
|
||||||
changed = true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return rt.Tags, changed
|
return rt.Tags, changed
|
||||||
}
|
}
|
||||||
|
|
|
@ -458,6 +458,7 @@ func (as *availabilitySet) GetInstanceIDByNodeName(name string) (string, error)
|
||||||
|
|
||||||
machine, err = as.getVirtualMachine(types.NodeName(name), azcache.CacheReadTypeUnsafe)
|
machine, err = as.getVirtualMachine(types.NodeName(name), azcache.CacheReadTypeUnsafe)
|
||||||
if err == cloudprovider.InstanceNotFound {
|
if err == cloudprovider.InstanceNotFound {
|
||||||
|
klog.Warningf("Unable to find node %s: %v", name, cloudprovider.InstanceNotFound)
|
||||||
return "", cloudprovider.InstanceNotFound
|
return "", cloudprovider.InstanceNotFound
|
||||||
}
|
}
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -965,13 +966,16 @@ func (as *availabilitySet) EnsureBackendPoolDeleted(service *v1.Service, backend
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
nicUpdaters := make([]func() error, 0)
|
nicUpdaters := make([]func() error, 0)
|
||||||
errors := make([]error, 0)
|
allErrs := make([]error, 0)
|
||||||
for i := range ipConfigurationIDs {
|
for i := range ipConfigurationIDs {
|
||||||
ipConfigurationID := ipConfigurationIDs[i]
|
ipConfigurationID := ipConfigurationIDs[i]
|
||||||
nodeName, _, err := as.GetNodeNameByIPConfigurationID(ipConfigurationID)
|
nodeName, _, err := as.GetNodeNameByIPConfigurationID(ipConfigurationID)
|
||||||
if err != nil {
|
if err != nil && !errors.Is(err, cloudprovider.InstanceNotFound) {
|
||||||
klog.Errorf("Failed to GetNodeNameByIPConfigurationID(%s): %v", ipConfigurationID, err)
|
klog.Errorf("Failed to GetNodeNameByIPConfigurationID(%s): %v", ipConfigurationID, err)
|
||||||
errors = append(errors, err)
|
allErrs = append(allErrs, err)
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
if nodeName == "" {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1038,9 +1042,9 @@ func (as *availabilitySet) EnsureBackendPoolDeleted(service *v1.Service, backend
|
||||||
if errs != nil {
|
if errs != nil {
|
||||||
return utilerrors.Flatten(errs)
|
return utilerrors.Flatten(errs)
|
||||||
}
|
}
|
||||||
// Fail if there are other errors.
|
// Fail if there are other allErrs.
|
||||||
if len(errors) > 0 {
|
if len(allErrs) > 0 {
|
||||||
return utilerrors.Flatten(utilerrors.NewAggregate(errors))
|
return utilerrors.Flatten(utilerrors.NewAggregate(allErrs))
|
||||||
}
|
}
|
||||||
|
|
||||||
isOperationSucceeded = true
|
isOperationSucceeded = true
|
||||||
|
@ -1104,7 +1108,8 @@ func (as *availabilitySet) GetNodeNameByIPConfigurationID(ipConfigurationID stri
|
||||||
|
|
||||||
vm, err := as.getVirtualMachine(types.NodeName(vmName), azcache.CacheReadTypeDefault)
|
vm, err := as.getVirtualMachine(types.NodeName(vmName), azcache.CacheReadTypeDefault)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return "", "", fmt.Errorf("cannot get the virtual machine by node name %s", vmName)
|
klog.Errorf("Unable to get the virtual machine by node name %s: %v", vmName, err)
|
||||||
|
return "", "", err
|
||||||
}
|
}
|
||||||
asID := ""
|
asID := ""
|
||||||
if vm.VirtualMachineProperties != nil && vm.AvailabilitySet != nil {
|
if vm.VirtualMachineProperties != nil && vm.AvailabilitySet != nil {
|
||||||
|
@ -1116,7 +1121,7 @@ func (as *availabilitySet) GetNodeNameByIPConfigurationID(ipConfigurationID stri
|
||||||
|
|
||||||
asName, err := getAvailabilitySetNameByID(asID)
|
asName, err := getAvailabilitySetNameByID(asID)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return "", "", fmt.Errorf("cannot get the availability set name by the availability set ID %s", asID)
|
return "", "", fmt.Errorf("cannot get the availability set name by the availability set ID %s: %v", asID, err)
|
||||||
}
|
}
|
||||||
return vmName, strings.ToLower(asName), nil
|
return vmName, strings.ToLower(asName), nil
|
||||||
}
|
}
|
||||||
|
|
|
@ -138,3 +138,28 @@ func parseTags(tags string) map[string]*string {
|
||||||
}
|
}
|
||||||
return formatted
|
return formatted
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func findKeyInMapCaseInsensitive(targetMap map[string]*string, key string) (bool, string) {
|
||||||
|
for k := range targetMap {
|
||||||
|
if strings.EqualFold(k, key) {
|
||||||
|
return true, k
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return false, ""
|
||||||
|
}
|
||||||
|
|
||||||
|
func reconcileTags(currentTagsOnResource, newTags map[string]*string) (reconciledTags map[string]*string, changed bool) {
|
||||||
|
for k, v := range newTags {
|
||||||
|
found, key := findKeyInMapCaseInsensitive(currentTagsOnResource, k)
|
||||||
|
if !found {
|
||||||
|
currentTagsOnResource[k] = v
|
||||||
|
changed = true
|
||||||
|
} else if !strings.EqualFold(to.String(v), to.String(currentTagsOnResource[key])) {
|
||||||
|
currentTagsOnResource[key] = v
|
||||||
|
changed = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return currentTagsOnResource, changed
|
||||||
|
}
|
||||||
|
|
|
@ -195,6 +195,7 @@ func (ss *scaleSet) getVmssVMByNodeIdentity(node *nodeIdentity, crt azcache.Azur
|
||||||
}
|
}
|
||||||
|
|
||||||
if !found || vm == nil {
|
if !found || vm == nil {
|
||||||
|
klog.Warningf("Unable to find node %s: %v", node.nodeName, cloudprovider.InstanceNotFound)
|
||||||
return "", "", nil, cloudprovider.InstanceNotFound
|
return "", "", nil, cloudprovider.InstanceNotFound
|
||||||
}
|
}
|
||||||
return vmssName, instanceID, vm, nil
|
return vmssName, instanceID, vm, nil
|
||||||
|
@ -342,6 +343,7 @@ func (ss *scaleSet) GetInstanceIDByNodeName(name string) (string, error) {
|
||||||
|
|
||||||
_, _, vm, err := ss.getVmssVM(name, azcache.CacheReadTypeUnsafe)
|
_, _, vm, err := ss.getVmssVM(name, azcache.CacheReadTypeUnsafe)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
klog.Errorf("Unable to find node %s: %v", name, err)
|
||||||
return "", err
|
return "", err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -389,6 +391,7 @@ func (ss *scaleSet) GetNodeNameByProviderID(providerID string) (types.NodeName,
|
||||||
|
|
||||||
vm, err := ss.getVmssVMByInstanceID(resourceGroup, scaleSetName, instanceID, azcache.CacheReadTypeUnsafe)
|
vm, err := ss.getVmssVMByInstanceID(resourceGroup, scaleSetName, instanceID, azcache.CacheReadTypeUnsafe)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
klog.Errorf("Unable to find node by providerID %s: %v", providerID, err)
|
||||||
return "", err
|
return "", err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -709,6 +712,7 @@ func (ss *scaleSet) getNodeIdentityByNodeName(nodeName string, crt azcache.Azure
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
if node.vmssName == "" {
|
if node.vmssName == "" {
|
||||||
|
klog.Warningf("Unable to find node %s: %v", nodeName, cloudprovider.InstanceNotFound)
|
||||||
return nil, cloudprovider.InstanceNotFound
|
return nil, cloudprovider.InstanceNotFound
|
||||||
}
|
}
|
||||||
return node, nil
|
return node, nil
|
||||||
|
@ -721,7 +725,7 @@ func (ss *scaleSet) listScaleSetVMs(scaleSetName, resourceGroup string) ([]compu
|
||||||
|
|
||||||
allVMs, rerr := ss.VirtualMachineScaleSetVMsClient.List(ctx, resourceGroup, scaleSetName, string(compute.InstanceView))
|
allVMs, rerr := ss.VirtualMachineScaleSetVMsClient.List(ctx, resourceGroup, scaleSetName, string(compute.InstanceView))
|
||||||
if rerr != nil {
|
if rerr != nil {
|
||||||
klog.Errorf("VirtualMachineScaleSetVMsClient.List failed: %v", rerr)
|
klog.Errorf("VirtualMachineScaleSetVMsClient.List(%s, %s) failed: %v", resourceGroup, scaleSetName, rerr)
|
||||||
if rerr.IsNotFound() {
|
if rerr.IsNotFound() {
|
||||||
return nil, cloudprovider.InstanceNotFound
|
return nil, cloudprovider.InstanceNotFound
|
||||||
}
|
}
|
||||||
|
@ -960,6 +964,11 @@ func (ss *scaleSet) EnsureHostInPool(service *v1.Service, nodeName types.NodeNam
|
||||||
vmName := mapNodeNameToVMName(nodeName)
|
vmName := mapNodeNameToVMName(nodeName)
|
||||||
ssName, instanceID, vm, err := ss.getVmssVM(vmName, azcache.CacheReadTypeDefault)
|
ssName, instanceID, vm, err := ss.getVmssVM(vmName, azcache.CacheReadTypeDefault)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
if errors.Is(err, cloudprovider.InstanceNotFound) {
|
||||||
|
klog.Infof("EnsureHostInPool: skipping node %s because it is not found", vmName)
|
||||||
|
return "", "", "", nil, nil
|
||||||
|
}
|
||||||
|
|
||||||
return "", "", "", nil, err
|
return "", "", "", nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1335,6 +1344,11 @@ func (ss *scaleSet) EnsureHostsInPool(service *v1.Service, nodes []*v1.Node, bac
|
||||||
func (ss *scaleSet) ensureBackendPoolDeletedFromNode(nodeName, backendPoolID string) (string, string, string, *compute.VirtualMachineScaleSetVM, error) {
|
func (ss *scaleSet) ensureBackendPoolDeletedFromNode(nodeName, backendPoolID string) (string, string, string, *compute.VirtualMachineScaleSetVM, error) {
|
||||||
ssName, instanceID, vm, err := ss.getVmssVM(nodeName, azcache.CacheReadTypeDefault)
|
ssName, instanceID, vm, err := ss.getVmssVM(nodeName, azcache.CacheReadTypeDefault)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
if errors.Is(err, cloudprovider.InstanceNotFound) {
|
||||||
|
klog.Infof("ensureBackendPoolDeletedFromNode: skipping node %s because it is not found", nodeName)
|
||||||
|
return "", "", "", nil, nil
|
||||||
|
}
|
||||||
|
|
||||||
return "", "", "", nil, err
|
return "", "", "", nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1407,7 +1421,7 @@ func (ss *scaleSet) GetNodeNameByIPConfigurationID(ipConfigurationID string) (st
|
||||||
|
|
||||||
klog.V(4).Infof("Can not extract scale set name from ipConfigurationID (%s), assuming it is managed by availability set", ipConfigurationID)
|
klog.V(4).Infof("Can not extract scale set name from ipConfigurationID (%s), assuming it is managed by availability set", ipConfigurationID)
|
||||||
name, rg, err := ss.availabilitySet.GetNodeNameByIPConfigurationID(ipConfigurationID)
|
name, rg, err := ss.availabilitySet.GetNodeNameByIPConfigurationID(ipConfigurationID)
|
||||||
if err != nil {
|
if err != nil && !errors.Is(err, cloudprovider.InstanceNotFound) {
|
||||||
klog.Errorf("GetNodeNameByIPConfigurationID: failed to invoke availabilitySet.GetNodeNameByIPConfigurationID: %s", err.Error())
|
klog.Errorf("GetNodeNameByIPConfigurationID: failed to invoke availabilitySet.GetNodeNameByIPConfigurationID: %s", err.Error())
|
||||||
return "", "", err
|
return "", "", err
|
||||||
}
|
}
|
||||||
|
@ -1419,6 +1433,7 @@ func (ss *scaleSet) GetNodeNameByIPConfigurationID(ipConfigurationID string) (st
|
||||||
instanceID := matches[3]
|
instanceID := matches[3]
|
||||||
vm, err := ss.getVmssVMByInstanceID(resourceGroup, scaleSetName, instanceID, azcache.CacheReadTypeUnsafe)
|
vm, err := ss.getVmssVMByInstanceID(resourceGroup, scaleSetName, instanceID, azcache.CacheReadTypeUnsafe)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
klog.Errorf("Unable to find node by ipConfigurationID %s: %v", ipConfigurationID, err)
|
||||||
return "", "", err
|
return "", "", err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1462,10 +1477,15 @@ func (ss *scaleSet) ensureBackendPoolDeletedFromVMSS(service *v1.Service, backen
|
||||||
vmssNamesMap[vmSetName] = true
|
vmssNamesMap[vmSetName] = true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
vmssUpdaters := make([]func() error, 0, len(vmssNamesMap))
|
||||||
|
errors := make([]error, 0, len(vmssNamesMap))
|
||||||
for vmssName := range vmssNamesMap {
|
for vmssName := range vmssNamesMap {
|
||||||
|
vmssName := vmssName
|
||||||
vmss, err := ss.getVMSS(vmssName, azcache.CacheReadTypeDefault)
|
vmss, err := ss.getVMSS(vmssName, azcache.CacheReadTypeDefault)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
klog.Errorf("ensureBackendPoolDeletedFromVMSS: failed to get VMSS %s: %v", vmssName, err)
|
||||||
|
errors = append(errors, err)
|
||||||
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
// When vmss is being deleted, CreateOrUpdate API would report "the vmss is being deleted" error.
|
// When vmss is being deleted, CreateOrUpdate API would report "the vmss is being deleted" error.
|
||||||
|
@ -1481,11 +1501,15 @@ func (ss *scaleSet) ensureBackendPoolDeletedFromVMSS(service *v1.Service, backen
|
||||||
vmssNIC := *vmss.VirtualMachineProfile.NetworkProfile.NetworkInterfaceConfigurations
|
vmssNIC := *vmss.VirtualMachineProfile.NetworkProfile.NetworkInterfaceConfigurations
|
||||||
primaryNIC, err := ss.getPrimaryNetworkInterfaceConfigurationForScaleSet(vmssNIC, vmssName)
|
primaryNIC, err := ss.getPrimaryNetworkInterfaceConfigurationForScaleSet(vmssNIC, vmssName)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
klog.Errorf("ensureBackendPoolDeletedFromVMSS: failed to get the primary network interface config of the VMSS %s: %v", vmssName, err)
|
||||||
|
errors = append(errors, err)
|
||||||
|
continue
|
||||||
}
|
}
|
||||||
primaryIPConfig, err := getPrimaryIPConfigFromVMSSNetworkConfig(primaryNIC)
|
primaryIPConfig, err := getPrimaryIPConfigFromVMSSNetworkConfig(primaryNIC)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
klog.Errorf("ensureBackendPoolDeletedFromVMSS: failed to the primary IP config from the VMSS %s's network config : %v", vmssName, err)
|
||||||
|
errors = append(errors, err)
|
||||||
|
continue
|
||||||
}
|
}
|
||||||
loadBalancerBackendAddressPools := []compute.SubResource{}
|
loadBalancerBackendAddressPools := []compute.SubResource{}
|
||||||
if primaryIPConfig.LoadBalancerBackendAddressPools != nil {
|
if primaryIPConfig.LoadBalancerBackendAddressPools != nil {
|
||||||
|
@ -1506,25 +1530,38 @@ func (ss *scaleSet) ensureBackendPoolDeletedFromVMSS(service *v1.Service, backen
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
// Compose a new vmss with added backendPoolID.
|
vmssUpdaters = append(vmssUpdaters, func() error {
|
||||||
primaryIPConfig.LoadBalancerBackendAddressPools = &newBackendPools
|
// Compose a new vmss with added backendPoolID.
|
||||||
newVMSS := compute.VirtualMachineScaleSet{
|
primaryIPConfig.LoadBalancerBackendAddressPools = &newBackendPools
|
||||||
Location: vmss.Location,
|
newVMSS := compute.VirtualMachineScaleSet{
|
||||||
VirtualMachineScaleSetProperties: &compute.VirtualMachineScaleSetProperties{
|
Location: vmss.Location,
|
||||||
VirtualMachineProfile: &compute.VirtualMachineScaleSetVMProfile{
|
VirtualMachineScaleSetProperties: &compute.VirtualMachineScaleSetProperties{
|
||||||
NetworkProfile: &compute.VirtualMachineScaleSetNetworkProfile{
|
VirtualMachineProfile: &compute.VirtualMachineScaleSetVMProfile{
|
||||||
NetworkInterfaceConfigurations: &vmssNIC,
|
NetworkProfile: &compute.VirtualMachineScaleSetNetworkProfile{
|
||||||
|
NetworkInterfaceConfigurations: &vmssNIC,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
}
|
||||||
}
|
|
||||||
|
|
||||||
klog.V(2).Infof("ensureBackendPoolDeletedFromVMSS begins to update vmss(%s) with backendPoolID %s", vmssName, backendPoolID)
|
klog.V(2).Infof("ensureBackendPoolDeletedFromVMSS begins to update vmss(%s) with backendPoolID %s", vmssName, backendPoolID)
|
||||||
rerr := ss.CreateOrUpdateVMSS(ss.ResourceGroup, vmssName, newVMSS)
|
rerr := ss.CreateOrUpdateVMSS(ss.ResourceGroup, vmssName, newVMSS)
|
||||||
if rerr != nil {
|
if rerr != nil {
|
||||||
klog.Errorf("ensureBackendPoolDeletedFromVMSS CreateOrUpdateVMSS(%s) with new backendPoolID %s, err: %v", vmssName, backendPoolID, err)
|
klog.Errorf("ensureBackendPoolDeletedFromVMSS CreateOrUpdateVMSS(%s) with new backendPoolID %s, err: %v", vmssName, backendPoolID, rerr)
|
||||||
return rerr.Error()
|
return rerr.Error()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
errs := utilerrors.AggregateGoroutines(vmssUpdaters...)
|
||||||
|
if errs != nil {
|
||||||
|
return utilerrors.Flatten(errs)
|
||||||
|
}
|
||||||
|
// Fail if there are other errors.
|
||||||
|
if len(errors) > 0 {
|
||||||
|
return utilerrors.Flatten(utilerrors.NewAggregate(errors))
|
||||||
}
|
}
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
|
@ -1558,7 +1595,7 @@ func (ss *scaleSet) EnsureBackendPoolDeleted(service *v1.Service, backendPoolID,
|
||||||
|
|
||||||
hostUpdates := make([]func() error, 0, len(ipConfigurationIDs))
|
hostUpdates := make([]func() error, 0, len(ipConfigurationIDs))
|
||||||
nodeUpdates := make(map[vmssMetaInfo]map[string]compute.VirtualMachineScaleSetVM)
|
nodeUpdates := make(map[vmssMetaInfo]map[string]compute.VirtualMachineScaleSetVM)
|
||||||
errors := make([]error, 0)
|
allErrs := make([]error, 0)
|
||||||
for i := range ipConfigurationIDs {
|
for i := range ipConfigurationIDs {
|
||||||
ipConfigurationID := ipConfigurationIDs[i]
|
ipConfigurationID := ipConfigurationIDs[i]
|
||||||
|
|
||||||
|
@ -1578,14 +1615,16 @@ func (ss *scaleSet) EnsureBackendPoolDeleted(service *v1.Service, backendPoolID,
|
||||||
}
|
}
|
||||||
|
|
||||||
klog.Errorf("Failed to GetNodeNameByIPConfigurationID(%s): %v", ipConfigurationID, err)
|
klog.Errorf("Failed to GetNodeNameByIPConfigurationID(%s): %v", ipConfigurationID, err)
|
||||||
errors = append(errors, err)
|
allErrs = append(allErrs, err)
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
nodeResourceGroup, nodeVMSS, nodeInstanceID, nodeVMSSVM, err := ss.ensureBackendPoolDeletedFromNode(nodeName, backendPoolID)
|
nodeResourceGroup, nodeVMSS, nodeInstanceID, nodeVMSSVM, err := ss.ensureBackendPoolDeletedFromNode(nodeName, backendPoolID)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
klog.Errorf("EnsureBackendPoolDeleted(%s): backendPoolID(%s) - failed with error %v", getServiceName(service), backendPoolID, err)
|
if !errors.Is(err, ErrorNotVmssInstance) { // Do nothing for the VMAS nodes.
|
||||||
errors = append(errors, err)
|
klog.Errorf("EnsureBackendPoolDeleted(%s): backendPoolID(%s) - failed with error %v", getServiceName(service), backendPoolID, err)
|
||||||
|
allErrs = append(allErrs, err)
|
||||||
|
}
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1631,8 +1670,8 @@ func (ss *scaleSet) EnsureBackendPoolDeleted(service *v1.Service, backendPoolID,
|
||||||
}
|
}
|
||||||
|
|
||||||
// Fail if there are other errors.
|
// Fail if there are other errors.
|
||||||
if len(errors) > 0 {
|
if len(allErrs) > 0 {
|
||||||
return utilerrors.Flatten(utilerrors.NewAggregate(errors))
|
return utilerrors.Flatten(utilerrors.NewAggregate(allErrs))
|
||||||
}
|
}
|
||||||
|
|
||||||
// Ensure the backendPoolID is also deleted on VMSS itself.
|
// Ensure the backendPoolID is also deleted on VMSS itself.
|
||||||
|
|
|
@ -76,7 +76,7 @@ func (err *Error) Error() error {
|
||||||
retryAfterSeconds = int(err.RetryAfter.Sub(curTime) / time.Second)
|
retryAfterSeconds = int(err.RetryAfter.Sub(curTime) / time.Second)
|
||||||
}
|
}
|
||||||
|
|
||||||
return fmt.Errorf("Retriable: %v, RetryAfter: %ds, HTTPStatusCode: %d, RawError: %v",
|
return fmt.Errorf("Retriable: %v, RetryAfter: %ds, HTTPStatusCode: %d, RawError: %w",
|
||||||
err.Retriable, retryAfterSeconds, err.HTTPStatusCode, err.RawError)
|
err.Retriable, retryAfterSeconds, err.HTTPStatusCode, err.RawError)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,7 @@ require (
|
||||||
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e // indirect
|
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e // indirect
|
||||||
github.com/stretchr/testify v1.6.1
|
github.com/stretchr/testify v1.6.1
|
||||||
gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f // indirect
|
gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f // indirect
|
||||||
k8s.io/klog/v2 v2.8.0
|
k8s.io/klog/v2 v2.9.0
|
||||||
k8s.io/utils v0.0.0-20201110183641-67b214c5f920
|
k8s.io/utils v0.0.0-20201110183641-67b214c5f920
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -25,7 +25,7 @@ gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8
|
||||||
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo=
|
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo=
|
||||||
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||||
k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE=
|
k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE=
|
||||||
k8s.io/klog/v2 v2.8.0 h1:Q3gmuM9hKEjefWFFYF0Mat+YyFJvsUyYuwyNNJ5C9Ts=
|
k8s.io/klog/v2 v2.9.0 h1:D7HV+n1V57XeZ0m6tdRkfknthUaM06VFbWldOFh8kzM=
|
||||||
k8s.io/klog/v2 v2.8.0/go.mod h1:hy9LJ/NvuK+iVyP4Ehqva4HxZG/oXyIS3n3Jmire4Ec=
|
k8s.io/klog/v2 v2.9.0/go.mod h1:hy9LJ/NvuK+iVyP4Ehqva4HxZG/oXyIS3n3Jmire4Ec=
|
||||||
k8s.io/utils v0.0.0-20201110183641-67b214c5f920 h1:CbnUZsM497iRC5QMVkHwyl8s2tB3g7yaSHkYPkpgelw=
|
k8s.io/utils v0.0.0-20201110183641-67b214c5f920 h1:CbnUZsM497iRC5QMVkHwyl8s2tB3g7yaSHkYPkpgelw=
|
||||||
k8s.io/utils v0.0.0-20201110183641-67b214c5f920/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA=
|
k8s.io/utils v0.0.0-20201110183641-67b214c5f920/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA=
|
||||||
|
|
|
@ -1306,7 +1306,7 @@ golang.org/x/sys/windows/svc/debug
|
||||||
golang.org/x/sys/windows/svc/mgr
|
golang.org/x/sys/windows/svc/mgr
|
||||||
# golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d
|
# golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d
|
||||||
golang.org/x/term
|
golang.org/x/term
|
||||||
# golang.org/x/text v0.3.4
|
# golang.org/x/text v0.3.6
|
||||||
golang.org/x/text/encoding
|
golang.org/x/text/encoding
|
||||||
golang.org/x/text/encoding/charmap
|
golang.org/x/text/encoding/charmap
|
||||||
golang.org/x/text/encoding/htmlindex
|
golang.org/x/text/encoding/htmlindex
|
||||||
|
@ -1512,7 +1512,7 @@ gopkg.in/yaml.v3
|
||||||
# inet.af/tcpproxy v0.0.0-20200125044825-b6bb9b5b8252
|
# inet.af/tcpproxy v0.0.0-20200125044825-b6bb9b5b8252
|
||||||
## explicit
|
## explicit
|
||||||
inet.af/tcpproxy
|
inet.af/tcpproxy
|
||||||
# k8s.io/api v0.21.5 => github.com/k3s-io/kubernetes/staging/src/k8s.io/api v1.21.5-k3s1
|
# k8s.io/api v0.21.6 => github.com/k3s-io/kubernetes/staging/src/k8s.io/api v1.21.6-k3s1
|
||||||
## explicit
|
## explicit
|
||||||
k8s.io/api/admission/v1
|
k8s.io/api/admission/v1
|
||||||
k8s.io/api/admission/v1beta1
|
k8s.io/api/admission/v1beta1
|
||||||
|
@ -1560,7 +1560,7 @@ k8s.io/api/scheduling/v1beta1
|
||||||
k8s.io/api/storage/v1
|
k8s.io/api/storage/v1
|
||||||
k8s.io/api/storage/v1alpha1
|
k8s.io/api/storage/v1alpha1
|
||||||
k8s.io/api/storage/v1beta1
|
k8s.io/api/storage/v1beta1
|
||||||
# k8s.io/apiextensions-apiserver v0.18.0 => github.com/k3s-io/kubernetes/staging/src/k8s.io/apiextensions-apiserver v1.21.5-k3s1
|
# k8s.io/apiextensions-apiserver v0.18.0 => github.com/k3s-io/kubernetes/staging/src/k8s.io/apiextensions-apiserver v1.21.6-k3s1
|
||||||
k8s.io/apiextensions-apiserver/pkg/apihelpers
|
k8s.io/apiextensions-apiserver/pkg/apihelpers
|
||||||
k8s.io/apiextensions-apiserver/pkg/apis/apiextensions
|
k8s.io/apiextensions-apiserver/pkg/apis/apiextensions
|
||||||
k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/install
|
k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/install
|
||||||
|
@ -1600,7 +1600,7 @@ k8s.io/apiextensions-apiserver/pkg/generated/openapi
|
||||||
k8s.io/apiextensions-apiserver/pkg/registry/customresource
|
k8s.io/apiextensions-apiserver/pkg/registry/customresource
|
||||||
k8s.io/apiextensions-apiserver/pkg/registry/customresource/tableconvertor
|
k8s.io/apiextensions-apiserver/pkg/registry/customresource/tableconvertor
|
||||||
k8s.io/apiextensions-apiserver/pkg/registry/customresourcedefinition
|
k8s.io/apiextensions-apiserver/pkg/registry/customresourcedefinition
|
||||||
# k8s.io/apimachinery v0.21.5 => github.com/k3s-io/kubernetes/staging/src/k8s.io/apimachinery v1.21.5-k3s1
|
# k8s.io/apimachinery v0.21.6 => github.com/k3s-io/kubernetes/staging/src/k8s.io/apimachinery v1.21.6-k3s1
|
||||||
## explicit
|
## explicit
|
||||||
k8s.io/apimachinery/pkg/api/equality
|
k8s.io/apimachinery/pkg/api/equality
|
||||||
k8s.io/apimachinery/pkg/api/errors
|
k8s.io/apimachinery/pkg/api/errors
|
||||||
|
@ -1665,7 +1665,7 @@ k8s.io/apimachinery/pkg/watch
|
||||||
k8s.io/apimachinery/third_party/forked/golang/json
|
k8s.io/apimachinery/third_party/forked/golang/json
|
||||||
k8s.io/apimachinery/third_party/forked/golang/netutil
|
k8s.io/apimachinery/third_party/forked/golang/netutil
|
||||||
k8s.io/apimachinery/third_party/forked/golang/reflect
|
k8s.io/apimachinery/third_party/forked/golang/reflect
|
||||||
# k8s.io/apiserver v0.21.5 => github.com/k3s-io/kubernetes/staging/src/k8s.io/apiserver v1.21.5-k3s1
|
# k8s.io/apiserver v0.21.6 => github.com/k3s-io/kubernetes/staging/src/k8s.io/apiserver v1.21.6-k3s1
|
||||||
## explicit
|
## explicit
|
||||||
k8s.io/apiserver/pkg/admission
|
k8s.io/apiserver/pkg/admission
|
||||||
k8s.io/apiserver/pkg/admission/configuration
|
k8s.io/apiserver/pkg/admission/configuration
|
||||||
|
@ -1804,11 +1804,11 @@ k8s.io/apiserver/plugin/pkg/audit/webhook
|
||||||
k8s.io/apiserver/plugin/pkg/authenticator/token/oidc
|
k8s.io/apiserver/plugin/pkg/authenticator/token/oidc
|
||||||
k8s.io/apiserver/plugin/pkg/authenticator/token/webhook
|
k8s.io/apiserver/plugin/pkg/authenticator/token/webhook
|
||||||
k8s.io/apiserver/plugin/pkg/authorizer/webhook
|
k8s.io/apiserver/plugin/pkg/authorizer/webhook
|
||||||
# k8s.io/cli-runtime v0.0.0 => github.com/k3s-io/kubernetes/staging/src/k8s.io/cli-runtime v1.21.5-k3s1
|
# k8s.io/cli-runtime v0.0.0 => github.com/k3s-io/kubernetes/staging/src/k8s.io/cli-runtime v1.21.6-k3s1
|
||||||
k8s.io/cli-runtime/pkg/genericclioptions
|
k8s.io/cli-runtime/pkg/genericclioptions
|
||||||
k8s.io/cli-runtime/pkg/printers
|
k8s.io/cli-runtime/pkg/printers
|
||||||
k8s.io/cli-runtime/pkg/resource
|
k8s.io/cli-runtime/pkg/resource
|
||||||
# k8s.io/client-go v11.0.1-0.20190409021438-1a26190bd76a+incompatible => github.com/k3s-io/kubernetes/staging/src/k8s.io/client-go v1.21.5-k3s1
|
# k8s.io/client-go v11.0.1-0.20190409021438-1a26190bd76a+incompatible => github.com/k3s-io/kubernetes/staging/src/k8s.io/client-go v1.21.6-k3s1
|
||||||
## explicit
|
## explicit
|
||||||
k8s.io/client-go/applyconfigurations/admissionregistration/v1
|
k8s.io/client-go/applyconfigurations/admissionregistration/v1
|
||||||
k8s.io/client-go/applyconfigurations/admissionregistration/v1beta1
|
k8s.io/client-go/applyconfigurations/admissionregistration/v1beta1
|
||||||
|
@ -2096,7 +2096,7 @@ k8s.io/client-go/util/jsonpath
|
||||||
k8s.io/client-go/util/keyutil
|
k8s.io/client-go/util/keyutil
|
||||||
k8s.io/client-go/util/retry
|
k8s.io/client-go/util/retry
|
||||||
k8s.io/client-go/util/workqueue
|
k8s.io/client-go/util/workqueue
|
||||||
# k8s.io/cloud-provider v0.21.5 => github.com/k3s-io/kubernetes/staging/src/k8s.io/cloud-provider v1.21.5-k3s1
|
# k8s.io/cloud-provider v0.21.6 => github.com/k3s-io/kubernetes/staging/src/k8s.io/cloud-provider v1.21.6-k3s1
|
||||||
## explicit
|
## explicit
|
||||||
k8s.io/cloud-provider
|
k8s.io/cloud-provider
|
||||||
k8s.io/cloud-provider/api
|
k8s.io/cloud-provider/api
|
||||||
|
@ -2118,13 +2118,13 @@ k8s.io/cloud-provider/service/helpers
|
||||||
k8s.io/cloud-provider/volume
|
k8s.io/cloud-provider/volume
|
||||||
k8s.io/cloud-provider/volume/errors
|
k8s.io/cloud-provider/volume/errors
|
||||||
k8s.io/cloud-provider/volume/helpers
|
k8s.io/cloud-provider/volume/helpers
|
||||||
# k8s.io/cluster-bootstrap v0.0.0 => github.com/k3s-io/kubernetes/staging/src/k8s.io/cluster-bootstrap v1.21.5-k3s1
|
# k8s.io/cluster-bootstrap v0.0.0 => github.com/k3s-io/kubernetes/staging/src/k8s.io/cluster-bootstrap v1.21.6-k3s1
|
||||||
k8s.io/cluster-bootstrap/token/api
|
k8s.io/cluster-bootstrap/token/api
|
||||||
k8s.io/cluster-bootstrap/token/jws
|
k8s.io/cluster-bootstrap/token/jws
|
||||||
k8s.io/cluster-bootstrap/token/util
|
k8s.io/cluster-bootstrap/token/util
|
||||||
k8s.io/cluster-bootstrap/util/secrets
|
k8s.io/cluster-bootstrap/util/secrets
|
||||||
k8s.io/cluster-bootstrap/util/tokens
|
k8s.io/cluster-bootstrap/util/tokens
|
||||||
# k8s.io/code-generator v0.19.7 => github.com/k3s-io/kubernetes/staging/src/k8s.io/code-generator v1.21.5-k3s1
|
# k8s.io/code-generator v0.19.7 => github.com/k3s-io/kubernetes/staging/src/k8s.io/code-generator v1.21.6-k3s1
|
||||||
k8s.io/code-generator/cmd/client-gen/args
|
k8s.io/code-generator/cmd/client-gen/args
|
||||||
k8s.io/code-generator/cmd/client-gen/generators
|
k8s.io/code-generator/cmd/client-gen/generators
|
||||||
k8s.io/code-generator/cmd/client-gen/generators/fake
|
k8s.io/code-generator/cmd/client-gen/generators/fake
|
||||||
|
@ -2139,7 +2139,7 @@ k8s.io/code-generator/cmd/lister-gen/args
|
||||||
k8s.io/code-generator/cmd/lister-gen/generators
|
k8s.io/code-generator/cmd/lister-gen/generators
|
||||||
k8s.io/code-generator/pkg/namer
|
k8s.io/code-generator/pkg/namer
|
||||||
k8s.io/code-generator/pkg/util
|
k8s.io/code-generator/pkg/util
|
||||||
# k8s.io/component-base v0.21.5 => github.com/k3s-io/kubernetes/staging/src/k8s.io/component-base v1.21.5-k3s1
|
# k8s.io/component-base v0.21.6 => github.com/k3s-io/kubernetes/staging/src/k8s.io/component-base v1.21.6-k3s1
|
||||||
## explicit
|
## explicit
|
||||||
k8s.io/component-base/cli/flag
|
k8s.io/component-base/cli/flag
|
||||||
k8s.io/component-base/cli/globalflag
|
k8s.io/component-base/cli/globalflag
|
||||||
|
@ -2165,7 +2165,7 @@ k8s.io/component-base/metrics/testutil
|
||||||
k8s.io/component-base/term
|
k8s.io/component-base/term
|
||||||
k8s.io/component-base/version
|
k8s.io/component-base/version
|
||||||
k8s.io/component-base/version/verflag
|
k8s.io/component-base/version/verflag
|
||||||
# k8s.io/component-helpers v0.0.0 => github.com/k3s-io/kubernetes/staging/src/k8s.io/component-helpers v1.21.5-k3s1
|
# k8s.io/component-helpers v0.0.0 => github.com/k3s-io/kubernetes/staging/src/k8s.io/component-helpers v1.21.6-k3s1
|
||||||
k8s.io/component-helpers/apimachinery/lease
|
k8s.io/component-helpers/apimachinery/lease
|
||||||
k8s.io/component-helpers/apps/poddisruptionbudget
|
k8s.io/component-helpers/apps/poddisruptionbudget
|
||||||
k8s.io/component-helpers/auth/rbac/reconciliation
|
k8s.io/component-helpers/auth/rbac/reconciliation
|
||||||
|
@ -2174,7 +2174,7 @@ k8s.io/component-helpers/node/topology
|
||||||
k8s.io/component-helpers/scheduling/corev1
|
k8s.io/component-helpers/scheduling/corev1
|
||||||
k8s.io/component-helpers/scheduling/corev1/nodeaffinity
|
k8s.io/component-helpers/scheduling/corev1/nodeaffinity
|
||||||
k8s.io/component-helpers/storage/volume
|
k8s.io/component-helpers/storage/volume
|
||||||
# k8s.io/controller-manager v0.21.5 => github.com/k3s-io/kubernetes/staging/src/k8s.io/controller-manager v1.21.5-k3s1
|
# k8s.io/controller-manager v0.21.6 => github.com/k3s-io/kubernetes/staging/src/k8s.io/controller-manager v1.21.6-k3s1
|
||||||
## explicit
|
## explicit
|
||||||
k8s.io/controller-manager/app
|
k8s.io/controller-manager/app
|
||||||
k8s.io/controller-manager/config
|
k8s.io/controller-manager/config
|
||||||
|
@ -2187,11 +2187,11 @@ k8s.io/controller-manager/pkg/informerfactory
|
||||||
k8s.io/controller-manager/pkg/leadermigration
|
k8s.io/controller-manager/pkg/leadermigration
|
||||||
k8s.io/controller-manager/pkg/leadermigration/config
|
k8s.io/controller-manager/pkg/leadermigration/config
|
||||||
k8s.io/controller-manager/pkg/leadermigration/options
|
k8s.io/controller-manager/pkg/leadermigration/options
|
||||||
# k8s.io/cri-api v0.21.5 => github.com/k3s-io/kubernetes/staging/src/k8s.io/cri-api v1.21.5-k3s1
|
# k8s.io/cri-api v0.21.6 => github.com/k3s-io/kubernetes/staging/src/k8s.io/cri-api v1.21.6-k3s1
|
||||||
## explicit
|
## explicit
|
||||||
k8s.io/cri-api/pkg/apis
|
k8s.io/cri-api/pkg/apis
|
||||||
k8s.io/cri-api/pkg/apis/runtime/v1alpha2
|
k8s.io/cri-api/pkg/apis/runtime/v1alpha2
|
||||||
# k8s.io/csi-translation-lib v0.0.0 => github.com/k3s-io/kubernetes/staging/src/k8s.io/csi-translation-lib v1.21.5-k3s1
|
# k8s.io/csi-translation-lib v0.0.0 => github.com/k3s-io/kubernetes/staging/src/k8s.io/csi-translation-lib v1.21.6-k3s1
|
||||||
k8s.io/csi-translation-lib
|
k8s.io/csi-translation-lib
|
||||||
k8s.io/csi-translation-lib/plugins
|
k8s.io/csi-translation-lib/plugins
|
||||||
# k8s.io/gengo v0.0.0-20201214224949-b6c5ce23f027
|
# k8s.io/gengo v0.0.0-20201214224949-b6c5ce23f027
|
||||||
|
@ -2207,10 +2207,10 @@ k8s.io/heapster/metrics/api/v1/types
|
||||||
# k8s.io/klog v1.0.0
|
# k8s.io/klog v1.0.0
|
||||||
## explicit
|
## explicit
|
||||||
k8s.io/klog
|
k8s.io/klog
|
||||||
# k8s.io/klog/v2 v2.8.0
|
# k8s.io/klog/v2 v2.9.0
|
||||||
## explicit
|
## explicit
|
||||||
k8s.io/klog/v2
|
k8s.io/klog/v2
|
||||||
# k8s.io/kube-aggregator v0.18.0 => github.com/k3s-io/kubernetes/staging/src/k8s.io/kube-aggregator v1.21.5-k3s1
|
# k8s.io/kube-aggregator v0.18.0 => github.com/k3s-io/kubernetes/staging/src/k8s.io/kube-aggregator v1.21.6-k3s1
|
||||||
k8s.io/kube-aggregator/pkg/apis/apiregistration
|
k8s.io/kube-aggregator/pkg/apis/apiregistration
|
||||||
k8s.io/kube-aggregator/pkg/apis/apiregistration/install
|
k8s.io/kube-aggregator/pkg/apis/apiregistration/install
|
||||||
k8s.io/kube-aggregator/pkg/apis/apiregistration/v1
|
k8s.io/kube-aggregator/pkg/apis/apiregistration/v1
|
||||||
|
@ -2238,7 +2238,7 @@ k8s.io/kube-aggregator/pkg/controllers/status
|
||||||
k8s.io/kube-aggregator/pkg/registry/apiservice
|
k8s.io/kube-aggregator/pkg/registry/apiservice
|
||||||
k8s.io/kube-aggregator/pkg/registry/apiservice/etcd
|
k8s.io/kube-aggregator/pkg/registry/apiservice/etcd
|
||||||
k8s.io/kube-aggregator/pkg/registry/apiservice/rest
|
k8s.io/kube-aggregator/pkg/registry/apiservice/rest
|
||||||
# k8s.io/kube-controller-manager v0.0.0 => github.com/k3s-io/kubernetes/staging/src/k8s.io/kube-controller-manager v1.21.5-k3s1
|
# k8s.io/kube-controller-manager v0.0.0 => github.com/k3s-io/kubernetes/staging/src/k8s.io/kube-controller-manager v1.21.6-k3s1
|
||||||
k8s.io/kube-controller-manager/config/v1alpha1
|
k8s.io/kube-controller-manager/config/v1alpha1
|
||||||
# k8s.io/kube-openapi v0.0.0-20210305001622-591a79e4bda7
|
# k8s.io/kube-openapi v0.0.0-20210305001622-591a79e4bda7
|
||||||
k8s.io/kube-openapi/pkg/aggregator
|
k8s.io/kube-openapi/pkg/aggregator
|
||||||
|
@ -2254,13 +2254,13 @@ k8s.io/kube-openapi/pkg/validation/spec
|
||||||
k8s.io/kube-openapi/pkg/validation/strfmt
|
k8s.io/kube-openapi/pkg/validation/strfmt
|
||||||
k8s.io/kube-openapi/pkg/validation/strfmt/bson
|
k8s.io/kube-openapi/pkg/validation/strfmt/bson
|
||||||
k8s.io/kube-openapi/pkg/validation/validate
|
k8s.io/kube-openapi/pkg/validation/validate
|
||||||
# k8s.io/kube-proxy v0.0.0 => github.com/k3s-io/kubernetes/staging/src/k8s.io/kube-proxy v1.21.5-k3s1
|
# k8s.io/kube-proxy v0.0.0 => github.com/k3s-io/kubernetes/staging/src/k8s.io/kube-proxy v1.21.6-k3s1
|
||||||
k8s.io/kube-proxy/config/v1alpha1
|
k8s.io/kube-proxy/config/v1alpha1
|
||||||
# k8s.io/kube-scheduler v0.0.0 => github.com/k3s-io/kubernetes/staging/src/k8s.io/kube-scheduler v1.21.5-k3s1
|
# k8s.io/kube-scheduler v0.0.0 => github.com/k3s-io/kubernetes/staging/src/k8s.io/kube-scheduler v1.21.6-k3s1
|
||||||
k8s.io/kube-scheduler/config/v1
|
k8s.io/kube-scheduler/config/v1
|
||||||
k8s.io/kube-scheduler/config/v1beta1
|
k8s.io/kube-scheduler/config/v1beta1
|
||||||
k8s.io/kube-scheduler/extender/v1
|
k8s.io/kube-scheduler/extender/v1
|
||||||
# k8s.io/kubectl v0.21.5 => github.com/k3s-io/kubernetes/staging/src/k8s.io/kubectl v1.21.5-k3s1
|
# k8s.io/kubectl v0.21.6 => github.com/k3s-io/kubernetes/staging/src/k8s.io/kubectl v1.21.6-k3s1
|
||||||
## explicit
|
## explicit
|
||||||
k8s.io/kubectl/pkg/apps
|
k8s.io/kubectl/pkg/apps
|
||||||
k8s.io/kubectl/pkg/cmd
|
k8s.io/kubectl/pkg/cmd
|
||||||
|
@ -2339,7 +2339,7 @@ k8s.io/kubectl/pkg/util/storage
|
||||||
k8s.io/kubectl/pkg/util/templates
|
k8s.io/kubectl/pkg/util/templates
|
||||||
k8s.io/kubectl/pkg/util/term
|
k8s.io/kubectl/pkg/util/term
|
||||||
k8s.io/kubectl/pkg/validation
|
k8s.io/kubectl/pkg/validation
|
||||||
# k8s.io/kubelet v0.0.0 => github.com/k3s-io/kubernetes/staging/src/k8s.io/kubelet v1.21.5-k3s1
|
# k8s.io/kubelet v0.0.0 => github.com/k3s-io/kubernetes/staging/src/k8s.io/kubelet v1.21.6-k3s1
|
||||||
k8s.io/kubelet/config/v1alpha1
|
k8s.io/kubelet/config/v1alpha1
|
||||||
k8s.io/kubelet/config/v1beta1
|
k8s.io/kubelet/config/v1beta1
|
||||||
k8s.io/kubelet/pkg/apis
|
k8s.io/kubelet/pkg/apis
|
||||||
|
@ -2351,7 +2351,7 @@ k8s.io/kubelet/pkg/apis/pluginregistration/v1
|
||||||
k8s.io/kubelet/pkg/apis/podresources/v1
|
k8s.io/kubelet/pkg/apis/podresources/v1
|
||||||
k8s.io/kubelet/pkg/apis/podresources/v1alpha1
|
k8s.io/kubelet/pkg/apis/podresources/v1alpha1
|
||||||
k8s.io/kubelet/pkg/apis/stats/v1alpha1
|
k8s.io/kubelet/pkg/apis/stats/v1alpha1
|
||||||
# k8s.io/kubernetes v1.21.5 => github.com/k3s-io/kubernetes v1.21.5-k3s1
|
# k8s.io/kubernetes v1.21.6 => github.com/k3s-io/kubernetes v1.21.6-k3s1
|
||||||
## explicit
|
## explicit
|
||||||
k8s.io/kubernetes/cmd/kube-apiserver/app
|
k8s.io/kubernetes/cmd/kube-apiserver/app
|
||||||
k8s.io/kubernetes/cmd/kube-apiserver/app/options
|
k8s.io/kubernetes/cmd/kube-apiserver/app/options
|
||||||
|
@ -3079,7 +3079,7 @@ k8s.io/kubernetes/third_party/forked/gonum/graph
|
||||||
k8s.io/kubernetes/third_party/forked/gonum/graph/internal/linear
|
k8s.io/kubernetes/third_party/forked/gonum/graph/internal/linear
|
||||||
k8s.io/kubernetes/third_party/forked/gonum/graph/simple
|
k8s.io/kubernetes/third_party/forked/gonum/graph/simple
|
||||||
k8s.io/kubernetes/third_party/forked/gonum/graph/traverse
|
k8s.io/kubernetes/third_party/forked/gonum/graph/traverse
|
||||||
# k8s.io/legacy-cloud-providers v0.0.0 => github.com/k3s-io/kubernetes/staging/src/k8s.io/legacy-cloud-providers v1.21.5-k3s1
|
# k8s.io/legacy-cloud-providers v0.0.0 => github.com/k3s-io/kubernetes/staging/src/k8s.io/legacy-cloud-providers v1.21.6-k3s1
|
||||||
k8s.io/legacy-cloud-providers/aws
|
k8s.io/legacy-cloud-providers/aws
|
||||||
k8s.io/legacy-cloud-providers/azure
|
k8s.io/legacy-cloud-providers/azure
|
||||||
k8s.io/legacy-cloud-providers/azure/auth
|
k8s.io/legacy-cloud-providers/azure/auth
|
||||||
|
@ -3122,7 +3122,7 @@ k8s.io/legacy-cloud-providers/openstack
|
||||||
k8s.io/legacy-cloud-providers/vsphere
|
k8s.io/legacy-cloud-providers/vsphere
|
||||||
k8s.io/legacy-cloud-providers/vsphere/vclib
|
k8s.io/legacy-cloud-providers/vsphere/vclib
|
||||||
k8s.io/legacy-cloud-providers/vsphere/vclib/diskmanagers
|
k8s.io/legacy-cloud-providers/vsphere/vclib/diskmanagers
|
||||||
# k8s.io/metrics v0.0.0 => github.com/k3s-io/kubernetes/staging/src/k8s.io/metrics v1.21.5-k3s1
|
# k8s.io/metrics v0.0.0 => github.com/k3s-io/kubernetes/staging/src/k8s.io/metrics v1.21.6-k3s1
|
||||||
k8s.io/metrics/pkg/apis/custom_metrics
|
k8s.io/metrics/pkg/apis/custom_metrics
|
||||||
k8s.io/metrics/pkg/apis/custom_metrics/v1beta1
|
k8s.io/metrics/pkg/apis/custom_metrics/v1beta1
|
||||||
k8s.io/metrics/pkg/apis/custom_metrics/v1beta2
|
k8s.io/metrics/pkg/apis/custom_metrics/v1beta2
|
||||||
|
@ -3138,7 +3138,7 @@ k8s.io/metrics/pkg/client/clientset/versioned/typed/metrics/v1beta1
|
||||||
k8s.io/metrics/pkg/client/custom_metrics
|
k8s.io/metrics/pkg/client/custom_metrics
|
||||||
k8s.io/metrics/pkg/client/custom_metrics/scheme
|
k8s.io/metrics/pkg/client/custom_metrics/scheme
|
||||||
k8s.io/metrics/pkg/client/external_metrics
|
k8s.io/metrics/pkg/client/external_metrics
|
||||||
# k8s.io/mount-utils v0.0.0 => github.com/k3s-io/kubernetes/staging/src/k8s.io/mount-utils v1.21.5-k3s1
|
# k8s.io/mount-utils v0.0.0 => github.com/k3s-io/kubernetes/staging/src/k8s.io/mount-utils v1.21.6-k3s1
|
||||||
k8s.io/mount-utils
|
k8s.io/mount-utils
|
||||||
# k8s.io/utils v0.0.0-20201110183641-67b214c5f920
|
# k8s.io/utils v0.0.0-20201110183641-67b214c5f920
|
||||||
## explicit
|
## explicit
|
||||||
|
@ -3277,32 +3277,32 @@ sigs.k8s.io/yaml
|
||||||
# google.golang.org/genproto => google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884
|
# google.golang.org/genproto => google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884
|
||||||
# google.golang.org/grpc => google.golang.org/grpc v1.27.1
|
# google.golang.org/grpc => google.golang.org/grpc v1.27.1
|
||||||
# gopkg.in/square/go-jose.v2 => gopkg.in/square/go-jose.v2 v2.2.2
|
# gopkg.in/square/go-jose.v2 => gopkg.in/square/go-jose.v2 v2.2.2
|
||||||
# k8s.io/api => github.com/k3s-io/kubernetes/staging/src/k8s.io/api v1.21.5-k3s1
|
# k8s.io/api => github.com/k3s-io/kubernetes/staging/src/k8s.io/api v1.21.6-k3s1
|
||||||
# k8s.io/apiextensions-apiserver => github.com/k3s-io/kubernetes/staging/src/k8s.io/apiextensions-apiserver v1.21.5-k3s1
|
# k8s.io/apiextensions-apiserver => github.com/k3s-io/kubernetes/staging/src/k8s.io/apiextensions-apiserver v1.21.6-k3s1
|
||||||
# k8s.io/apimachinery => github.com/k3s-io/kubernetes/staging/src/k8s.io/apimachinery v1.21.5-k3s1
|
# k8s.io/apimachinery => github.com/k3s-io/kubernetes/staging/src/k8s.io/apimachinery v1.21.6-k3s1
|
||||||
# k8s.io/apiserver => github.com/k3s-io/kubernetes/staging/src/k8s.io/apiserver v1.21.5-k3s1
|
# k8s.io/apiserver => github.com/k3s-io/kubernetes/staging/src/k8s.io/apiserver v1.21.6-k3s1
|
||||||
# k8s.io/cli-runtime => github.com/k3s-io/kubernetes/staging/src/k8s.io/cli-runtime v1.21.5-k3s1
|
# k8s.io/cli-runtime => github.com/k3s-io/kubernetes/staging/src/k8s.io/cli-runtime v1.21.6-k3s1
|
||||||
# k8s.io/client-go => github.com/k3s-io/kubernetes/staging/src/k8s.io/client-go v1.21.5-k3s1
|
# k8s.io/client-go => github.com/k3s-io/kubernetes/staging/src/k8s.io/client-go v1.21.6-k3s1
|
||||||
# k8s.io/cloud-provider => github.com/k3s-io/kubernetes/staging/src/k8s.io/cloud-provider v1.21.5-k3s1
|
# k8s.io/cloud-provider => github.com/k3s-io/kubernetes/staging/src/k8s.io/cloud-provider v1.21.6-k3s1
|
||||||
# k8s.io/cluster-bootstrap => github.com/k3s-io/kubernetes/staging/src/k8s.io/cluster-bootstrap v1.21.5-k3s1
|
# k8s.io/cluster-bootstrap => github.com/k3s-io/kubernetes/staging/src/k8s.io/cluster-bootstrap v1.21.6-k3s1
|
||||||
# k8s.io/code-generator => github.com/k3s-io/kubernetes/staging/src/k8s.io/code-generator v1.21.5-k3s1
|
# k8s.io/code-generator => github.com/k3s-io/kubernetes/staging/src/k8s.io/code-generator v1.21.6-k3s1
|
||||||
# k8s.io/component-base => github.com/k3s-io/kubernetes/staging/src/k8s.io/component-base v1.21.5-k3s1
|
# k8s.io/component-base => github.com/k3s-io/kubernetes/staging/src/k8s.io/component-base v1.21.6-k3s1
|
||||||
# k8s.io/component-helpers => github.com/k3s-io/kubernetes/staging/src/k8s.io/component-helpers v1.21.5-k3s1
|
# k8s.io/component-helpers => github.com/k3s-io/kubernetes/staging/src/k8s.io/component-helpers v1.21.6-k3s1
|
||||||
# k8s.io/controller-manager => github.com/k3s-io/kubernetes/staging/src/k8s.io/controller-manager v1.21.5-k3s1
|
# k8s.io/controller-manager => github.com/k3s-io/kubernetes/staging/src/k8s.io/controller-manager v1.21.6-k3s1
|
||||||
# k8s.io/cri-api => github.com/k3s-io/kubernetes/staging/src/k8s.io/cri-api v1.21.5-k3s1
|
# k8s.io/cri-api => github.com/k3s-io/kubernetes/staging/src/k8s.io/cri-api v1.21.6-k3s1
|
||||||
# k8s.io/csi-translation-lib => github.com/k3s-io/kubernetes/staging/src/k8s.io/csi-translation-lib v1.21.5-k3s1
|
# k8s.io/csi-translation-lib => github.com/k3s-io/kubernetes/staging/src/k8s.io/csi-translation-lib v1.21.6-k3s1
|
||||||
# k8s.io/kube-aggregator => github.com/k3s-io/kubernetes/staging/src/k8s.io/kube-aggregator v1.21.5-k3s1
|
# k8s.io/kube-aggregator => github.com/k3s-io/kubernetes/staging/src/k8s.io/kube-aggregator v1.21.6-k3s1
|
||||||
# k8s.io/kube-controller-manager => github.com/k3s-io/kubernetes/staging/src/k8s.io/kube-controller-manager v1.21.5-k3s1
|
# k8s.io/kube-controller-manager => github.com/k3s-io/kubernetes/staging/src/k8s.io/kube-controller-manager v1.21.6-k3s1
|
||||||
# k8s.io/kube-proxy => github.com/k3s-io/kubernetes/staging/src/k8s.io/kube-proxy v1.21.5-k3s1
|
# k8s.io/kube-proxy => github.com/k3s-io/kubernetes/staging/src/k8s.io/kube-proxy v1.21.6-k3s1
|
||||||
# k8s.io/kube-scheduler => github.com/k3s-io/kubernetes/staging/src/k8s.io/kube-scheduler v1.21.5-k3s1
|
# k8s.io/kube-scheduler => github.com/k3s-io/kubernetes/staging/src/k8s.io/kube-scheduler v1.21.6-k3s1
|
||||||
# k8s.io/kubectl => github.com/k3s-io/kubernetes/staging/src/k8s.io/kubectl v1.21.5-k3s1
|
# k8s.io/kubectl => github.com/k3s-io/kubernetes/staging/src/k8s.io/kubectl v1.21.6-k3s1
|
||||||
# k8s.io/kubelet => github.com/k3s-io/kubernetes/staging/src/k8s.io/kubelet v1.21.5-k3s1
|
# k8s.io/kubelet => github.com/k3s-io/kubernetes/staging/src/k8s.io/kubelet v1.21.6-k3s1
|
||||||
# k8s.io/kubernetes => github.com/k3s-io/kubernetes v1.21.5-k3s1
|
# k8s.io/kubernetes => github.com/k3s-io/kubernetes v1.21.6-k3s1
|
||||||
# k8s.io/legacy-cloud-providers => github.com/k3s-io/kubernetes/staging/src/k8s.io/legacy-cloud-providers v1.21.5-k3s1
|
# k8s.io/legacy-cloud-providers => github.com/k3s-io/kubernetes/staging/src/k8s.io/legacy-cloud-providers v1.21.6-k3s1
|
||||||
# k8s.io/metrics => github.com/k3s-io/kubernetes/staging/src/k8s.io/metrics v1.21.5-k3s1
|
# k8s.io/metrics => github.com/k3s-io/kubernetes/staging/src/k8s.io/metrics v1.21.6-k3s1
|
||||||
# k8s.io/mount-utils => github.com/k3s-io/kubernetes/staging/src/k8s.io/mount-utils v1.21.5-k3s1
|
# k8s.io/mount-utils => github.com/k3s-io/kubernetes/staging/src/k8s.io/mount-utils v1.21.6-k3s1
|
||||||
# k8s.io/node-api => github.com/k3s-io/kubernetes/staging/src/k8s.io/node-api v1.21.5-k3s1
|
# k8s.io/node-api => github.com/k3s-io/kubernetes/staging/src/k8s.io/node-api v1.21.6-k3s1
|
||||||
# k8s.io/sample-apiserver => github.com/k3s-io/kubernetes/staging/src/k8s.io/sample-apiserver v1.21.5-k3s1
|
# k8s.io/sample-apiserver => github.com/k3s-io/kubernetes/staging/src/k8s.io/sample-apiserver v1.21.6-k3s1
|
||||||
# k8s.io/sample-cli-plugin => github.com/k3s-io/kubernetes/staging/src/k8s.io/sample-cli-plugin v1.21.5-k3s1
|
# k8s.io/sample-cli-plugin => github.com/k3s-io/kubernetes/staging/src/k8s.io/sample-cli-plugin v1.21.6-k3s1
|
||||||
# k8s.io/sample-controller => github.com/k3s-io/kubernetes/staging/src/k8s.io/sample-controller v1.21.5-k3s1
|
# k8s.io/sample-controller => github.com/k3s-io/kubernetes/staging/src/k8s.io/sample-controller v1.21.6-k3s1
|
||||||
# mvdan.cc/unparam => mvdan.cc/unparam v0.0.0-20210104141923-aac4ce9116a7
|
# mvdan.cc/unparam => mvdan.cc/unparam v0.0.0-20210104141923-aac4ce9116a7
|
||||||
|
|
Loading…
Reference in New Issue