mirror of https://github.com/kubernetes/kops.git
update k8s dependencies
This commit is contained in:
parent
4dfd85ca8f
commit
83d0d63784
82
go.mod
82
go.mod
|
@ -2,36 +2,36 @@ module k8s.io/kops
|
|||
|
||||
go 1.17
|
||||
|
||||
// Version kubernetes-1.23.1 => tag v0.23.1
|
||||
// Version kubernetes-1.23.5 => tag v0.23.5
|
||||
|
||||
replace (
|
||||
github.com/satori/go.uuid => github.com/satori/go.uuid v1.2.1-0.20181028125025-b2ce2384e17b
|
||||
k8s.io/api => k8s.io/api v0.23.1
|
||||
k8s.io/apiextensions-apiserver => k8s.io/apiextensions-apiserver v0.23.1
|
||||
k8s.io/apimachinery => k8s.io/apimachinery v0.23.1
|
||||
k8s.io/apiserver => k8s.io/apiserver v0.23.1
|
||||
k8s.io/cli-runtime => k8s.io/cli-runtime v0.23.1
|
||||
k8s.io/client-go => k8s.io/client-go v0.23.1
|
||||
k8s.io/cloud-provider => k8s.io/cloud-provider v0.23.1
|
||||
k8s.io/cluster-bootstrap => k8s.io/cluster-bootstrap v0.23.1
|
||||
k8s.io/code-generator => k8s.io/code-generator v0.23.1
|
||||
k8s.io/component-base => k8s.io/component-base v0.23.1
|
||||
k8s.io/component-helpers => k8s.io/component-helpers v0.23.1
|
||||
k8s.io/controller-manager => k8s.io/controller-manager v0.23.1
|
||||
k8s.io/cri-api => k8s.io/cri-api v0.23.1
|
||||
k8s.io/csi-translation-lib => k8s.io/csi-translation-lib v0.23.1
|
||||
k8s.io/kube-aggregator => k8s.io/kube-aggregator v0.23.1
|
||||
k8s.io/kube-controller-manager => k8s.io/kube-controller-manager v0.23.1
|
||||
k8s.io/kube-proxy => k8s.io/kube-proxy v0.23.1
|
||||
k8s.io/kube-scheduler => k8s.io/kube-scheduler v0.23.1
|
||||
k8s.io/kubectl => k8s.io/kubectl v0.23.1
|
||||
k8s.io/kubelet => k8s.io/kubelet v0.23.1
|
||||
k8s.io/kubernetes => k8s.io/kubernetes v1.23.1
|
||||
k8s.io/legacy-cloud-providers => k8s.io/legacy-cloud-providers v0.23.1
|
||||
k8s.io/metrics => k8s.io/metrics v0.23.1
|
||||
k8s.io/mount-utils => k8s.io/mount-utils v0.23.1
|
||||
k8s.io/pod-security-admission => k8s.io/pod-security-admission v0.23.1
|
||||
k8s.io/sample-apiserver => k8s.io/sample-apiserver v0.23.1
|
||||
k8s.io/api => k8s.io/api v0.23.5
|
||||
k8s.io/apiextensions-apiserver => k8s.io/apiextensions-apiserver v0.23.5
|
||||
k8s.io/apimachinery => k8s.io/apimachinery v0.23.5
|
||||
k8s.io/apiserver => k8s.io/apiserver v0.23.5
|
||||
k8s.io/cli-runtime => k8s.io/cli-runtime v0.23.5
|
||||
k8s.io/client-go => k8s.io/client-go v0.23.5
|
||||
k8s.io/cloud-provider => k8s.io/cloud-provider v0.23.5
|
||||
k8s.io/cluster-bootstrap => k8s.io/cluster-bootstrap v0.23.5
|
||||
k8s.io/code-generator => k8s.io/code-generator v0.23.5
|
||||
k8s.io/component-base => k8s.io/component-base v0.23.5
|
||||
k8s.io/component-helpers => k8s.io/component-helpers v0.23.5
|
||||
k8s.io/controller-manager => k8s.io/controller-manager v0.23.5
|
||||
k8s.io/cri-api => k8s.io/cri-api v0.23.5
|
||||
k8s.io/csi-translation-lib => k8s.io/csi-translation-lib v0.23.5
|
||||
k8s.io/kube-aggregator => k8s.io/kube-aggregator v0.23.5
|
||||
k8s.io/kube-controller-manager => k8s.io/kube-controller-manager v0.23.5
|
||||
k8s.io/kube-proxy => k8s.io/kube-proxy v0.23.5
|
||||
k8s.io/kube-scheduler => k8s.io/kube-scheduler v0.23.5
|
||||
k8s.io/kubectl => k8s.io/kubectl v0.23.5
|
||||
k8s.io/kubelet => k8s.io/kubelet v0.23.5
|
||||
k8s.io/kubernetes => k8s.io/kubernetes v1.23.5
|
||||
k8s.io/legacy-cloud-providers => k8s.io/legacy-cloud-providers v0.23.5
|
||||
k8s.io/metrics => k8s.io/metrics v0.23.5
|
||||
k8s.io/mount-utils => k8s.io/mount-utils v0.23.5
|
||||
k8s.io/pod-security-admission => k8s.io/pod-security-admission v0.23.5
|
||||
k8s.io/sample-apiserver => k8s.io/sample-apiserver v0.23.5
|
||||
)
|
||||
|
||||
require (
|
||||
|
@ -85,19 +85,19 @@ require (
|
|||
gopkg.in/square/go-jose.v2 v2.5.1
|
||||
gopkg.in/yaml.v2 v2.4.0
|
||||
helm.sh/helm/v3 v3.7.1
|
||||
k8s.io/api v0.23.1
|
||||
k8s.io/apimachinery v0.23.1
|
||||
k8s.io/cli-runtime v0.23.1
|
||||
k8s.io/client-go v0.23.1
|
||||
k8s.io/component-base v0.23.1
|
||||
k8s.io/api v0.23.5
|
||||
k8s.io/apimachinery v0.23.5
|
||||
k8s.io/cli-runtime v0.23.5
|
||||
k8s.io/client-go v0.23.5
|
||||
k8s.io/component-base v0.23.5
|
||||
k8s.io/gengo v0.0.0-20210813121822-485abfe95c7c
|
||||
k8s.io/klog v1.0.0
|
||||
k8s.io/klog/v2 v2.30.0
|
||||
k8s.io/kubectl v0.23.1
|
||||
k8s.io/kubelet v0.23.1
|
||||
k8s.io/legacy-cloud-providers v0.23.1
|
||||
k8s.io/mount-utils v0.23.1
|
||||
k8s.io/utils v0.0.0-20210930125809-cb0fa318a74b
|
||||
k8s.io/kubectl v0.23.5
|
||||
k8s.io/kubelet v0.23.5
|
||||
k8s.io/legacy-cloud-providers v0.23.5
|
||||
k8s.io/mount-utils v0.23.5
|
||||
k8s.io/utils v0.0.0-20211116205334-6203023598ed
|
||||
sigs.k8s.io/controller-runtime v0.11.0
|
||||
sigs.k8s.io/yaml v1.3.0
|
||||
)
|
||||
|
@ -231,13 +231,13 @@ require (
|
|||
gopkg.in/ini.v1 v1.66.3 // indirect
|
||||
gopkg.in/warnings.v0 v0.1.2 // indirect
|
||||
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect
|
||||
k8s.io/apiextensions-apiserver v0.23.1 // indirect
|
||||
k8s.io/cloud-provider v0.23.1 // indirect
|
||||
k8s.io/csi-translation-lib v0.23.1 // indirect
|
||||
k8s.io/apiextensions-apiserver v0.23.5 // indirect
|
||||
k8s.io/cloud-provider v0.23.5 // indirect
|
||||
k8s.io/csi-translation-lib v0.23.5 // indirect
|
||||
k8s.io/kube-openapi v0.0.0-20211115234752-e816edb12b65 // indirect
|
||||
oras.land/oras-go v0.4.0 // indirect
|
||||
sigs.k8s.io/json v0.0.0-20211020170558-c049b76a60c6 // indirect
|
||||
sigs.k8s.io/kustomize/api v0.10.1 // indirect
|
||||
sigs.k8s.io/kustomize/kyaml v0.13.0 // indirect
|
||||
sigs.k8s.io/structured-merge-diff/v4 v4.2.0 // indirect
|
||||
sigs.k8s.io/structured-merge-diff/v4 v4.2.1 // indirect
|
||||
)
|
||||
|
|
84
go.sum
84
go.sum
|
@ -2020,28 +2020,28 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh
|
|||
honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg=
|
||||
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.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k=
|
||||
k8s.io/api v0.23.1 h1:ncu/qfBfUoClqwkTGbeRqqOqBCRoUAflMuOaOD7J0c8=
|
||||
k8s.io/api v0.23.1/go.mod h1:WfXnOnwSqNtG62Y1CdjoMxh7r7u9QXGCkA1u0na2jgo=
|
||||
k8s.io/apiextensions-apiserver v0.23.1 h1:xxE0q1vLOVZiWORu1KwNRQFsGWtImueOrqSl13sS5EU=
|
||||
k8s.io/apiextensions-apiserver v0.23.1/go.mod h1:0qz4fPaHHsVhRApbtk3MGXNn2Q9M/cVWWhfHdY2SxiM=
|
||||
k8s.io/apimachinery v0.23.1 h1:sfBjlDFwj2onG0Ijx5C+SrAoeUscPrmghm7wHP+uXlo=
|
||||
k8s.io/apimachinery v0.23.1/go.mod h1:SADt2Kl8/sttJ62RRsi9MIV4o8f5S3coArm0Iu3fBno=
|
||||
k8s.io/apiserver v0.23.1/go.mod h1:Bqt0gWbeM2NefS8CjWswwd2VNAKN6lUKR85Ft4gippY=
|
||||
k8s.io/cli-runtime v0.23.1 h1:vHUZrq1Oejs0WaJnxs09mLHKScvIIl2hMSthhS8o8Yo=
|
||||
k8s.io/cli-runtime v0.23.1/go.mod h1:r9r8H/qfXo9w+69vwUL7LokKlLRKW5D6A8vUKCx+YL0=
|
||||
k8s.io/client-go v0.23.1 h1:Ma4Fhf/p07Nmj9yAB1H7UwbFHEBrSPg8lviR24U2GiQ=
|
||||
k8s.io/client-go v0.23.1/go.mod h1:6QSI8fEuqD4zgFK0xbdwfB/PthBsIxCJMa3s17WlcO0=
|
||||
k8s.io/cloud-provider v0.23.1 h1:KQH/nq+stfw0i6/9H8LFZ69PLKjdsl4WuqT6wWmVUqw=
|
||||
k8s.io/cloud-provider v0.23.1/go.mod h1:kI8AnYwOSru5Bci8pPUWwV5kJMVkY1ICOp1p8KKZWpc=
|
||||
k8s.io/cluster-bootstrap v0.23.1/go.mod h1:p2732QxwSa13WPemmyIeykk16qVw15W7lgNRB6x7NpY=
|
||||
k8s.io/code-generator v0.23.1/go.mod h1:V7yn6VNTCWW8GqodYCESVo95fuiEg713S8B7WacWZDA=
|
||||
k8s.io/component-base v0.23.1 h1:j/BqdZUWeWKCy2v/jcgnOJAzpRYWSbGcjGVYICko8Uc=
|
||||
k8s.io/component-base v0.23.1/go.mod h1:6llmap8QtJIXGDd4uIWJhAq0Op8AtQo6bDW2RrNMTeo=
|
||||
k8s.io/component-helpers v0.23.1/go.mod h1:ZK24U+2oXnBPcas2KolLigVVN9g5zOzaHLkHiQMFGr0=
|
||||
k8s.io/controller-manager v0.23.1/go.mod h1:AFE4qIllvTh+nRwGr3SRSUt7F+xVSzXCeb0hhzYlU4k=
|
||||
k8s.io/cri-api v0.23.1/go.mod h1:REJE3PSU0h/LOV1APBrupxrEJqnoxZC8KWzkBUHwrK4=
|
||||
k8s.io/csi-translation-lib v0.23.1 h1:LPJythqUp9hTJtL8OFOLLEuPfc5HzFWuEMuMsoUe40I=
|
||||
k8s.io/csi-translation-lib v0.23.1/go.mod h1:0ZyB0cZBV4ZkqibwilEhKnxOne28rq5FDSjO+0MUVio=
|
||||
k8s.io/api v0.23.5 h1:zno3LUiMubxD/V1Zw3ijyKO3wxrhbUF1Ck+VjBvfaoA=
|
||||
k8s.io/api v0.23.5/go.mod h1:Na4XuKng8PXJ2JsploYYrivXrINeTaycCGcYgF91Xm8=
|
||||
k8s.io/apiextensions-apiserver v0.23.5 h1:5SKzdXyvIJKu+zbfPc3kCbWpbxi+O+zdmAJBm26UJqI=
|
||||
k8s.io/apiextensions-apiserver v0.23.5/go.mod h1:ntcPWNXS8ZPKN+zTXuzYMeg731CP0heCTl6gYBxLcuQ=
|
||||
k8s.io/apimachinery v0.23.5 h1:Va7dwhp8wgkUPWsEXk6XglXWU4IKYLKNlv8VkX7SDM0=
|
||||
k8s.io/apimachinery v0.23.5/go.mod h1:BEuFMMBaIbcOqVIJqNZJXGFTP4W6AycEpb5+m/97hrM=
|
||||
k8s.io/apiserver v0.23.5/go.mod h1:7wvMtGJ42VRxzgVI7jkbKvMbuCbVbgsWFT7RyXiRNTw=
|
||||
k8s.io/cli-runtime v0.23.5 h1:Z7XUpGoJZYZB2uNjQfJjMbyDKyVkoBGye62Ap0sWQHY=
|
||||
k8s.io/cli-runtime v0.23.5/go.mod h1:oY6QDF2qo9xndSq32tqcmRp2UyXssdGrLfjAVymgbx4=
|
||||
k8s.io/client-go v0.23.5 h1:zUXHmEuqx0RY4+CsnkOn5l0GU+skkRXKGJrhmE2SLd8=
|
||||
k8s.io/client-go v0.23.5/go.mod h1:flkeinTO1CirYgzMPRWxUCnV0G4Fbu2vLhYCObnt/r4=
|
||||
k8s.io/cloud-provider v0.23.5 h1:cf5Il2oV++RtlqgNesHd+tDFtOp85dG0t9KN/pmb71s=
|
||||
k8s.io/cloud-provider v0.23.5/go.mod h1:xMZFA6pIYKweqTkWCYVgRSVMAjqOvxVr3u/kmfyxvkU=
|
||||
k8s.io/cluster-bootstrap v0.23.5/go.mod h1:8/Gz6VTOMmEDDhn8U/nx0McnQR4YETAqiYXIlqR8hdQ=
|
||||
k8s.io/code-generator v0.23.5/go.mod h1:S0Q1JVA+kSzTI1oUvbKAxZY/DYbA/ZUb4Uknog12ETk=
|
||||
k8s.io/component-base v0.23.5 h1:8qgP5R6jG1BBSXmRYW+dsmitIrpk8F/fPEvgDenMCCE=
|
||||
k8s.io/component-base v0.23.5/go.mod h1:c5Nq44KZyt1aLl0IpHX82fhsn84Sb0jjzwjpcA42bY0=
|
||||
k8s.io/component-helpers v0.23.5/go.mod h1:5riXJgjTIs+ZB8xnf5M2anZ8iQuq37a0B/0BgoPQuSM=
|
||||
k8s.io/controller-manager v0.23.5/go.mod h1:n/KRlUzAtkFcZodZ/w0GlQdmErVKh7lS/wS0bbo7W4I=
|
||||
k8s.io/cri-api v0.23.5/go.mod h1:REJE3PSU0h/LOV1APBrupxrEJqnoxZC8KWzkBUHwrK4=
|
||||
k8s.io/csi-translation-lib v0.23.5 h1:QtbG9dSku/Dh0RvVsdKT+j2HtyOBu+ug6+tioB8MBNE=
|
||||
k8s.io/csi-translation-lib v0.23.5/go.mod h1:8RyFkoHAJrFU7c7MN1ZUjctm3ZhHclKm1FIHNSyGcuw=
|
||||
k8s.io/gengo v0.0.0-20200413195148-3a45101e95ac/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0=
|
||||
k8s.io/gengo v0.0.0-20201203183100-97869a43a9d9/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E=
|
||||
k8s.io/gengo v0.0.0-20201214224949-b6c5ce23f027/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E=
|
||||
|
@ -2058,34 +2058,35 @@ 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/klog/v2 v2.30.0 h1:bUO6drIvCIsvZ/XFgfxoGFQU/a4Qkh0iAlvUR7vlHJw=
|
||||
k8s.io/klog/v2 v2.30.0/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0=
|
||||
k8s.io/kube-aggregator v0.23.1/go.mod h1:1SPZXYD/je2gKxxLBkYyG3yFxSCUWI5QTyjqP2ZxRDI=
|
||||
k8s.io/kube-controller-manager v0.23.1/go.mod h1:KbZeNSFsBM5j2ddB5yXJ1nTQx2j/1/Cf7cXzG27aKZ0=
|
||||
k8s.io/kube-aggregator v0.23.5/go.mod h1:3ynYx07Co6dzjpKPgipM+1/Mt2Jcm7dY++cRlKLr5s8=
|
||||
k8s.io/kube-controller-manager v0.23.5/go.mod h1:Pkg5lIk9YG9Qjj4F7Dn0gi6/k8cEYP63oLdgrlrrtu4=
|
||||
k8s.io/kube-openapi v0.0.0-20210421082810-95288971da7e/go.mod h1:vHXdDvt9+2spS2Rx9ql3I8tycm3H9FDfdUoIuKCefvw=
|
||||
k8s.io/kube-openapi v0.0.0-20210527164424-3c818078ee3d/go.mod h1:vHXdDvt9+2spS2Rx9ql3I8tycm3H9FDfdUoIuKCefvw=
|
||||
k8s.io/kube-openapi v0.0.0-20211115234752-e816edb12b65 h1:E3J9oCLlaobFUqsjG9DfKbP2BmgwBL2p7pn0A3dG9W4=
|
||||
k8s.io/kube-openapi v0.0.0-20211115234752-e816edb12b65/go.mod h1:sX9MT8g7NVZM5lVL/j8QyCCJe8YSMW30QvGZWaCIDIk=
|
||||
k8s.io/kube-proxy v0.23.1/go.mod h1:65QJpMrjUMHfgX1q5Pl/KqVRZBMM4qLHNMo5MhKsnp0=
|
||||
k8s.io/kube-scheduler v0.23.1/go.mod h1:SFPvXnt7KlxTZILrtjH8VNwGDzXcdKKHrv4TkeZdYro=
|
||||
k8s.io/kubectl v0.23.1 h1:gmscOiV4Y4XIRIn14gQBBADoyyVrDZPbxRCTDga4RSA=
|
||||
k8s.io/kubectl v0.23.1/go.mod h1:Ui7dJKdUludF8yWAOSN7JZEkOuYixX5yF6E6NjoukKE=
|
||||
k8s.io/kubelet v0.23.1 h1:YBqEOCfSKGWbj1pofkZUpaViFKtAY6gUD8MSXek2/eI=
|
||||
k8s.io/kubelet v0.23.1/go.mod h1:WdvMiehtNPhtiW8sSVVvr8YYU00L0u+0HkfMDEB0LKM=
|
||||
k8s.io/kubernetes v1.23.1/go.mod h1:baMGbPpwwP0kT/+eAPtdqoWNRoXyyTJ2Zf+fw/Y8t04=
|
||||
k8s.io/legacy-cloud-providers v0.23.1 h1:1aoEY/PkwyE3pPk6Yk4mT00CkBZ7w573/LPxtsGiB0s=
|
||||
k8s.io/legacy-cloud-providers v0.23.1/go.mod h1:HIt+r/ReEfjS6IGaGfpZ7tCna7hbMBXMOaIp/SWABVE=
|
||||
k8s.io/metrics v0.23.1/go.mod h1:qXvsM1KANrc+ZZeFwj6Phvf0NLiC+d3RwcsLcdGc+xs=
|
||||
k8s.io/mount-utils v0.23.1 h1:g0WrG+DkQiqg8z8sCO3FL6zNpfyIp/HGA0e640IaQuY=
|
||||
k8s.io/mount-utils v0.23.1/go.mod h1:9pFhzVjxle1osJUo++9MFDat9HPkQUOoHCn+eExZ3Ew=
|
||||
k8s.io/pod-security-admission v0.23.1/go.mod h1:WDb/vFWf7jKSGe2e07LTEjDZ0MHMDhUIzXNvQ45HytU=
|
||||
k8s.io/sample-apiserver v0.23.1/go.mod h1:5ZQrkouVpN6GeNMZEJFkIpFwaxgDPJin/cIBXyDboC4=
|
||||
k8s.io/kube-proxy v0.23.5/go.mod h1:/yCbRrOHgPCb1g1k4XmMJPmNesfdPhZTGrvwNlNgwo8=
|
||||
k8s.io/kube-scheduler v0.23.5/go.mod h1:IJGf4WngeoAHLj4ms4n3Poa29ttmaxCXxIqpgU0ky7E=
|
||||
k8s.io/kubectl v0.23.5 h1:DmDULqCaF4qstj0Im143XmncvqWtJxHzK8IrW2BzlU0=
|
||||
k8s.io/kubectl v0.23.5/go.mod h1:lLgw7cVY8xbd7o637vOXPca/w6HC205KsPCRDYRCxwE=
|
||||
k8s.io/kubelet v0.23.5 h1:eCGJ7olStiyF7TYHlUTjpXg2ltw7Bs9OPZcch8HP2Go=
|
||||
k8s.io/kubelet v0.23.5/go.mod h1:M0aj0gaX+rOaGfCfqkV6P7QbwtMwqbL6RdwviHmnehU=
|
||||
k8s.io/kubernetes v1.23.5/go.mod h1:avI3LUTUYZugxwh52KMVM7v9ZjB5gYJ6D3FIoZ1SHUo=
|
||||
k8s.io/legacy-cloud-providers v0.23.5 h1:Oq0Kb/YY6qaXwdRXvlPWWtz5i6mJ62X98nuoKHfSHR8=
|
||||
k8s.io/legacy-cloud-providers v0.23.5/go.mod h1:IENlwY686f1fbakotgNf7gAQuIyCvOUIAXkPPPE/7KU=
|
||||
k8s.io/metrics v0.23.5/go.mod h1:WNAtV2a5BYbmDS8+7jSqYYV6E3efuGTpIwJ8PTD1wgs=
|
||||
k8s.io/mount-utils v0.23.5 h1:MOhJKZTpfC21r5OamKYWMdVNtTMDD9wZfTkLOhI5nuE=
|
||||
k8s.io/mount-utils v0.23.5/go.mod h1:OTN3LQPiOGMfx/SmVlsnySwsAmh4gYrDYLchlMHtf98=
|
||||
k8s.io/pod-security-admission v0.23.5/go.mod h1:aSyWfjev8Zil5DaZBZ+ICAObZmZlRqhnAZHxA9r71UI=
|
||||
k8s.io/sample-apiserver v0.23.5/go.mod h1:m4cnT3HgRY5Dt2AjMVKGnb31D6rGY0B+xpKtRJUUC8w=
|
||||
k8s.io/system-validators v1.6.0/go.mod h1:bPldcLgkIUK22ALflnsXk8pvkTEndYdNuaHH6gRrl0Q=
|
||||
k8s.io/utils v0.0.0-20201110183641-67b214c5f920/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA=
|
||||
k8s.io/utils v0.0.0-20210111153108-fddb29f9d009/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA=
|
||||
k8s.io/utils v0.0.0-20210305010621-2afb4311ab10/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA=
|
||||
k8s.io/utils v0.0.0-20210802155522-efc7438f0176/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA=
|
||||
k8s.io/utils v0.0.0-20210819203725-bdf08cb9a70a/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA=
|
||||
k8s.io/utils v0.0.0-20210930125809-cb0fa318a74b h1:wxEMGetGMur3J1xuGLQY7GEQYg9bZxKn3tKo5k/eYcs=
|
||||
k8s.io/utils v0.0.0-20210930125809-cb0fa318a74b/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA=
|
||||
k8s.io/utils v0.0.0-20211116205334-6203023598ed h1:ck1fRPWPJWsMd8ZRFsWc6mh/zHp5fZ/shhbrgPUxDAE=
|
||||
k8s.io/utils v0.0.0-20211116205334-6203023598ed/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA=
|
||||
modernc.org/cc v1.0.0/go.mod h1:1Sk4//wdnYJiUIxnW8ddKpaOJCF37yAdqYnkxUpaYxw=
|
||||
modernc.org/golex v1.0.0/go.mod h1:b/QX9oBD/LhixY6NDh+IdGv17hgB+51fET1i2kPSmvk=
|
||||
modernc.org/mathutil v1.0.0/go.mod h1:wU0vUrJsVWBZ4P6e7xtFJEhFSNsfRLJ8H458uRjg03k=
|
||||
|
@ -2100,7 +2101,7 @@ rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4=
|
|||
rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0=
|
||||
rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA=
|
||||
sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.22/go.mod h1:LEScyzhFmoF5pso/YSeBstl57mOzx9xlU9n85RGrDQg=
|
||||
sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.25/go.mod h1:Mlj9PNLmG9bZ6BHFwFKDo5afkpWyUISkb9Me0GnK66I=
|
||||
sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.30/go.mod h1:fEO7lRTdivWO2qYVCVG7dEADOMo/MLDCVr8So2g88Uw=
|
||||
sigs.k8s.io/controller-runtime v0.8.3/go.mod h1:U/l+DUopBc1ecfRZ5aviA9JDmGFQKvLf5YkZNx2e0sU=
|
||||
sigs.k8s.io/controller-runtime v0.10.1/go.mod h1:CQp8eyUQZ/Q7PJvnIrB6/hgfTC1kBkGylwsLgOQi1WY=
|
||||
sigs.k8s.io/controller-runtime v0.11.0 h1:DqO+c8mywcZLFJWILq4iktoECTyn30Bkj0CwgqMpZWQ=
|
||||
|
@ -2120,8 +2121,9 @@ sigs.k8s.io/kustomize/kyaml v0.13.0 h1:9c+ETyNfSrVhxvphs+K2dzT3dh5oVPPEqPOE/cUpS
|
|||
sigs.k8s.io/kustomize/kyaml v0.13.0/go.mod h1:FTJxEZ86ScK184NpGSAQcfEqee0nul8oLCK30D47m4E=
|
||||
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/go.mod h1:j/nl6xW8vLS49O8YvXW1ocPhZawJtm+Yrr7PPRQ0Vg4=
|
||||
sigs.k8s.io/structured-merge-diff/v4 v4.2.0 h1:kDvPBbnPk+qYmkHmSo8vKGp438IASWofnbbUKDE/bv0=
|
||||
sigs.k8s.io/structured-merge-diff/v4 v4.2.0/go.mod h1:j/nl6xW8vLS49O8YvXW1ocPhZawJtm+Yrr7PPRQ0Vg4=
|
||||
sigs.k8s.io/structured-merge-diff/v4 v4.2.1 h1:bKCqE9GvQ5tiVHn5rfn1r+yao3aLQEaLzkkmAkf+A6Y=
|
||||
sigs.k8s.io/structured-merge-diff/v4 v4.2.1/go.mod h1:j/nl6xW8vLS49O8YvXW1ocPhZawJtm+Yrr7PPRQ0Vg4=
|
||||
sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o=
|
||||
sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc=
|
||||
sigs.k8s.io/yaml v1.3.0 h1:a2VclLzOGrwOHDiV8EfBGhvjHvP46CtW5j6POvhYGGo=
|
||||
|
|
|
@ -8,8 +8,8 @@ require (
|
|||
github.com/octago/sflags v0.2.0
|
||||
github.com/spf13/pflag v1.0.5
|
||||
gopkg.in/yaml.v2 v2.4.0
|
||||
k8s.io/api v0.23.1
|
||||
k8s.io/apimachinery v0.23.1
|
||||
k8s.io/api v0.23.5
|
||||
k8s.io/apimachinery v0.23.5
|
||||
k8s.io/client-go v9.0.0+incompatible
|
||||
k8s.io/klog/v2 v2.30.0
|
||||
k8s.io/kops v0.0.0-00010101000000-000000000000
|
||||
|
@ -117,8 +117,8 @@ require (
|
|||
k8s.io/klog v1.0.0 // indirect
|
||||
k8s.io/release v0.7.1-0.20210204090829-09fb5e3883b8 // indirect
|
||||
k8s.io/test-infra v0.0.0-20200617221206-ea73eaeab7ff // indirect
|
||||
k8s.io/utils v0.0.0-20210930125809-cb0fa318a74b // indirect
|
||||
sigs.k8s.io/structured-merge-diff/v4 v4.2.0 // indirect
|
||||
k8s.io/utils v0.0.0-20211116205334-6203023598ed // indirect
|
||||
sigs.k8s.io/structured-merge-diff/v4 v4.2.1 // indirect
|
||||
)
|
||||
|
||||
replace k8s.io/kops => ../../.
|
||||
|
|
|
@ -2558,8 +2558,9 @@ k8s.io/utils v0.0.0-20210111153108-fddb29f9d009/go.mod h1:jPW/WVKK9YHAvNhRxK0md/
|
|||
k8s.io/utils v0.0.0-20210305010621-2afb4311ab10/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA=
|
||||
k8s.io/utils v0.0.0-20210802155522-efc7438f0176/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA=
|
||||
k8s.io/utils v0.0.0-20210819203725-bdf08cb9a70a/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA=
|
||||
k8s.io/utils v0.0.0-20210930125809-cb0fa318a74b h1:wxEMGetGMur3J1xuGLQY7GEQYg9bZxKn3tKo5k/eYcs=
|
||||
k8s.io/utils v0.0.0-20210930125809-cb0fa318a74b/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA=
|
||||
k8s.io/utils v0.0.0-20211116205334-6203023598ed h1:ck1fRPWPJWsMd8ZRFsWc6mh/zHp5fZ/shhbrgPUxDAE=
|
||||
k8s.io/utils v0.0.0-20211116205334-6203023598ed/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA=
|
||||
knative.dev/caching v0.0.0-20200116200605-67bca2c83dfa/go.mod h1:dHXFU6CGlLlbzaWc32g80cR92iuBSpsslDNBWI8C7eg=
|
||||
knative.dev/eventing-contrib v0.11.2/go.mod h1:SnXZgSGgMSMLNFTwTnpaOH7hXDzTFtw0J8OmHflNx3g=
|
||||
knative.dev/pkg v0.0.0-20200207155214-fef852970f43/go.mod h1:pgODObA1dTyhNoFxPZTTjNWfx6F0aKsKzn+vaT9XO/Q=
|
||||
|
@ -2606,8 +2607,9 @@ sigs.k8s.io/structured-merge-diff v0.0.0-20190525122527-15d366b2352e/go.mod h1:w
|
|||
sigs.k8s.io/structured-merge-diff/v4 v4.0.2/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw=
|
||||
sigs.k8s.io/structured-merge-diff/v4 v4.1.0/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw=
|
||||
sigs.k8s.io/structured-merge-diff/v4 v4.1.2/go.mod h1:j/nl6xW8vLS49O8YvXW1ocPhZawJtm+Yrr7PPRQ0Vg4=
|
||||
sigs.k8s.io/structured-merge-diff/v4 v4.2.0 h1:kDvPBbnPk+qYmkHmSo8vKGp438IASWofnbbUKDE/bv0=
|
||||
sigs.k8s.io/structured-merge-diff/v4 v4.2.0/go.mod h1:j/nl6xW8vLS49O8YvXW1ocPhZawJtm+Yrr7PPRQ0Vg4=
|
||||
sigs.k8s.io/structured-merge-diff/v4 v4.2.1 h1:bKCqE9GvQ5tiVHn5rfn1r+yao3aLQEaLzkkmAkf+A6Y=
|
||||
sigs.k8s.io/structured-merge-diff/v4 v4.2.1/go.mod h1:j/nl6xW8vLS49O8YvXW1ocPhZawJtm+Yrr7PPRQ0Vg4=
|
||||
sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o=
|
||||
sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc=
|
||||
sigs.k8s.io/yaml v1.3.0 h1:a2VclLzOGrwOHDiV8EfBGhvjHvP46CtW5j6POvhYGGo=
|
||||
|
|
|
@ -144,7 +144,6 @@ message PodDisruptionBudgetSpec {
|
|||
// A null selector selects no pods.
|
||||
// An empty selector ({}) also selects no pods, which differs from standard behavior of selecting all pods.
|
||||
// In policy/v1, an empty selector will select all pods in the namespace.
|
||||
// +patchStrategy=replace
|
||||
// +optional
|
||||
optional k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector selector = 2;
|
||||
|
||||
|
|
|
@ -36,9 +36,8 @@ type PodDisruptionBudgetSpec struct {
|
|||
// A null selector selects no pods.
|
||||
// An empty selector ({}) also selects no pods, which differs from standard behavior of selecting all pods.
|
||||
// In policy/v1, an empty selector will select all pods in the namespace.
|
||||
// +patchStrategy=replace
|
||||
// +optional
|
||||
Selector *metav1.LabelSelector `json:"selector,omitempty" patchStrategy:"replace" protobuf:"bytes,2,opt,name=selector"`
|
||||
Selector *metav1.LabelSelector `json:"selector,omitempty" protobuf:"bytes,2,opt,name=selector"`
|
||||
|
||||
// An eviction is allowed if at most "maxUnavailable" pods selected by
|
||||
// "selector" are unavailable after the eviction, i.e. even in absence of
|
||||
|
|
|
@ -290,5 +290,11 @@ func (in *JSONSchemaProps) DeepCopy() *JSONSchemaProps {
|
|||
**out = **in
|
||||
}
|
||||
|
||||
if in.XValidations != nil {
|
||||
in, out := &in.XValidations, &out.XValidations
|
||||
*out = make([]ValidationRule, len(*in))
|
||||
copy(*out, *in)
|
||||
}
|
||||
|
||||
return out
|
||||
}
|
||||
|
|
|
@ -18,6 +18,7 @@ package v1
|
|||
|
||||
import (
|
||||
"bytes"
|
||||
unsafe "unsafe"
|
||||
|
||||
"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions"
|
||||
apiequality "k8s.io/apimachinery/pkg/api/equality"
|
||||
|
@ -207,3 +208,8 @@ func Convert_apiextensions_CustomResourceConversion_To_v1_CustomResourceConversi
|
|||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func Convert_apiextensions_ValidationRules_To_v1_ValidationRules(in *apiextensions.ValidationRules, out *ValidationRules, s conversion.Scope) error {
|
||||
*out = *(*ValidationRules)(unsafe.Pointer(in))
|
||||
return nil
|
||||
}
|
||||
|
|
|
@ -250,5 +250,11 @@ func (in *JSONSchemaProps) DeepCopy() *JSONSchemaProps {
|
|||
**out = **in
|
||||
}
|
||||
|
||||
if in.XValidations != nil {
|
||||
in, out := &in.XValidations, &out.XValidations
|
||||
*out = make([]ValidationRule, len(*in))
|
||||
copy(*out, *in)
|
||||
}
|
||||
|
||||
return out
|
||||
}
|
||||
|
|
|
@ -242,6 +242,11 @@ func RegisterConversions(s *runtime.Scheme) error {
|
|||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := s.AddConversionFunc((*apiextensions.ValidationRules)(nil), (*ValidationRules)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||
return Convert_apiextensions_ValidationRules_To_v1_ValidationRules(a.(*apiextensions.ValidationRules), b.(*ValidationRules), scope)
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := s.AddConversionFunc((*CustomResourceConversion)(nil), (*apiextensions.CustomResourceConversion)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||
return Convert_v1_CustomResourceConversion_To_apiextensions_CustomResourceConversion(a.(*CustomResourceConversion), b.(*apiextensions.CustomResourceConversion), scope)
|
||||
}); err != nil {
|
||||
|
|
|
@ -78,6 +78,7 @@ func (p *ListPager) List(ctx context.Context, options metav1.ListOptions) (runti
|
|||
options.Limit = p.PageSize
|
||||
}
|
||||
requestedResourceVersion := options.ResourceVersion
|
||||
requestedResourceVersionMatch := options.ResourceVersionMatch
|
||||
var list *metainternalversion.List
|
||||
paginatedResult := false
|
||||
|
||||
|
@ -102,6 +103,7 @@ func (p *ListPager) List(ctx context.Context, options metav1.ListOptions) (runti
|
|||
options.Limit = 0
|
||||
options.Continue = ""
|
||||
options.ResourceVersion = requestedResourceVersion
|
||||
options.ResourceVersionMatch = requestedResourceVersionMatch
|
||||
result, err := p.PageFn(ctx, options)
|
||||
return result, paginatedResult, err
|
||||
}
|
||||
|
@ -135,10 +137,11 @@ func (p *ListPager) List(ctx context.Context, options metav1.ListOptions) (runti
|
|||
|
||||
// set the next loop up
|
||||
options.Continue = m.GetContinue()
|
||||
// Clear the ResourceVersion on the subsequent List calls to avoid the
|
||||
// Clear the ResourceVersion(Match) on the subsequent List calls to avoid the
|
||||
// `specifying resource version is not allowed when using continue` error.
|
||||
// See https://github.com/kubernetes/kubernetes/issues/85221#issuecomment-553748143.
|
||||
options.ResourceVersion = ""
|
||||
options.ResourceVersionMatch = ""
|
||||
// At this point, result is already paginated.
|
||||
paginatedResult = true
|
||||
}
|
||||
|
|
|
@ -37,8 +37,8 @@ const (
|
|||
// Parameter names defined in azure disk CSI driver, refer to
|
||||
// https://github.com/kubernetes-sigs/azuredisk-csi-driver/blob/master/docs/driver-parameters.md
|
||||
azureDiskKind = "kind"
|
||||
azureDiskCachingMode = "cachingMode"
|
||||
azureDiskFSType = "fsType"
|
||||
azureDiskCachingMode = "cachingmode"
|
||||
azureDiskFSType = "fstype"
|
||||
)
|
||||
|
||||
var (
|
||||
|
@ -107,7 +107,7 @@ func (t *azureDiskCSITranslator) TranslateInTreeInlineVolumeToCSI(volume *v1.Vol
|
|||
ObjectMeta: metav1.ObjectMeta{
|
||||
// Must be unique per disk as it is used as the unique part of the
|
||||
// staging path
|
||||
Name: fmt.Sprintf("%s-%s", AzureDiskDriverName, azureSource.DiskName),
|
||||
Name: azureSource.DataDiskURI,
|
||||
},
|
||||
Spec: v1.PersistentVolumeSpec{
|
||||
PersistentVolumeSource: v1.PersistentVolumeSource{
|
||||
|
@ -203,13 +203,19 @@ func (t *azureDiskCSITranslator) TranslateCSIPVToInTree(pv *v1.PersistentVolume)
|
|||
}
|
||||
|
||||
if csiSource.VolumeAttributes != nil {
|
||||
if cachingMode, ok := csiSource.VolumeAttributes[azureDiskCachingMode]; ok {
|
||||
mode := v1.AzureDataDiskCachingMode(cachingMode)
|
||||
azureSource.CachingMode = &mode
|
||||
}
|
||||
|
||||
if fsType, ok := csiSource.VolumeAttributes[azureDiskFSType]; ok && fsType != "" {
|
||||
azureSource.FSType = &fsType
|
||||
for k, v := range csiSource.VolumeAttributes {
|
||||
switch strings.ToLower(k) {
|
||||
case azureDiskCachingMode:
|
||||
if v != "" {
|
||||
mode := v1.AzureDataDiskCachingMode(v)
|
||||
azureSource.CachingMode = &mode
|
||||
}
|
||||
case azureDiskFSType:
|
||||
if v != "" {
|
||||
fsType := v
|
||||
azureSource.FSType = &fsType
|
||||
}
|
||||
}
|
||||
}
|
||||
azureSource.Kind = &managed
|
||||
}
|
||||
|
|
|
@ -34,7 +34,7 @@ const (
|
|||
AzureFileInTreePluginName = "kubernetes.io/azure-file"
|
||||
|
||||
separator = "#"
|
||||
volumeIDTemplate = "%s#%s#%s#%s"
|
||||
volumeIDTemplate = "%s#%s#%s#%s#%s"
|
||||
// Parameter names defined in azure file CSI driver, refer to
|
||||
// https://github.com/kubernetes-sigs/azurefile-csi-driver/blob/master/docs/driver-parameters.md
|
||||
shareNameField = "sharename"
|
||||
|
@ -81,19 +81,19 @@ func (t *azureFileCSITranslator) TranslateInTreeInlineVolumeToCSI(volume *v1.Vol
|
|||
if podNamespace != "" {
|
||||
secretNamespace = podNamespace
|
||||
}
|
||||
volumeID := fmt.Sprintf(volumeIDTemplate, "", accountName, azureSource.ShareName, volume.Name, secretNamespace)
|
||||
|
||||
var (
|
||||
pv = &v1.PersistentVolume{
|
||||
ObjectMeta: metav1.ObjectMeta{
|
||||
// Must be unique per disk as it is used as the unique part of the
|
||||
// staging path
|
||||
Name: fmt.Sprintf("%s-%s", AzureFileDriverName, azureSource.ShareName),
|
||||
// Must be unique as it is used as the unique part of the staging path
|
||||
Name: volumeID,
|
||||
},
|
||||
Spec: v1.PersistentVolumeSpec{
|
||||
PersistentVolumeSource: v1.PersistentVolumeSource{
|
||||
CSI: &v1.CSIPersistentVolumeSource{
|
||||
Driver: AzureFileDriverName,
|
||||
VolumeHandle: fmt.Sprintf(volumeIDTemplate, "", accountName, azureSource.ShareName, ""),
|
||||
VolumeHandle: volumeID,
|
||||
ReadOnly: azureSource.ReadOnly,
|
||||
VolumeAttributes: map[string]string{shareNameField: azureSource.ShareName},
|
||||
NodeStageSecretRef: &v1.SecretReference{
|
||||
|
@ -129,7 +129,12 @@ func (t *azureFileCSITranslator) TranslateInTreePVToCSI(pv *v1.PersistentVolume)
|
|||
resourceGroup = v
|
||||
}
|
||||
}
|
||||
volumeID := fmt.Sprintf(volumeIDTemplate, resourceGroup, accountName, azureSource.ShareName, "")
|
||||
namespace := defaultSecretNamespace
|
||||
if azureSource.SecretNamespace != nil {
|
||||
namespace = *azureSource.SecretNamespace
|
||||
}
|
||||
|
||||
volumeID := fmt.Sprintf(volumeIDTemplate, resourceGroup, accountName, azureSource.ShareName, pv.ObjectMeta.Name, namespace)
|
||||
|
||||
var (
|
||||
// refer to https://github.com/kubernetes-sigs/azurefile-csi-driver/blob/master/docs/driver-parameters.md
|
||||
|
@ -137,7 +142,7 @@ func (t *azureFileCSITranslator) TranslateInTreePVToCSI(pv *v1.PersistentVolume)
|
|||
Driver: AzureFileDriverName,
|
||||
NodeStageSecretRef: &v1.SecretReference{
|
||||
Name: azureSource.SecretName,
|
||||
Namespace: defaultSecretNamespace,
|
||||
Namespace: namespace,
|
||||
},
|
||||
ReadOnly: azureSource.ReadOnly,
|
||||
VolumeAttributes: map[string]string{shareNameField: azureSource.ShareName},
|
||||
|
@ -145,10 +150,6 @@ func (t *azureFileCSITranslator) TranslateInTreePVToCSI(pv *v1.PersistentVolume)
|
|||
}
|
||||
)
|
||||
|
||||
if azureSource.SecretNamespace != nil {
|
||||
csiSource.NodeStageSecretRef.Namespace = *azureSource.SecretNamespace
|
||||
}
|
||||
|
||||
pv.Spec.PersistentVolumeSource.AzureFile = nil
|
||||
pv.Spec.PersistentVolumeSource.CSI = csiSource
|
||||
|
||||
|
|
|
@ -60,9 +60,9 @@ func RunCordonOrUncordon(drainer *Helper, node *corev1.Node, desired bool) error
|
|||
err, patchErr := c.PatchOrReplaceWithContext(drainer.Ctx, drainer.Client, false)
|
||||
if err != nil {
|
||||
if patchErr != nil {
|
||||
return fmt.Errorf("cordon error: %s; merge patch error: %s", err.Error(), patchErr.Error())
|
||||
return fmt.Errorf("cordon error: %s; merge patch error: %w", err.Error(), patchErr)
|
||||
}
|
||||
return fmt.Errorf("cordon error: %s", err.Error())
|
||||
return fmt.Errorf("cordon error: %w", err)
|
||||
}
|
||||
|
||||
return nil
|
||||
|
|
|
@ -960,6 +960,13 @@ func (s *awsSdkEC2) DescribeInstances(request *ec2.DescribeInstancesInput) ([]*e
|
|||
results := []*ec2.Instance{}
|
||||
var nextToken *string
|
||||
requestTime := time.Now()
|
||||
|
||||
if request.MaxResults == nil && request.InstanceIds == nil {
|
||||
// MaxResults must be set in order for pagination to work
|
||||
// MaxResults cannot be set with InstanceIds
|
||||
request.MaxResults = aws.Int64(1000)
|
||||
}
|
||||
|
||||
for {
|
||||
response, err := s.ec2.DescribeInstances(request)
|
||||
if err != nil {
|
||||
|
|
|
@ -74,6 +74,13 @@ const (
|
|||
|
||||
// NetworkTierAnnotationPremium is an annotation to indicate the Service is on the Premium network tier
|
||||
NetworkTierAnnotationPremium = cloud.NetworkTierPremium
|
||||
|
||||
// RBSAnnotationKey is annotated on a Service object to indicate
|
||||
// opt-in mode for RBS NetLB
|
||||
RBSAnnotationKey = "cloud.google.com/l4-rbs"
|
||||
|
||||
// RBSEnabled is an annotation to indicate the Service is opt-in for RBS
|
||||
RBSEnabled = "enabled"
|
||||
)
|
||||
|
||||
// GetLoadBalancerAnnotationType returns the type of GCP load balancer which should be assembled.
|
||||
|
|
|
@ -31,6 +31,7 @@ import (
|
|||
"k8s.io/apimachinery/pkg/types"
|
||||
utilerrors "k8s.io/apimachinery/pkg/util/errors"
|
||||
"k8s.io/apimachinery/pkg/util/sets"
|
||||
cloudprovider "k8s.io/cloud-provider"
|
||||
servicehelpers "k8s.io/cloud-provider/service/helpers"
|
||||
utilnet "k8s.io/utils/net"
|
||||
|
||||
|
@ -40,6 +41,8 @@ import (
|
|||
|
||||
const (
|
||||
errStrLbNoHosts = "cannot EnsureLoadBalancer() with no hosts"
|
||||
|
||||
ELBRbsFinalizer = "gke.networking.io/l4-netlb-v2"
|
||||
)
|
||||
|
||||
// ensureExternalLoadBalancer is the external implementation of LoadBalancer.EnsureLoadBalancer.
|
||||
|
@ -51,6 +54,19 @@ const (
|
|||
// new load balancers and updating existing load balancers, recognizing when
|
||||
// each is needed.
|
||||
func (g *Cloud) ensureExternalLoadBalancer(clusterName string, clusterID string, apiService *v1.Service, existingFwdRule *compute.ForwardingRule, nodes []*v1.Node) (*v1.LoadBalancerStatus, error) {
|
||||
// Skip service handling if managed by ingress-gce using Regional Backend Services
|
||||
if val, ok := apiService.Annotations[RBSAnnotationKey]; ok && val == RBSEnabled {
|
||||
return nil, cloudprovider.ImplementedElsewhere
|
||||
}
|
||||
// Skip service handling if service has Regional Backend Services finalizer
|
||||
if hasFinalizer(apiService, ELBRbsFinalizer) {
|
||||
return nil, cloudprovider.ImplementedElsewhere
|
||||
}
|
||||
// Skip service handling if it has Regional Backend Service created by Ingress-GCE
|
||||
if existingFwdRule != nil && existingFwdRule.BackendService != "" {
|
||||
return nil, cloudprovider.ImplementedElsewhere
|
||||
}
|
||||
|
||||
if len(nodes) == 0 {
|
||||
return nil, fmt.Errorf(errStrLbNoHosts)
|
||||
}
|
||||
|
|
|
@ -135,17 +135,3 @@ func removePathIfNotMountPoint(mountPath string, mounter Interface, extensiveMou
|
|||
}
|
||||
return notMnt, nil
|
||||
}
|
||||
|
||||
// PathExists returns true if the specified path exists.
|
||||
// TODO: clean this up to use pkg/util/file/FileExists
|
||||
func PathExists(path string) (bool, error) {
|
||||
_, err := os.Stat(path)
|
||||
if err == nil {
|
||||
return true, nil
|
||||
} else if os.IsNotExist(err) {
|
||||
return false, nil
|
||||
} else if IsCorruptedMnt(err) {
|
||||
return true, err
|
||||
}
|
||||
return false, err
|
||||
}
|
||||
|
|
|
@ -20,12 +20,15 @@ limitations under the License.
|
|||
package mount
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"io/fs"
|
||||
"os"
|
||||
"strconv"
|
||||
"strings"
|
||||
"syscall"
|
||||
|
||||
"k8s.io/klog/v2"
|
||||
utilio "k8s.io/utils/io"
|
||||
)
|
||||
|
||||
|
@ -51,6 +54,8 @@ func IsCorruptedMnt(err error) bool {
|
|||
underlyingError = pe.Err
|
||||
case *os.SyscallError:
|
||||
underlyingError = pe.Err
|
||||
case syscall.Errno:
|
||||
underlyingError = err
|
||||
}
|
||||
|
||||
return underlyingError == syscall.ENOTCONN || underlyingError == syscall.ESTALE || underlyingError == syscall.EIO || underlyingError == syscall.EACCES || underlyingError == syscall.EHOSTDOWN
|
||||
|
@ -157,3 +162,26 @@ func isMountPointMatch(mp MountPoint, dir string) bool {
|
|||
deletedDir := fmt.Sprintf("%s\\040(deleted)", dir)
|
||||
return ((mp.Path == dir) || (mp.Path == deletedDir))
|
||||
}
|
||||
|
||||
// PathExists returns true if the specified path exists.
|
||||
// TODO: clean this up to use pkg/util/file/FileExists
|
||||
func PathExists(path string) (bool, error) {
|
||||
_, err := os.Stat(path)
|
||||
if err == nil {
|
||||
return true, nil
|
||||
} else if errors.Is(err, fs.ErrNotExist) {
|
||||
err = syscall.Access(path, syscall.F_OK)
|
||||
if err == nil {
|
||||
// The access syscall says the file exists, the stat syscall says it
|
||||
// doesn't. This was observed on CIFS when the path was removed at
|
||||
// the server somehow. POSIX calls this a stale file handle, let's fake
|
||||
// that error and treat the path as existing but corrupted.
|
||||
klog.Warningf("Potential stale file handle detected: %s", path)
|
||||
return true, syscall.ESTALE
|
||||
}
|
||||
return false, nil
|
||||
} else if IsCorruptedMnt(err) {
|
||||
return true, err
|
||||
}
|
||||
return false, err
|
||||
}
|
||||
|
|
|
@ -95,3 +95,17 @@ func ValidateDiskNumber(disk string) error {
|
|||
func isMountPointMatch(mp MountPoint, dir string) bool {
|
||||
return mp.Path == dir
|
||||
}
|
||||
|
||||
// PathExists returns true if the specified path exists.
|
||||
// TODO: clean this up to use pkg/util/file/FileExists
|
||||
func PathExists(path string) (bool, error) {
|
||||
_, err := os.Stat(path)
|
||||
if err == nil {
|
||||
return true, nil
|
||||
} else if os.IsNotExist(err) {
|
||||
return false, nil
|
||||
} else if IsCorruptedMnt(err) {
|
||||
return true, err
|
||||
}
|
||||
return false, err
|
||||
}
|
||||
|
|
|
@ -1047,7 +1047,7 @@ helm.sh/helm/v3/pkg/helmpath
|
|||
helm.sh/helm/v3/pkg/helmpath/xdg
|
||||
helm.sh/helm/v3/pkg/plugin
|
||||
helm.sh/helm/v3/pkg/strvals
|
||||
# k8s.io/api v0.23.1 => k8s.io/api v0.23.1
|
||||
# k8s.io/api v0.23.5 => k8s.io/api v0.23.5
|
||||
## explicit; go 1.16
|
||||
k8s.io/api/admission/v1
|
||||
k8s.io/api/admission/v1beta1
|
||||
|
@ -1097,11 +1097,11 @@ k8s.io/api/scheduling/v1beta1
|
|||
k8s.io/api/storage/v1
|
||||
k8s.io/api/storage/v1alpha1
|
||||
k8s.io/api/storage/v1beta1
|
||||
# k8s.io/apiextensions-apiserver v0.23.1 => k8s.io/apiextensions-apiserver v0.23.1
|
||||
# k8s.io/apiextensions-apiserver v0.23.5 => k8s.io/apiextensions-apiserver v0.23.5
|
||||
## explicit; go 1.16
|
||||
k8s.io/apiextensions-apiserver/pkg/apis/apiextensions
|
||||
k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1
|
||||
# k8s.io/apimachinery v0.23.1 => k8s.io/apimachinery v0.23.1
|
||||
# k8s.io/apimachinery v0.23.5 => k8s.io/apimachinery v0.23.5
|
||||
## explicit; go 1.16
|
||||
k8s.io/apimachinery/pkg/api/equality
|
||||
k8s.io/apimachinery/pkg/api/errors
|
||||
|
@ -1158,12 +1158,12 @@ k8s.io/apimachinery/pkg/watch
|
|||
k8s.io/apimachinery/third_party/forked/golang/json
|
||||
k8s.io/apimachinery/third_party/forked/golang/netutil
|
||||
k8s.io/apimachinery/third_party/forked/golang/reflect
|
||||
# k8s.io/cli-runtime v0.23.1 => k8s.io/cli-runtime v0.23.1
|
||||
# k8s.io/cli-runtime v0.23.5 => k8s.io/cli-runtime v0.23.5
|
||||
## explicit; go 1.16
|
||||
k8s.io/cli-runtime/pkg/genericclioptions
|
||||
k8s.io/cli-runtime/pkg/printers
|
||||
k8s.io/cli-runtime/pkg/resource
|
||||
# k8s.io/client-go v0.23.1 => k8s.io/client-go v0.23.1
|
||||
# k8s.io/client-go v0.23.5 => k8s.io/client-go v0.23.5
|
||||
## explicit; go 1.16
|
||||
k8s.io/client-go/applyconfigurations/admissionregistration/v1
|
||||
k8s.io/client-go/applyconfigurations/admissionregistration/v1beta1
|
||||
|
@ -1460,7 +1460,7 @@ k8s.io/client-go/util/jsonpath
|
|||
k8s.io/client-go/util/keyutil
|
||||
k8s.io/client-go/util/retry
|
||||
k8s.io/client-go/util/workqueue
|
||||
# k8s.io/cloud-provider v0.23.1 => k8s.io/cloud-provider v0.23.1
|
||||
# k8s.io/cloud-provider v0.23.5 => k8s.io/cloud-provider v0.23.5
|
||||
## explicit; go 1.16
|
||||
k8s.io/cloud-provider
|
||||
k8s.io/cloud-provider/node/helpers
|
||||
|
@ -1468,7 +1468,7 @@ k8s.io/cloud-provider/service/helpers
|
|||
k8s.io/cloud-provider/volume
|
||||
k8s.io/cloud-provider/volume/errors
|
||||
k8s.io/cloud-provider/volume/helpers
|
||||
# k8s.io/component-base v0.23.1 => k8s.io/component-base v0.23.1
|
||||
# k8s.io/component-base v0.23.5 => k8s.io/component-base v0.23.5
|
||||
## explicit; go 1.16
|
||||
k8s.io/component-base/config
|
||||
k8s.io/component-base/config/v1alpha1
|
||||
|
@ -1476,7 +1476,7 @@ k8s.io/component-base/metrics
|
|||
k8s.io/component-base/metrics/legacyregistry
|
||||
k8s.io/component-base/metrics/prometheus/restclient
|
||||
k8s.io/component-base/version
|
||||
# k8s.io/csi-translation-lib v0.23.1 => k8s.io/csi-translation-lib v0.23.1
|
||||
# k8s.io/csi-translation-lib v0.23.5 => k8s.io/csi-translation-lib v0.23.5
|
||||
## explicit; go 1.16
|
||||
k8s.io/csi-translation-lib/plugins
|
||||
# k8s.io/gengo v0.0.0-20210813121822-485abfe95c7c
|
||||
|
@ -1499,7 +1499,7 @@ k8s.io/kube-openapi/pkg/schemaconv
|
|||
k8s.io/kube-openapi/pkg/util/proto
|
||||
k8s.io/kube-openapi/pkg/util/proto/validation
|
||||
k8s.io/kube-openapi/pkg/validation/spec
|
||||
# k8s.io/kubectl v0.23.1 => k8s.io/kubectl v0.23.1
|
||||
# k8s.io/kubectl v0.23.5 => k8s.io/kubectl v0.23.5
|
||||
## explicit; go 1.16
|
||||
k8s.io/kubectl/pkg/cmd/apiresources
|
||||
k8s.io/kubectl/pkg/cmd/get
|
||||
|
@ -1517,17 +1517,17 @@ k8s.io/kubectl/pkg/util/openapi/validation
|
|||
k8s.io/kubectl/pkg/util/templates
|
||||
k8s.io/kubectl/pkg/util/term
|
||||
k8s.io/kubectl/pkg/validation
|
||||
# k8s.io/kubelet v0.23.1 => k8s.io/kubelet v0.23.1
|
||||
# k8s.io/kubelet v0.23.5 => k8s.io/kubelet v0.23.5
|
||||
## explicit; go 1.16
|
||||
k8s.io/kubelet/config/v1beta1
|
||||
# k8s.io/legacy-cloud-providers v0.23.1 => k8s.io/legacy-cloud-providers v0.23.1
|
||||
# k8s.io/legacy-cloud-providers v0.23.5 => k8s.io/legacy-cloud-providers v0.23.5
|
||||
## explicit; go 1.16
|
||||
k8s.io/legacy-cloud-providers/aws
|
||||
k8s.io/legacy-cloud-providers/gce
|
||||
# k8s.io/mount-utils v0.23.1 => k8s.io/mount-utils v0.23.1
|
||||
# k8s.io/mount-utils v0.23.5 => k8s.io/mount-utils v0.23.5
|
||||
## explicit; go 1.16
|
||||
k8s.io/mount-utils
|
||||
# k8s.io/utils v0.0.0-20210930125809-cb0fa318a74b
|
||||
# k8s.io/utils v0.0.0-20211116205334-6203023598ed
|
||||
## explicit; go 1.12
|
||||
k8s.io/utils/buffer
|
||||
k8s.io/utils/clock
|
||||
|
@ -1676,7 +1676,7 @@ sigs.k8s.io/kustomize/kyaml/yaml/merge2
|
|||
sigs.k8s.io/kustomize/kyaml/yaml/merge3
|
||||
sigs.k8s.io/kustomize/kyaml/yaml/schema
|
||||
sigs.k8s.io/kustomize/kyaml/yaml/walk
|
||||
# sigs.k8s.io/structured-merge-diff/v4 v4.2.0
|
||||
# sigs.k8s.io/structured-merge-diff/v4 v4.2.1
|
||||
## explicit; go 1.13
|
||||
sigs.k8s.io/structured-merge-diff/v4/fieldpath
|
||||
sigs.k8s.io/structured-merge-diff/v4/schema
|
||||
|
@ -1686,29 +1686,29 @@ sigs.k8s.io/structured-merge-diff/v4/value
|
|||
## explicit; go 1.12
|
||||
sigs.k8s.io/yaml
|
||||
# github.com/satori/go.uuid => github.com/satori/go.uuid v1.2.1-0.20181028125025-b2ce2384e17b
|
||||
# k8s.io/api => k8s.io/api v0.23.1
|
||||
# k8s.io/apiextensions-apiserver => k8s.io/apiextensions-apiserver v0.23.1
|
||||
# k8s.io/apimachinery => k8s.io/apimachinery v0.23.1
|
||||
# k8s.io/apiserver => k8s.io/apiserver v0.23.1
|
||||
# k8s.io/cli-runtime => k8s.io/cli-runtime v0.23.1
|
||||
# k8s.io/client-go => k8s.io/client-go v0.23.1
|
||||
# k8s.io/cloud-provider => k8s.io/cloud-provider v0.23.1
|
||||
# k8s.io/cluster-bootstrap => k8s.io/cluster-bootstrap v0.23.1
|
||||
# k8s.io/code-generator => k8s.io/code-generator v0.23.1
|
||||
# k8s.io/component-base => k8s.io/component-base v0.23.1
|
||||
# k8s.io/component-helpers => k8s.io/component-helpers v0.23.1
|
||||
# k8s.io/controller-manager => k8s.io/controller-manager v0.23.1
|
||||
# k8s.io/cri-api => k8s.io/cri-api v0.23.1
|
||||
# k8s.io/csi-translation-lib => k8s.io/csi-translation-lib v0.23.1
|
||||
# k8s.io/kube-aggregator => k8s.io/kube-aggregator v0.23.1
|
||||
# k8s.io/kube-controller-manager => k8s.io/kube-controller-manager v0.23.1
|
||||
# k8s.io/kube-proxy => k8s.io/kube-proxy v0.23.1
|
||||
# k8s.io/kube-scheduler => k8s.io/kube-scheduler v0.23.1
|
||||
# k8s.io/kubectl => k8s.io/kubectl v0.23.1
|
||||
# k8s.io/kubelet => k8s.io/kubelet v0.23.1
|
||||
# k8s.io/kubernetes => k8s.io/kubernetes v1.23.1
|
||||
# k8s.io/legacy-cloud-providers => k8s.io/legacy-cloud-providers v0.23.1
|
||||
# k8s.io/metrics => k8s.io/metrics v0.23.1
|
||||
# k8s.io/mount-utils => k8s.io/mount-utils v0.23.1
|
||||
# k8s.io/pod-security-admission => k8s.io/pod-security-admission v0.23.1
|
||||
# k8s.io/sample-apiserver => k8s.io/sample-apiserver v0.23.1
|
||||
# k8s.io/api => k8s.io/api v0.23.5
|
||||
# k8s.io/apiextensions-apiserver => k8s.io/apiextensions-apiserver v0.23.5
|
||||
# k8s.io/apimachinery => k8s.io/apimachinery v0.23.5
|
||||
# k8s.io/apiserver => k8s.io/apiserver v0.23.5
|
||||
# k8s.io/cli-runtime => k8s.io/cli-runtime v0.23.5
|
||||
# k8s.io/client-go => k8s.io/client-go v0.23.5
|
||||
# k8s.io/cloud-provider => k8s.io/cloud-provider v0.23.5
|
||||
# k8s.io/cluster-bootstrap => k8s.io/cluster-bootstrap v0.23.5
|
||||
# k8s.io/code-generator => k8s.io/code-generator v0.23.5
|
||||
# k8s.io/component-base => k8s.io/component-base v0.23.5
|
||||
# k8s.io/component-helpers => k8s.io/component-helpers v0.23.5
|
||||
# k8s.io/controller-manager => k8s.io/controller-manager v0.23.5
|
||||
# k8s.io/cri-api => k8s.io/cri-api v0.23.5
|
||||
# k8s.io/csi-translation-lib => k8s.io/csi-translation-lib v0.23.5
|
||||
# k8s.io/kube-aggregator => k8s.io/kube-aggregator v0.23.5
|
||||
# k8s.io/kube-controller-manager => k8s.io/kube-controller-manager v0.23.5
|
||||
# k8s.io/kube-proxy => k8s.io/kube-proxy v0.23.5
|
||||
# k8s.io/kube-scheduler => k8s.io/kube-scheduler v0.23.5
|
||||
# k8s.io/kubectl => k8s.io/kubectl v0.23.5
|
||||
# k8s.io/kubelet => k8s.io/kubelet v0.23.5
|
||||
# k8s.io/kubernetes => k8s.io/kubernetes v1.23.5
|
||||
# k8s.io/legacy-cloud-providers => k8s.io/legacy-cloud-providers v0.23.5
|
||||
# k8s.io/metrics => k8s.io/metrics v0.23.5
|
||||
# k8s.io/mount-utils => k8s.io/mount-utils v0.23.5
|
||||
# k8s.io/pod-security-admission => k8s.io/pod-security-admission v0.23.5
|
||||
# k8s.io/sample-apiserver => k8s.io/sample-apiserver v0.23.5
|
||||
|
|
|
@ -17,8 +17,6 @@ limitations under the License.
|
|||
package typed
|
||||
|
||||
import (
|
||||
"math"
|
||||
|
||||
"sigs.k8s.io/structured-merge-diff/v4/fieldpath"
|
||||
"sigs.k8s.io/structured-merge-diff/v4/schema"
|
||||
"sigs.k8s.io/structured-merge-diff/v4/value"
|
||||
|
@ -170,74 +168,94 @@ func (w *mergingWalker) visitListItems(t *schema.List, lhs, rhs value.List) (err
|
|||
if lhs != nil {
|
||||
lLen = lhs.Length()
|
||||
}
|
||||
out := make([]interface{}, 0, int(math.Max(float64(rLen), float64(lLen))))
|
||||
outLen := lLen
|
||||
if outLen < rLen {
|
||||
outLen = rLen
|
||||
}
|
||||
out := make([]interface{}, 0, outLen)
|
||||
|
||||
lhsOrder := make([]fieldpath.PathElement, 0, lLen)
|
||||
rhsOrder, observedRHS, rhsErrs := w.indexListPathElements(t, rhs)
|
||||
errs = append(errs, rhsErrs...)
|
||||
lhsOrder, observedLHS, lhsErrs := w.indexListPathElements(t, lhs)
|
||||
errs = append(errs, lhsErrs...)
|
||||
|
||||
// First, collect all LHS children.
|
||||
observedLHS := fieldpath.MakePathElementValueMap(lLen)
|
||||
if lhs != nil {
|
||||
for i := 0; i < lhs.Length(); i++ {
|
||||
child := lhs.At(i)
|
||||
pe, err := listItemToPathElement(w.allocator, w.schema, t, i, child)
|
||||
if err != nil {
|
||||
errs = append(errs, errorf("lhs: element %v: %v", i, err.Error())...)
|
||||
// If we can't construct the path element, we can't
|
||||
// even report errors deeper in the schema, so bail on
|
||||
// this element.
|
||||
continue
|
||||
}
|
||||
if _, ok := observedLHS.Get(pe); ok {
|
||||
errs = append(errs, errorf("lhs: duplicate entries for key %v", pe.String())...)
|
||||
}
|
||||
observedLHS.Insert(pe, child)
|
||||
lhsOrder = append(lhsOrder, pe)
|
||||
sharedOrder := make([]*fieldpath.PathElement, 0, rLen)
|
||||
for i := range rhsOrder {
|
||||
pe := &rhsOrder[i]
|
||||
if _, ok := observedLHS.Get(*pe); ok {
|
||||
sharedOrder = append(sharedOrder, pe)
|
||||
}
|
||||
}
|
||||
|
||||
// Then merge with RHS children.
|
||||
observedRHS := fieldpath.MakePathElementSet(rLen)
|
||||
if rhs != nil {
|
||||
for i := 0; i < rhs.Length(); i++ {
|
||||
child := rhs.At(i)
|
||||
pe, err := listItemToPathElement(w.allocator, w.schema, t, i, child)
|
||||
if err != nil {
|
||||
errs = append(errs, errorf("rhs: element %v: %v", i, err.Error())...)
|
||||
// If we can't construct the path element, we can't
|
||||
// even report errors deeper in the schema, so bail on
|
||||
// this element.
|
||||
continue
|
||||
}
|
||||
if observedRHS.Has(pe) {
|
||||
errs = append(errs, errorf("rhs: duplicate entries for key %v", pe.String())...)
|
||||
continue
|
||||
}
|
||||
observedRHS.Insert(pe)
|
||||
w2 := w.prepareDescent(pe, t.ElementType)
|
||||
w2.rhs = child
|
||||
if lchild, ok := observedLHS.Get(pe); ok {
|
||||
w2.lhs = lchild
|
||||
}
|
||||
errs = append(errs, w2.merge(pe.String)...)
|
||||
if w2.out != nil {
|
||||
out = append(out, *w2.out)
|
||||
}
|
||||
w.finishDescent(w2)
|
||||
}
|
||||
var nextShared *fieldpath.PathElement
|
||||
if len(sharedOrder) > 0 {
|
||||
nextShared = sharedOrder[0]
|
||||
sharedOrder = sharedOrder[1:]
|
||||
}
|
||||
|
||||
for _, pe := range lhsOrder {
|
||||
if observedRHS.Has(pe) {
|
||||
continue
|
||||
lLen, rLen = len(lhsOrder), len(rhsOrder)
|
||||
for lI, rI := 0, 0; lI < lLen || rI < rLen; {
|
||||
if lI < lLen && rI < rLen {
|
||||
pe := lhsOrder[lI]
|
||||
if pe.Equals(rhsOrder[rI]) {
|
||||
// merge LHS & RHS items
|
||||
lChild, _ := observedLHS.Get(pe)
|
||||
rChild, _ := observedRHS.Get(pe)
|
||||
mergeOut, errs := w.mergeListItem(t, pe, lChild, rChild)
|
||||
errs = append(errs, errs...)
|
||||
if mergeOut != nil {
|
||||
out = append(out, *mergeOut)
|
||||
}
|
||||
lI++
|
||||
rI++
|
||||
|
||||
nextShared = nil
|
||||
if len(sharedOrder) > 0 {
|
||||
nextShared = sharedOrder[0]
|
||||
sharedOrder = sharedOrder[1:]
|
||||
}
|
||||
continue
|
||||
}
|
||||
if _, ok := observedRHS.Get(pe); ok && nextShared != nil && !nextShared.Equals(lhsOrder[lI]) {
|
||||
// shared item, but not the one we want in this round
|
||||
lI++
|
||||
continue
|
||||
}
|
||||
}
|
||||
value, _ := observedLHS.Get(pe)
|
||||
w2 := w.prepareDescent(pe, t.ElementType)
|
||||
w2.lhs = value
|
||||
errs = append(errs, w2.merge(pe.String)...)
|
||||
if w2.out != nil {
|
||||
out = append(out, *w2.out)
|
||||
if lI < lLen {
|
||||
pe := lhsOrder[lI]
|
||||
if _, ok := observedRHS.Get(pe); !ok {
|
||||
// take LHS item
|
||||
lChild, _ := observedLHS.Get(pe)
|
||||
mergeOut, errs := w.mergeListItem(t, pe, lChild, nil)
|
||||
errs = append(errs, errs...)
|
||||
if mergeOut != nil {
|
||||
out = append(out, *mergeOut)
|
||||
}
|
||||
lI++
|
||||
continue
|
||||
}
|
||||
}
|
||||
if rI < rLen {
|
||||
// Take the RHS item, merge with matching LHS item if possible
|
||||
pe := rhsOrder[rI]
|
||||
lChild, _ := observedLHS.Get(pe) // may be nil
|
||||
rChild, _ := observedRHS.Get(pe)
|
||||
mergeOut, errs := w.mergeListItem(t, pe, lChild, rChild)
|
||||
errs = append(errs, errs...)
|
||||
if mergeOut != nil {
|
||||
out = append(out, *mergeOut)
|
||||
}
|
||||
rI++
|
||||
// Advance nextShared, if we are merging nextShared.
|
||||
if nextShared != nil && nextShared.Equals(pe) {
|
||||
nextShared = nil
|
||||
if len(sharedOrder) > 0 {
|
||||
nextShared = sharedOrder[0]
|
||||
sharedOrder = sharedOrder[1:]
|
||||
}
|
||||
}
|
||||
}
|
||||
w.finishDescent(w2)
|
||||
}
|
||||
|
||||
if len(out) > 0 {
|
||||
|
@ -248,6 +266,46 @@ func (w *mergingWalker) visitListItems(t *schema.List, lhs, rhs value.List) (err
|
|||
return errs
|
||||
}
|
||||
|
||||
func (w *mergingWalker) indexListPathElements(t *schema.List, list value.List) ([]fieldpath.PathElement, fieldpath.PathElementValueMap, ValidationErrors) {
|
||||
var errs ValidationErrors
|
||||
length := 0
|
||||
if list != nil {
|
||||
length = list.Length()
|
||||
}
|
||||
observed := fieldpath.MakePathElementValueMap(length)
|
||||
pes := make([]fieldpath.PathElement, 0, length)
|
||||
for i := 0; i < length; i++ {
|
||||
child := list.At(i)
|
||||
pe, err := listItemToPathElement(w.allocator, w.schema, t, i, child)
|
||||
if err != nil {
|
||||
errs = append(errs, errorf("element %v: %v", i, err.Error())...)
|
||||
// If we can't construct the path element, we can't
|
||||
// even report errors deeper in the schema, so bail on
|
||||
// this element.
|
||||
continue
|
||||
}
|
||||
if _, found := observed.Get(pe); found {
|
||||
errs = append(errs, errorf("duplicate entries for key %v", pe.String())...)
|
||||
continue
|
||||
}
|
||||
observed.Insert(pe, child)
|
||||
pes = append(pes, pe)
|
||||
}
|
||||
return pes, observed, errs
|
||||
}
|
||||
|
||||
func (w *mergingWalker) mergeListItem(t *schema.List, pe fieldpath.PathElement, lChild, rChild value.Value) (out *interface{}, errs ValidationErrors) {
|
||||
w2 := w.prepareDescent(pe, t.ElementType)
|
||||
w2.lhs = lChild
|
||||
w2.rhs = rChild
|
||||
errs = append(errs, w2.merge(pe.String)...)
|
||||
if w2.out != nil {
|
||||
out = w2.out
|
||||
}
|
||||
w.finishDescent(w2)
|
||||
return
|
||||
}
|
||||
|
||||
func (w *mergingWalker) derefList(prefix string, v value.Value) (value.List, ValidationErrors) {
|
||||
if v == nil {
|
||||
return nil, nil
|
||||
|
|
Loading…
Reference in New Issue