Vendor Update to K8s v1.25.0-alpha.0

This commit is contained in:
Jayant Jain 2022-05-05 12:54:55 +00:00
parent 8edd866786
commit 3f2aff4495
101 changed files with 1673 additions and 5434 deletions

View File

@ -14,6 +14,7 @@ require (
github.com/aws/aws-sdk-go v1.38.49
github.com/digitalocean/godo v1.27.0
github.com/ghodss/yaml v1.0.0
github.com/gofrs/uuid v4.0.0+incompatible
github.com/golang/mock v1.6.0
github.com/google/go-querystring v1.0.0
github.com/google/uuid v1.1.2
@ -31,16 +32,16 @@ require (
google.golang.org/protobuf v1.27.1
gopkg.in/gcfg.v1 v1.2.0
gopkg.in/yaml.v2 v2.4.0
k8s.io/api v0.24.0-beta.0
k8s.io/apimachinery v0.24.0-beta.0
k8s.io/apiserver v0.24.0-beta.0
k8s.io/client-go v0.24.0-beta.0
k8s.io/cloud-provider v0.24.0-beta.0
k8s.io/component-base v0.24.0-beta.0
k8s.io/component-helpers v0.24.0-beta.0
k8s.io/api v0.25.0-alpha.0
k8s.io/apimachinery v0.25.0-alpha.0
k8s.io/apiserver v0.25.0-alpha.0
k8s.io/client-go v0.25.0-alpha.0
k8s.io/cloud-provider v0.25.0-alpha.0
k8s.io/component-base v0.25.0-alpha.0
k8s.io/component-helpers v0.25.0-alpha.0
k8s.io/klog/v2 v2.60.1
k8s.io/kubelet v0.23.0
k8s.io/kubernetes v1.24.0-beta.0
k8s.io/kubernetes v1.25.0-alpha.0
k8s.io/legacy-cloud-providers v0.0.0
k8s.io/utils v0.0.0-20220210201930-3a6ce19ff2f9
sigs.k8s.io/cloud-provider-azure v1.23.2
@ -52,56 +53,56 @@ replace github.com/digitalocean/godo => github.com/digitalocean/godo v1.27.0
replace github.com/rancher/go-rancher => github.com/rancher/go-rancher v0.1.0
replace k8s.io/api => k8s.io/api v0.24.0-beta.0
replace k8s.io/api => k8s.io/api v0.25.0-alpha.0
replace k8s.io/apiextensions-apiserver => k8s.io/apiextensions-apiserver v0.24.0-beta.0
replace k8s.io/apiextensions-apiserver => k8s.io/apiextensions-apiserver v0.25.0-alpha.0
replace k8s.io/apimachinery => k8s.io/apimachinery v0.24.0-beta.0
replace k8s.io/apimachinery => k8s.io/apimachinery v0.25.0-alpha.0
replace k8s.io/apiserver => k8s.io/apiserver v0.24.0-beta.0
replace k8s.io/apiserver => k8s.io/apiserver v0.25.0-alpha.0
replace k8s.io/cli-runtime => k8s.io/cli-runtime v0.24.0-beta.0
replace k8s.io/cli-runtime => k8s.io/cli-runtime v0.25.0-alpha.0
replace k8s.io/client-go => k8s.io/client-go v0.24.0-beta.0
replace k8s.io/client-go => k8s.io/client-go v0.25.0-alpha.0
replace k8s.io/cloud-provider => k8s.io/cloud-provider v0.24.0-beta.0
replace k8s.io/cloud-provider => k8s.io/cloud-provider v0.25.0-alpha.0
replace k8s.io/cluster-bootstrap => k8s.io/cluster-bootstrap v0.24.0-beta.0
replace k8s.io/cluster-bootstrap => k8s.io/cluster-bootstrap v0.25.0-alpha.0
replace k8s.io/code-generator => k8s.io/code-generator v0.24.0-beta.0
replace k8s.io/code-generator => k8s.io/code-generator v0.25.0-alpha.0
replace k8s.io/component-base => k8s.io/component-base v0.24.0-beta.0
replace k8s.io/component-base => k8s.io/component-base v0.25.0-alpha.0
replace k8s.io/component-helpers => k8s.io/component-helpers v0.24.0-beta.0
replace k8s.io/component-helpers => k8s.io/component-helpers v0.25.0-alpha.0
replace k8s.io/controller-manager => k8s.io/controller-manager v0.24.0-beta.0
replace k8s.io/controller-manager => k8s.io/controller-manager v0.25.0-alpha.0
replace k8s.io/cri-api => k8s.io/cri-api v0.24.0-beta.0
replace k8s.io/cri-api => k8s.io/cri-api v0.25.0-alpha.0
replace k8s.io/csi-translation-lib => k8s.io/csi-translation-lib v0.24.0-beta.0
replace k8s.io/csi-translation-lib => k8s.io/csi-translation-lib v0.25.0-alpha.0
replace k8s.io/kube-aggregator => k8s.io/kube-aggregator v0.24.0-beta.0
replace k8s.io/kube-aggregator => k8s.io/kube-aggregator v0.25.0-alpha.0
replace k8s.io/kube-controller-manager => k8s.io/kube-controller-manager v0.24.0-beta.0
replace k8s.io/kube-controller-manager => k8s.io/kube-controller-manager v0.25.0-alpha.0
replace k8s.io/kube-proxy => k8s.io/kube-proxy v0.24.0-beta.0
replace k8s.io/kube-proxy => k8s.io/kube-proxy v0.25.0-alpha.0
replace k8s.io/kube-scheduler => k8s.io/kube-scheduler v0.24.0-beta.0
replace k8s.io/kube-scheduler => k8s.io/kube-scheduler v0.25.0-alpha.0
replace k8s.io/kubectl => k8s.io/kubectl v0.24.0-beta.0
replace k8s.io/kubectl => k8s.io/kubectl v0.25.0-alpha.0
replace k8s.io/kubelet => k8s.io/kubelet v0.24.0-beta.0
replace k8s.io/kubelet => k8s.io/kubelet v0.25.0-alpha.0
replace k8s.io/legacy-cloud-providers => k8s.io/legacy-cloud-providers v0.24.0-beta.0
replace k8s.io/legacy-cloud-providers => k8s.io/legacy-cloud-providers v0.25.0-alpha.0
replace k8s.io/metrics => k8s.io/metrics v0.24.0-beta.0
replace k8s.io/metrics => k8s.io/metrics v0.25.0-alpha.0
replace k8s.io/mount-utils => k8s.io/mount-utils v0.24.0-beta.0
replace k8s.io/mount-utils => k8s.io/mount-utils v0.25.0-alpha.0
replace k8s.io/sample-apiserver => k8s.io/sample-apiserver v0.24.0-beta.0
replace k8s.io/sample-apiserver => k8s.io/sample-apiserver v0.25.0-alpha.0
replace k8s.io/sample-cli-plugin => k8s.io/sample-cli-plugin v0.24.0-beta.0
replace k8s.io/sample-cli-plugin => k8s.io/sample-cli-plugin v0.25.0-alpha.0
replace k8s.io/sample-controller => k8s.io/sample-controller v0.24.0-beta.0
replace k8s.io/sample-controller => k8s.io/sample-controller v0.25.0-alpha.0
replace k8s.io/pod-security-admission => k8s.io/pod-security-admission v0.24.0-beta.0
replace k8s.io/pod-security-admission => k8s.io/pod-security-admission v0.25.0-alpha.0

View File

@ -1288,29 +1288,29 @@ 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.24.0-beta.0 h1:7knNqNYI1Az5hWcebdyUff4ETyCZkvmUT1N2hi/qS/Y=
k8s.io/api v0.24.0-beta.0/go.mod h1:D7w5dDA57yCeRJnl0vPuRj6KBAwWYxea4Dwo5kgJGIY=
k8s.io/apiextensions-apiserver v0.24.0-beta.0/go.mod h1:ERUuw7ISzBmCN83YB0FXXEAAbZr8PnwhNrB+C4w/YAA=
k8s.io/apimachinery v0.24.0-beta.0 h1:69KiS/m3i2oi3FaCVX6whePxOelsJkhIfO0J5fGDYv8=
k8s.io/apimachinery v0.24.0-beta.0/go.mod h1:82Bi4sCzVBdpYjyI4jY6aHX+YCUchUIrZrXKedjd2UM=
k8s.io/apiserver v0.24.0-beta.0 h1:alwKvg2qKXvXZbjP0v/Ozfagaygh/shCmvNMZW/arg8=
k8s.io/apiserver v0.24.0-beta.0/go.mod h1:pPF5/dEQukQjwauSxjW8IHKn8W1r8u2nERGojwFFlj4=
k8s.io/cli-runtime v0.24.0-beta.0/go.mod h1:Qo9l/V7GEFJKl3fHmeCiMXFcCj4ozLM75/NJgOuHxW0=
k8s.io/client-go v0.24.0-beta.0 h1:ISWwVXNtOr2f1O5afJGi66vxAzC6Gb/3+VWlz4WseFc=
k8s.io/client-go v0.24.0-beta.0/go.mod h1:D4rgRqnNPdFCFMMrcCqCOAouzIwJkPuKXr3zWThEExM=
k8s.io/cloud-provider v0.24.0-beta.0 h1:zSoovn8wYbx0ySlRklRuN7qOVZP91V1Ogpuq70Vscrk=
k8s.io/cloud-provider v0.24.0-beta.0/go.mod h1:fP4ztbWi5wMddhhU+9bS2kXEbG8PqvUFIH0AUlbSeQY=
k8s.io/cluster-bootstrap v0.24.0-beta.0/go.mod h1:orf4hvmecsz5goDJkUm9tdrqvvRGBYw+VV5aA5fPjJ0=
k8s.io/code-generator v0.24.0-beta.0/go.mod h1:dpVhs00hTuTdTY6jvVxvTFCk6gSMrtfRydbhZwHI15w=
k8s.io/component-base v0.24.0-beta.0 h1:Qh9X14PLVX9YfVXEdsWeYVbN/ssm18pkf7RwPX8fCSg=
k8s.io/component-base v0.24.0-beta.0/go.mod h1:UrgHIn7am00FE1rRmr0GHCiNZg7oZO+Oh6iXROJt2oU=
k8s.io/component-helpers v0.24.0-beta.0 h1:ZUd0qDgMzL1gFGz8giE8+TKvnClrRyNtTRJ3BO4cUDc=
k8s.io/component-helpers v0.24.0-beta.0/go.mod h1:dTw0PfziOO6g9Wj3+6nNN3VBfDvEOfYADXxVcmCWWe4=
k8s.io/controller-manager v0.24.0-beta.0/go.mod h1:wqi0opKDUj7GhktwzN+s6VUYMT5BGn4QSQjkRZO31Q4=
k8s.io/cri-api v0.24.0-beta.0 h1:UfxwI/NmxIQ++FrzHNS4w5M6LgGeJYusMHVNlduZuyw=
k8s.io/cri-api v0.24.0-beta.0/go.mod h1:t3tImFtGeStN+ES69bQUX9sFg67ek38BM9YIJhMmuig=
k8s.io/csi-translation-lib v0.24.0-beta.0 h1:H2ABvFWwQqLSzhfruE47hqcYtnrNydDGDmZ4NLOVD7U=
k8s.io/csi-translation-lib v0.24.0-beta.0/go.mod h1:4MDWtoJ54b5OEwqNBC6bywtSgiiTB7wqEeAvYVu1tNk=
k8s.io/api v0.25.0-alpha.0 h1:BiYeMLWoLcGGWE46gdnlwluFa23+Hr3I2Qp8U6c2wYY=
k8s.io/api v0.25.0-alpha.0/go.mod h1:sOibYBePcsE/DBjbbi+Z+FCG9lFPR7xuKSR2r6RTCNs=
k8s.io/apiextensions-apiserver v0.25.0-alpha.0/go.mod h1:YwaPr7AdxZ+L/qv9pt+7LdJKy9IAMNY6j7f6khh4vK4=
k8s.io/apimachinery v0.25.0-alpha.0 h1:gAzcXIp+FkB3w8+m34na2qxSScwQWKtryRU8JfkS/NU=
k8s.io/apimachinery v0.25.0-alpha.0/go.mod h1:82Bi4sCzVBdpYjyI4jY6aHX+YCUchUIrZrXKedjd2UM=
k8s.io/apiserver v0.25.0-alpha.0 h1:xBfhlvO+nR5+8bXa6QWAAUJlKnoeilyfADlsX68nSVI=
k8s.io/apiserver v0.25.0-alpha.0/go.mod h1:3uSXO9FDkLMo4+9e7wAFYPZG9u9k7pu0uDOIldSH4p0=
k8s.io/cli-runtime v0.25.0-alpha.0/go.mod h1:OmaWnSQJYhQ3tqBjnVZZ2io51UdFRi1ri+ESoPVCJ1Q=
k8s.io/client-go v0.25.0-alpha.0 h1:IwIWODi6Uz7QlOU8J2tv8APdDtytoowveKF9IoKpHa4=
k8s.io/client-go v0.25.0-alpha.0/go.mod h1:V7vCXDCdD8Goobi4oQhsSNXtlWfyBJi+LHFaiYWpR5s=
k8s.io/cloud-provider v0.25.0-alpha.0 h1:tLNtZgieW673VI79327GUym2RiyomELBUkSdoQr1StY=
k8s.io/cloud-provider v0.25.0-alpha.0/go.mod h1:K5nBacYCEqciyXU1vypQKpe7UgMkW9DZCBHo3ZyJOHg=
k8s.io/cluster-bootstrap v0.25.0-alpha.0/go.mod h1:Ip0cOIgeZHXG5aZm2jObNEyR9w75xCFJxdl6SXWjPH4=
k8s.io/code-generator v0.25.0-alpha.0/go.mod h1:dpVhs00hTuTdTY6jvVxvTFCk6gSMrtfRydbhZwHI15w=
k8s.io/component-base v0.25.0-alpha.0 h1:3vKkR1bElViOZg8/n+tGPPao4J8wVtgYufpKiVpYVoY=
k8s.io/component-base v0.25.0-alpha.0/go.mod h1:XjXouECWA+3uLTEckIOMeu6P0BjjCNDUaS6a6Ci3EwE=
k8s.io/component-helpers v0.25.0-alpha.0 h1:TWTgK2pOwXwBY5P9FFpd1PoGvkFfyfugSZDi7xI99f8=
k8s.io/component-helpers v0.25.0-alpha.0/go.mod h1:sXP162Q/1YnH2yf2ql7XkinHYmuZU5u6QdkwJG5PVjQ=
k8s.io/controller-manager v0.25.0-alpha.0/go.mod h1:S7RMjQWbPiYRBbDC1+QB8TGxeL4KVsW/0vOCyOjqr4Q=
k8s.io/cri-api v0.25.0-alpha.0 h1:cGTy/e2rO3oVyEMTG80epYhysmFL73CH6Xjvk1P6VTo=
k8s.io/cri-api v0.25.0-alpha.0/go.mod h1:t3tImFtGeStN+ES69bQUX9sFg67ek38BM9YIJhMmuig=
k8s.io/csi-translation-lib v0.25.0-alpha.0 h1:3LQD8/XL2emDsDfgKrLjT0nKw8XC1TpMMvbBdaaSbR4=
k8s.io/csi-translation-lib v0.25.0-alpha.0/go.mod h1:1myNOxne33mcs5wyEWMm+oF0yVIGDOi3WLB1BSlF8iU=
k8s.io/gengo v0.0.0-20200413195148-3a45101e95ac/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0=
k8s.io/gengo v0.0.0-20210813121822-485abfe95c7c/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E=
k8s.io/gengo v0.0.0-20211129171323-c02415ce4185/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E=
@ -1320,29 +1320,29 @@ k8s.io/klog/v2 v2.4.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y=
k8s.io/klog/v2 v2.30.0/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0=
k8s.io/klog/v2 v2.60.1 h1:VW25q3bZx9uE3vvdL6M8ezOX79vA2Aq1nEWLqNQclHc=
k8s.io/klog/v2 v2.60.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0=
k8s.io/kube-aggregator v0.24.0-beta.0/go.mod h1:i9SRRGwxhXwuNuArHlkfy/EuWSrrbUEsIah/7OROTZU=
k8s.io/kube-controller-manager v0.24.0-beta.0/go.mod h1:fWFSeGBCqt9jVAapezVfla3RmuXCaWM5SAnRzTz+eeI=
k8s.io/kube-aggregator v0.25.0-alpha.0/go.mod h1:olUoQP9QzHZXFHlanZEsN/PidLiFmofGlye1vfnc9wE=
k8s.io/kube-controller-manager v0.25.0-alpha.0/go.mod h1:dXBOS6Y2tkaicPsYw0BjwJL54u/wWc7BSLuNUjGpKcw=
k8s.io/kube-openapi v0.0.0-20210421082810-95288971da7e/go.mod h1:vHXdDvt9+2spS2Rx9ql3I8tycm3H9FDfdUoIuKCefvw=
k8s.io/kube-openapi v0.0.0-20211115234752-e816edb12b65/go.mod h1:sX9MT8g7NVZM5lVL/j8QyCCJe8YSMW30QvGZWaCIDIk=
k8s.io/kube-openapi v0.0.0-20220328201542-3ee0da9b0b42 h1:Gii5eqf+GmIEwGNKQYQClCayuJCe2/4fZUvF7VG99sU=
k8s.io/kube-openapi v0.0.0-20220328201542-3ee0da9b0b42/go.mod h1:Z/45zLw8lUo4wdiUkI+v/ImEGAvu3WatcZl3lPMR4Rk=
k8s.io/kube-proxy v0.24.0-beta.0 h1:9Vd29agEbwrWyXupqQm7/FNBG49dG3pECqjbtfjYoWU=
k8s.io/kube-proxy v0.24.0-beta.0/go.mod h1:Ue+brgmG9hJTAwhy/bIFWiy3st+Qwlz3fdgAXPTxyyE=
k8s.io/kube-scheduler v0.24.0-beta.0 h1:F5bIF3ybZt/y03BHDxYEkaL+gSsVm0m9O6hn051j2fs=
k8s.io/kube-scheduler v0.24.0-beta.0/go.mod h1:+y0WvSi1G/r+QjwL8V0KZSO6ag6yoxYG3Ia4YiMp/54=
k8s.io/kubectl v0.24.0-beta.0 h1:JkSxllEVf+wUoKOLizOlqPb/0LuyJBY7k783h5PZau4=
k8s.io/kubectl v0.24.0-beta.0/go.mod h1:PYylwYjci95A9BA6AJ9vHBH6KIVxmTm6q0khy2KQ0To=
k8s.io/kubelet v0.24.0-beta.0 h1:0OC8zrg90TCCAOMuG1tqA/k2bcJUmPhb8FMyV98nFyo=
k8s.io/kubelet v0.24.0-beta.0/go.mod h1:KCSt2570pwktXJQRIbYKMXiZLBKXXuvso8rbKXGNT1I=
k8s.io/kubernetes v1.24.0-beta.0 h1:toH3x4G1Sxng5SP+cOwdaP+7G4DQ4T0IiL8YQX6MEVk=
k8s.io/kubernetes v1.24.0-beta.0/go.mod h1:LF4JSC9A2UFkMghQojsO8AjwT/TJhJfLhLezMpBQo2Q=
k8s.io/legacy-cloud-providers v0.24.0-beta.0 h1:5hBAZXbN4s0ltfSuzsrjBh824oQgJsQwaYBLRp3gsa0=
k8s.io/legacy-cloud-providers v0.24.0-beta.0/go.mod h1:NTneotEav3QcOzctkWNOlKjTAbo933F+1AIzYyJV1Fc=
k8s.io/metrics v0.24.0-beta.0/go.mod h1:GHGniJ7wpgbOV8qNOo70NRqNa5LzBl4paA9TAhwVTWM=
k8s.io/mount-utils v0.24.0-beta.0 h1:nZlBHKq8V5oPa8/zZWJ/cKXCMS7qqNx47GZhGeR4q0M=
k8s.io/mount-utils v0.24.0-beta.0/go.mod h1:XrSqB3a2e8sq+aU+rlbcBtQ3EgcuDk5RP9ZsGxjoDrI=
k8s.io/pod-security-admission v0.24.0-beta.0/go.mod h1:tc8LHwlROrmBQuDwJYWe41s/3/xi5K6hHMQlvfkW+tU=
k8s.io/sample-apiserver v0.24.0-beta.0/go.mod h1:TQRzja5dg0ocU8zQqjx8puKu91aOmIj2LxiZfnmzjAU=
k8s.io/kube-proxy v0.25.0-alpha.0 h1:Mkuvc9thTA22fuScC7Ue9qR5NXbhwATmy270QL12B4s=
k8s.io/kube-proxy v0.25.0-alpha.0/go.mod h1:y1aNTbClVUScRtAYjvbz67n2fIY0jBumnfMNSXEmAug=
k8s.io/kube-scheduler v0.25.0-alpha.0 h1:5vAmj0xM9Vfwcq1ulS07jZLClzeYmKEHPvZc1wqGpsE=
k8s.io/kube-scheduler v0.25.0-alpha.0/go.mod h1:5tVTKJ9H3QTGA524GcQYmTVqEr1Y5wDs/0MluxTT7gQ=
k8s.io/kubectl v0.25.0-alpha.0 h1:wiCTyzu55qVfmKrgrkSHU+x7nUgdSxOrCk0ql1jChEE=
k8s.io/kubectl v0.25.0-alpha.0/go.mod h1:L+ThZX3I03dnkBHKPEE932KOiXG7WYCRnuFp6l5/RUE=
k8s.io/kubelet v0.25.0-alpha.0 h1:AuwvU6TeweFN5KLbkApo5locdy+hkeM/un8JOLF/f1U=
k8s.io/kubelet v0.25.0-alpha.0/go.mod h1:+bvVgnB6kQuEZOJHSqBSQAEblNif8eNaLHkXUghbs9Q=
k8s.io/kubernetes v1.25.0-alpha.0 h1:/wZ8TE+wFcAm5Ib0StEsazgiWpe1vt0j+SyBLO035YM=
k8s.io/kubernetes v1.25.0-alpha.0/go.mod h1:LF4JSC9A2UFkMghQojsO8AjwT/TJhJfLhLezMpBQo2Q=
k8s.io/legacy-cloud-providers v0.25.0-alpha.0 h1:epQPEooRpz6Nbku7zbqZ3XmuCueANoQPTsdE4uZboRU=
k8s.io/legacy-cloud-providers v0.25.0-alpha.0/go.mod h1:NRicKOUNaTD4B5C5Xcp9fU87xzJ16UqRA4M7qxGY2wE=
k8s.io/metrics v0.25.0-alpha.0/go.mod h1:qUpYHtJkJ01kGddd7UGW2msXmGI65TYh8TQshMCU7W4=
k8s.io/mount-utils v0.25.0-alpha.0 h1:UH1LIJ6I6NBq8l0COyKaTEfppFUzFnAkPN3zMO5xEHY=
k8s.io/mount-utils v0.25.0-alpha.0/go.mod h1:XrSqB3a2e8sq+aU+rlbcBtQ3EgcuDk5RP9ZsGxjoDrI=
k8s.io/pod-security-admission v0.25.0-alpha.0/go.mod h1:ZhFYC6fG8ub7RHbnnJF5Xa2Nsll2oxZRlaVSL+MrCaY=
k8s.io/sample-apiserver v0.25.0-alpha.0/go.mod h1:u4/K41JZGEzxiGlGMniijwCkoqNSNAanmbMF+BRwjH0=
k8s.io/system-validators v1.7.0/go.mod h1:gP1Ky+R9wtrSiFbrpEPwWMeYz9yqyy1S/KOh0Vci7WI=
k8s.io/utils v0.0.0-20210802155522-efc7438f0176/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA=
k8s.io/utils v0.0.0-20210930125809-cb0fa318a74b/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA=

View File

@ -151,6 +151,6 @@ func TestDebugInfo(t *testing.T) {
predicateErr := predicateChecker.CheckPredicates(clusterSnapshot, p1, "n1")
assert.NotNil(t, predicateErr)
assert.Equal(t, "node(s) had taint {SomeTaint: WhyNot?}, that the pod didn't tolerate", predicateErr.Message())
assert.Equal(t, "node(s) had untolerated taint {SomeTaint: WhyNot?}", predicateErr.Message())
assert.Contains(t, predicateErr.VerboseMessage(), "RandomTaint")
}

View File

@ -759,6 +759,7 @@ message StatefulSetStatus {
// Total number of available pods (ready for at least minReadySeconds) targeted by this statefulset.
// This is a beta field and enabled/disabled by StatefulSetMinReadySeconds feature gate.
// +optional
optional int32 availableReplicas = 11;
}

View File

@ -282,6 +282,7 @@ type StatefulSetStatus struct {
// Total number of available pods (ready for at least minReadySeconds) targeted by this statefulset.
// This is a beta field and enabled/disabled by StatefulSetMinReadySeconds feature gate.
// +optional
AvailableReplicas int32 `json:"availableReplicas" protobuf:"varint,11,opt,name=availableReplicas"`
}

View File

@ -514,6 +514,7 @@ message StatefulSetStatus {
// Total number of available pods (ready for at least minReadySeconds) targeted by this StatefulSet.
// This is a beta field and enabled/disabled by StatefulSetMinReadySeconds feature gate.
// +optional
optional int32 availableReplicas = 11;
}

View File

@ -321,6 +321,7 @@ type StatefulSetStatus struct {
// Total number of available pods (ready for at least minReadySeconds) targeted by this StatefulSet.
// This is a beta field and enabled/disabled by StatefulSetMinReadySeconds feature gate.
// +optional
AvailableReplicas int32 `json:"availableReplicas" protobuf:"varint,11,opt,name=availableReplicas"`
}

View File

@ -801,6 +801,7 @@ message StatefulSetStatus {
// Total number of available pods (ready for at least minReadySeconds) targeted by this StatefulSet.
// This is a beta field and enabled/disabled by StatefulSetMinReadySeconds feature gate.
// +optional
optional int32 availableReplicas = 11;
}

View File

@ -330,6 +330,7 @@ type StatefulSetStatus struct {
// Total number of available pods (ready for at least minReadySeconds) targeted by this StatefulSet.
// This is a beta field and enabled/disabled by StatefulSetMinReadySeconds feature gate.
// +optional
AvailableReplicas int32 `json:"availableReplicas" protobuf:"varint,11,opt,name=availableReplicas"`
}

View File

@ -212,7 +212,6 @@ type CertificateSigningRequestStatus struct {
}
// RequestConditionType is the type of a CertificateSigningRequestCondition
// +enum
type RequestConditionType string
// Well-known condition types for certificate requests.

File diff suppressed because it is too large Load Diff

View File

@ -1767,12 +1767,6 @@ message HostAlias {
repeated string hostnames = 2;
}
// HostIP address information for entries in the (plural) HostIPs field.
message HostIP {
// IP is the IP address assigned to the host
optional string ip = 1;
}
// Represents a host path mapped into a pod.
// Host path volumes do not support ownership management or SELinux relabeling.
message HostPathVolumeSource {
@ -3236,9 +3230,11 @@ message PodExecOptions {
repeated string command = 6;
}
// PodIP address information for entries in the (plural) PodIPs field.
// IP address information for entries in the (plural) PodIPs field.
// Each entry includes:
// IP: An IP address allocated to the pod. Routable at least within the cluster.
message PodIP {
// IP is the IP address assigned to the pod
// ip is an IP address (IPv4 or IPv6) assigned to the pod
optional string ip = 1;
}
@ -3778,24 +3774,11 @@ message PodStatus {
// +optional
optional string nominatedNodeName = 11;
// hostIP holds the IP address of the host to which the pod is assigned.
// Empty if the pod has not started yet.
// A pod can be assigned to a node that has a problem in kubelet which in turns mean that HostIP will
// not be updated even if there is node is assigned to pod
// IP address of the host to which the pod is assigned. Empty if not yet scheduled.
// +optional
optional string hostIP = 5;
// hostIPs holds the IP addresses allocated to the host. If this field is specified, the first entry must
// match the hostIP field. This list is empty if the pod has not started yet.
// A pod can be assigned to a node that has a problem in kubelet which in turns means that HostIPs will
// not be updated even if there is a node is assigned to this pod.
// +optional
// +patchStrategy=merge
// +patchMergeKey=ip
// +listType=set
repeated HostIP hostIPs = 14;
// podIP address allocated to the pod. Routable at least within the cluster.
// IP address allocated to the pod. Routable at least within the cluster.
// Empty if not yet allocated.
// +optional
optional string podIP = 6;

View File

@ -3605,15 +3605,11 @@ type PodDNSConfigOption struct {
Value *string `json:"value,omitempty" protobuf:"bytes,2,opt,name=value"`
}
// PodIP address information for entries in the (plural) PodIPs field.
// IP address information for entries in the (plural) PodIPs field.
// Each entry includes:
// IP: An IP address allocated to the pod. Routable at least within the cluster.
type PodIP struct {
// IP is the IP address assigned to the pod
IP string `json:"ip,omitempty" protobuf:"bytes,1,opt,name=ip"`
}
// HostIP address information for entries in the (plural) HostIPs field.
type HostIP struct {
// IP is the IP address assigned to the host
// ip is an IP address (IPv4 or IPv6) assigned to the pod
IP string `json:"ip,omitempty" protobuf:"bytes,1,opt,name=ip"`
}
@ -3834,24 +3830,10 @@ type PodStatus struct {
// +optional
NominatedNodeName string `json:"nominatedNodeName,omitempty" protobuf:"bytes,11,opt,name=nominatedNodeName"`
// hostIP holds the IP address of the host to which the pod is assigned.
// Empty if the pod has not started yet.
// A pod can be assigned to a node that has a problem in kubelet which in turns mean that HostIP will
// not be updated even if there is node is assigned to pod
// IP address of the host to which the pod is assigned. Empty if not yet scheduled.
// +optional
HostIP string `json:"hostIP,omitempty" protobuf:"bytes,5,opt,name=hostIP"`
// hostIPs holds the IP addresses allocated to the host. If this field is specified, the first entry must
// match the hostIP field. This list is empty if the pod has not started yet.
// A pod can be assigned to a node that has a problem in kubelet which in turns means that HostIPs will
// not be updated even if there is a node is assigned to this pod.
// +optional
// +patchStrategy=merge
// +patchMergeKey=ip
// +listType=set
HostIPs []HostIP `json:"hostIPs,omitempty" protobuf:"bytes,14,rep,name=hostIPs" patchStrategy:"merge" patchMergeKey:"ip"`
// podIP address allocated to the pod. Routable at least within the cluster.
// IP address allocated to the pod. Routable at least within the cluster.
// Empty if not yet allocated.
// +optional
PodIP string `json:"podIP,omitempty" protobuf:"bytes,6,opt,name=podIP"`

View File

@ -825,15 +825,6 @@ func (HostAlias) SwaggerDoc() map[string]string {
return map_HostAlias
}
var map_HostIP = map[string]string{
"": "HostIP address information for entries in the (plural) HostIPs field.",
"ip": "IP is the IP address assigned to the host",
}
func (HostIP) SwaggerDoc() map[string]string {
return map_HostIP
}
var map_HostPathVolumeSource = map[string]string{
"": "Represents a host path mapped into a pod. Host path volumes do not support ownership management or SELinux relabeling.",
"path": "path of the directory on the host. If the path is a symlink, it will follow the link to the real path. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath",
@ -1543,8 +1534,8 @@ func (PodExecOptions) SwaggerDoc() map[string]string {
}
var map_PodIP = map[string]string{
"": "PodIP address information for entries in the (plural) PodIPs field.",
"ip": "IP is the IP address assigned to the pod",
"": "IP address information for entries in the (plural) PodIPs field. Each entry includes:\n IP: An IP address allocated to the pod. Routable at least within the cluster.",
"ip": "ip is an IP address (IPv4 or IPv6) assigned to the pod",
}
func (PodIP) SwaggerDoc() map[string]string {
@ -1692,9 +1683,8 @@ var map_PodStatus = map[string]string{
"message": "A human readable message indicating details about why the pod is in this condition.",
"reason": "A brief CamelCase message indicating details about why the pod is in this state. e.g. 'Evicted'",
"nominatedNodeName": "nominatedNodeName is set only when this pod preempts other pods on the node, but it cannot be scheduled right away as preemption victims receive their graceful termination periods. This field does not guarantee that the pod will be scheduled on this node. Scheduler may decide to place the pod elsewhere if other nodes become available sooner. Scheduler may also decide to give the resources on this node to a higher priority pod that is created after preemption. As a result, this field may be different than PodSpec.nodeName when the pod is scheduled.",
"hostIP": "hostIP holds the IP address of the host to which the pod is assigned. Empty if the pod has not started yet. A pod can be assigned to a node that has a problem in kubelet which in turns mean that HostIP will not be updated even if there is node is assigned to pod",
"hostIPs": "hostIPs holds the IP addresses allocated to the host. If this field is specified, the first entry must match the hostIP field. This list is empty if the pod has not started yet. A pod can be assigned to a node that has a problem in kubelet which in turns means that HostIPs will not be updated even if there is a node is assigned to this pod.",
"podIP": "podIP address allocated to the pod. Routable at least within the cluster. Empty if not yet allocated.",
"hostIP": "IP address of the host to which the pod is assigned. Empty if not yet scheduled.",
"podIP": "IP address allocated to the pod. Routable at least within the cluster. Empty if not yet allocated.",
"podIPs": "podIPs holds the IP addresses allocated to the pod. If this field is specified, the 0th entry must match the podIP field. Pods may be allocated at most 1 value for each of IPv4 and IPv6. This list is empty if no IPs have been allocated yet.",
"startTime": "RFC 3339 date and time at which the object was acknowledged by the Kubelet. This is before the Kubelet pulled the container image(s) for the pod.",
"initContainerStatuses": "The list has one entry per init container in the manifest. The most recent successful init container will have ready = true, the most recently started container will have startTime set. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-and-container-status",

View File

@ -1802,22 +1802,6 @@ func (in *HostAlias) DeepCopy() *HostAlias {
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *HostIP) DeepCopyInto(out *HostIP) {
*out = *in
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HostIP.
func (in *HostIP) DeepCopy() *HostIP {
if in == nil {
return nil
}
out := new(HostIP)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *HostPathVolumeSource) DeepCopyInto(out *HostPathVolumeSource) {
*out = *in
@ -3988,11 +3972,6 @@ func (in *PodStatus) DeepCopyInto(out *PodStatus) {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
if in.HostIPs != nil {
in, out := &in.HostIPs, &out.HostIPs
*out = make([]HostIP, len(*in))
copy(*out, *in)
}
if in.PodIPs != nil {
in, out := &in.PodIPs, &out.PodIPs
*out = make([]PodIP, len(*in))

View File

@ -1,23 +0,0 @@
/*
Copyright 2022 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// +k8s:deepcopy-gen=package
// +k8s:protobuf-gen=package
// +k8s:openapi-gen=true
// +k8s:prerelease-lifecycle-gen=true
// +groupName=networking.k8s.io
package v1alpha1 // import "k8s.io/api/networking/v1alpha1"

File diff suppressed because it is too large Load Diff

View File

@ -1,92 +0,0 @@
/*
Copyright The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// This file was autogenerated by go-to-protobuf. Do not edit it manually!
syntax = "proto2";
package k8s.io.api.networking.v1alpha1;
import "k8s.io/api/core/v1/generated.proto";
import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto";
import "k8s.io/apimachinery/pkg/runtime/generated.proto";
import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto";
// Package-wide variables from generator "generated".
option go_package = "k8s.io/api/networking/v1alpha1";
// ClusterCIDRConfig is the Schema for the clustercidrconfigs API.
message ClusterCIDRConfig {
// Standard object's metadata.
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
// +optional
optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
// Spec is the desired state of the ClusterCIDRConfig.
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
// +optional
optional ClusterCIDRConfigSpec spec = 2;
// Status is the current state of the ClusterCIDRConfig.
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
// +optional
optional ClusterCIDRConfigStatus status = 3;
}
// ClusterCIDRConfigList contains a list of ClusterCIDRConfig.
message ClusterCIDRConfigList {
// Standard object's metadata.
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
// +optional
optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
// Items is the list of ClusterCIDRConfigs.
repeated ClusterCIDRConfig items = 2;
}
// ClusterCIDRConfigSpec defines the desired state of ClusterCIDRConfig.
message ClusterCIDRConfigSpec {
// NodeSelector defines which nodes the config is applicable to.
// An empty or nil NodeSelector functions as a default that applies to all nodes.
// This field is immutable.
// +optional
optional k8s.io.api.core.v1.NodeSelector nodeSelector = 1;
// PerNodeHostBits defines the number of host bits to be configured per node.
// A subnet mask determines how much of the address is used for network bits
// and host bits. For example and IPv4 address of 192.168.0.0/24, splits the
// address into 24 bits for the network portion and 8 bits for the host portion.
// For a /24 mask for IPv4 or a /120 for IPv6, configure PerNodeHostBits=8
// This field is immutable.
// +optional
optional int32 perNodeHostBits = 2;
// IPv4CIDR defines an IPv4 IP block in CIDR notation(e.g. "10.0.0.0/8").
// This field is immutable.
// +optional
optional string ipv4CIDR = 3;
// IPv6CIDR defines an IPv6 IP block in CIDR notation(e.g. "fd12:3456:789a:1::/64").
// This field is immutable.
// +optional
optional string ipv6CIDR = 4;
}
// ClusterCIDRConfigStatus defines the observed state of ClusterCIDRConfig.
message ClusterCIDRConfigStatus {
}

View File

@ -1,56 +0,0 @@
/*
Copyright 2022 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package v1alpha1
import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/runtime/schema"
)
// GroupName is the group name use in this package.
const GroupName = "networking.k8s.io"
// SchemeGroupVersion is group version used to register these objects.
var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha1"}
// Resource takes an unqualified resource and returns a Group qualified GroupResource.
func Resource(resource string) schema.GroupResource {
return SchemeGroupVersion.WithResource(resource).GroupResource()
}
var (
// SchemeBuilder holds functions that add things to a scheme.
// TODO: move SchemeBuilder with zz_generated.deepcopy.go to k8s.io/api.
// localSchemeBuilder and AddToScheme will stay in k8s.io/kubernetes.
SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
localSchemeBuilder = &SchemeBuilder
// AddToScheme adds the types of this group into the given scheme.
AddToScheme = localSchemeBuilder.AddToScheme
)
// Adds the list of known types to the given scheme.
func addKnownTypes(scheme *runtime.Scheme) error {
scheme.AddKnownTypes(SchemeGroupVersion,
&ClusterCIDRConfig{},
&ClusterCIDRConfigList{},
)
// Add the watch version that applies.
metav1.AddToGroupVersion(scheme, SchemeGroupVersion)
return nil
}

View File

@ -1,93 +0,0 @@
/*
Copyright 2022 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package v1alpha1
import (
v1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)
// +genclient
// +genclient:nonNamespaced
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// +k8s:prerelease-lifecycle-gen:introduced=1.24
// ClusterCIDRConfig is the Schema for the clustercidrconfigs API.
type ClusterCIDRConfig struct {
metav1.TypeMeta `json:",inline"`
// Standard object's metadata.
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
// +optional
metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
// Spec is the desired state of the ClusterCIDRConfig.
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
// +optional
Spec ClusterCIDRConfigSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
// Status is the current state of the ClusterCIDRConfig.
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
// +optional
Status ClusterCIDRConfigStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
}
// ClusterCIDRConfigSpec defines the desired state of ClusterCIDRConfig.
type ClusterCIDRConfigSpec struct {
// NodeSelector defines which nodes the config is applicable to.
// An empty or nil NodeSelector functions as a default that applies to all nodes.
// This field is immutable.
// +optional
NodeSelector *v1.NodeSelector `json:"nodeSelector,omitempty" protobuf:"bytes,1,opt,name=nodeSelector"`
// PerNodeHostBits defines the number of host bits to be configured per node.
// A subnet mask determines how much of the address is used for network bits
// and host bits. For example and IPv4 address of 192.168.0.0/24, splits the
// address into 24 bits for the network portion and 8 bits for the host portion.
// For a /24 mask for IPv4 or a /120 for IPv6, configure PerNodeHostBits=8
// This field is immutable.
// +optional
PerNodeHostBits int32 `json:"perNodeHostBits" protobuf:"varint,2,opt,name=perNodeHostBits"`
// IPv4CIDR defines an IPv4 IP block in CIDR notation(e.g. "10.0.0.0/8").
// This field is immutable.
// +optional
IPv4CIDR string `json:"ipv4CIDR" protobuf:"bytes,3,opt,name=ipv4CIDR"`
// IPv6CIDR defines an IPv6 IP block in CIDR notation(e.g. "fd12:3456:789a:1::/64").
// This field is immutable.
// +optional
IPv6CIDR string `json:"ipv6CIDR" protobuf:"bytes,4,opt,name=ipv6CIDR"`
}
// ClusterCIDRConfigStatus defines the observed state of ClusterCIDRConfig.
type ClusterCIDRConfigStatus struct {
}
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// +k8s:prerelease-lifecycle-gen:introduced=1.24
// ClusterCIDRConfigList contains a list of ClusterCIDRConfig.
type ClusterCIDRConfigList struct {
metav1.TypeMeta `json:",inline"`
// Standard object's metadata.
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
// +optional
metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
// Items is the list of ClusterCIDRConfigs.
Items []ClusterCIDRConfig `json:"items" protobuf:"bytes,2,rep,name=items"`
}

View File

@ -1,71 +0,0 @@
/*
Copyright The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package v1alpha1
// This file contains a collection of methods that can be used from go-restful to
// generate Swagger API documentation for its models. Please read this PR for more
// information on the implementation: https://github.com/emicklei/go-restful/pull/215
//
// TODOs are ignored from the parser (e.g. TODO(andronat):... || TODO:...) if and only if
// they are on one line! For multiple line or blocks that you want to ignore use ---.
// Any context after a --- is ignored.
//
// Those methods can be generated by using hack/update-generated-swagger-docs.sh
// AUTO-GENERATED FUNCTIONS START HERE. DO NOT EDIT.
var map_ClusterCIDRConfig = map[string]string{
"": "ClusterCIDRConfig is the Schema for the clustercidrconfigs API.",
"metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata",
"spec": "Spec is the desired state of the ClusterCIDRConfig. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status",
"status": "Status is the current state of the ClusterCIDRConfig. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status",
}
func (ClusterCIDRConfig) SwaggerDoc() map[string]string {
return map_ClusterCIDRConfig
}
var map_ClusterCIDRConfigList = map[string]string{
"": "ClusterCIDRConfigList contains a list of ClusterCIDRConfig.",
"metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata",
"items": "Items is the list of ClusterCIDRConfigs.",
}
func (ClusterCIDRConfigList) SwaggerDoc() map[string]string {
return map_ClusterCIDRConfigList
}
var map_ClusterCIDRConfigSpec = map[string]string{
"": "ClusterCIDRConfigSpec defines the desired state of ClusterCIDRConfig.",
"nodeSelector": "NodeSelector defines which nodes the config is applicable to. An empty or nil NodeSelector functions as a default that applies to all nodes. This field is immutable.",
"perNodeHostBits": "PerNodeHostBits defines the number of host bits to be configured per node. A subnet mask determines how much of the address is used for network bits and host bits. For example and IPv4 address of 192.168.0.0/24, splits the address into 24 bits for the network portion and 8 bits for the host portion. For a /24 mask for IPv4 or a /120 for IPv6, configure PerNodeHostBits=8 This field is immutable.",
"ipv4CIDR": "IPv4CIDR defines an IPv4 IP block in CIDR notation(e.g. \"10.0.0.0/8\"). This field is immutable.",
"ipv6CIDR": "IPv6CIDR defines an IPv6 IP block in CIDR notation(e.g. \"fd12:3456:789a:1::/64\"). This field is immutable.",
}
func (ClusterCIDRConfigSpec) SwaggerDoc() map[string]string {
return map_ClusterCIDRConfigSpec
}
var map_ClusterCIDRConfigStatus = map[string]string{
"": "ClusterCIDRConfigStatus defines the observed state of ClusterCIDRConfig.",
}
func (ClusterCIDRConfigStatus) SwaggerDoc() map[string]string {
return map_ClusterCIDRConfigStatus
}
// AUTO-GENERATED FUNCTIONS END HERE

View File

@ -1,125 +0,0 @@
//go:build !ignore_autogenerated
// +build !ignore_autogenerated
/*
Copyright The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by deepcopy-gen. DO NOT EDIT.
package v1alpha1
import (
v1 "k8s.io/api/core/v1"
runtime "k8s.io/apimachinery/pkg/runtime"
)
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ClusterCIDRConfig) DeepCopyInto(out *ClusterCIDRConfig) {
*out = *in
out.TypeMeta = in.TypeMeta
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
in.Spec.DeepCopyInto(&out.Spec)
out.Status = in.Status
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterCIDRConfig.
func (in *ClusterCIDRConfig) DeepCopy() *ClusterCIDRConfig {
if in == nil {
return nil
}
out := new(ClusterCIDRConfig)
in.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *ClusterCIDRConfig) DeepCopyObject() runtime.Object {
if c := in.DeepCopy(); c != nil {
return c
}
return nil
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ClusterCIDRConfigList) DeepCopyInto(out *ClusterCIDRConfigList) {
*out = *in
out.TypeMeta = in.TypeMeta
in.ListMeta.DeepCopyInto(&out.ListMeta)
if in.Items != nil {
in, out := &in.Items, &out.Items
*out = make([]ClusterCIDRConfig, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterCIDRConfigList.
func (in *ClusterCIDRConfigList) DeepCopy() *ClusterCIDRConfigList {
if in == nil {
return nil
}
out := new(ClusterCIDRConfigList)
in.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *ClusterCIDRConfigList) DeepCopyObject() runtime.Object {
if c := in.DeepCopy(); c != nil {
return c
}
return nil
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ClusterCIDRConfigSpec) DeepCopyInto(out *ClusterCIDRConfigSpec) {
*out = *in
if in.NodeSelector != nil {
in, out := &in.NodeSelector, &out.NodeSelector
*out = new(v1.NodeSelector)
(*in).DeepCopyInto(*out)
}
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterCIDRConfigSpec.
func (in *ClusterCIDRConfigSpec) DeepCopy() *ClusterCIDRConfigSpec {
if in == nil {
return nil
}
out := new(ClusterCIDRConfigSpec)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ClusterCIDRConfigStatus) DeepCopyInto(out *ClusterCIDRConfigStatus) {
*out = *in
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterCIDRConfigStatus.
func (in *ClusterCIDRConfigStatus) DeepCopy() *ClusterCIDRConfigStatus {
if in == nil {
return nil
}
out := new(ClusterCIDRConfigStatus)
in.DeepCopyInto(out)
return out
}

View File

@ -1,58 +0,0 @@
//go:build !ignore_autogenerated
// +build !ignore_autogenerated
/*
Copyright The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by prerelease-lifecycle-gen. DO NOT EDIT.
package v1alpha1
// APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison.
// It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go.
func (in *ClusterCIDRConfig) APILifecycleIntroduced() (major, minor int) {
return 1, 24
}
// APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison.
// It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor.
func (in *ClusterCIDRConfig) APILifecycleDeprecated() (major, minor int) {
return 1, 27
}
// APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison.
// It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor.
func (in *ClusterCIDRConfig) APILifecycleRemoved() (major, minor int) {
return 1, 30
}
// APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison.
// It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go.
func (in *ClusterCIDRConfigList) APILifecycleIntroduced() (major, minor int) {
return 1, 24
}
// APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison.
// It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor.
func (in *ClusterCIDRConfigList) APILifecycleDeprecated() (major, minor int) {
return 1, 27
}
// APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison.
// It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor.
func (in *ClusterCIDRConfigList) APILifecycleRemoved() (major, minor int) {
return 1, 30
}

View File

@ -22,6 +22,7 @@ import (
"k8s.io/apimachinery/pkg/runtime/schema"
"k8s.io/kube-openapi/pkg/schemaconv"
"k8s.io/kube-openapi/pkg/util/proto"
smdschema "sigs.k8s.io/structured-merge-diff/v4/schema"
"sigs.k8s.io/structured-merge-diff/v4/typed"
)
@ -58,7 +59,7 @@ func NewGVKParser(models proto.Models, preserveUnknownFields bool) (*GvkParser,
parser := GvkParser{
gvks: map[schema.GroupVersionKind]string{},
}
parser.parser = typed.Parser{Schema: *typeSchema}
parser.parser = typed.Parser{Schema: smdschema.Schema{Types: typeSchema.Types}}
for _, modelName := range models.ListModels() {
model := models.LookupModel(modelName)
if model == nil {

View File

@ -18,7 +18,6 @@ package audit
import (
"context"
"fmt"
"sync"
auditinternal "k8s.io/apiserver/pkg/apis/audit"
@ -73,7 +72,7 @@ func WithAuditAnnotations(parent context.Context) context.Context {
func AddAuditAnnotation(ctx context.Context, key, value string) {
mutex, ok := auditAnnotationsMutex(ctx)
if !ok {
klog.ErrorS(nil, "Attempted to add audit annotations from unsupported request chain", "annotation", fmt.Sprintf("%s=%s", key, value))
// auditing is not enabled
return
}
@ -95,7 +94,7 @@ func AddAuditAnnotation(ctx context.Context, key, value string) {
func AddAuditAnnotations(ctx context.Context, keysAndValues ...string) {
mutex, ok := auditAnnotationsMutex(ctx)
if !ok {
klog.ErrorS(nil, "Attempted to add audit annotations from unsupported request chain", "annotations", keysAndValues)
// auditing is not enabled
return
}
@ -121,7 +120,7 @@ func AddAuditAnnotations(ctx context.Context, keysAndValues ...string) {
func AddAuditAnnotationsMap(ctx context.Context, annotations map[string]string) {
mutex, ok := auditAnnotationsMutex(ctx)
if !ok {
klog.ErrorS(nil, "Attempted to add audit annotations from unsupported request chain", "annotations", annotations)
// auditing is not enabled
return
}
@ -154,7 +153,7 @@ func addAuditAnnotationLocked(ae *auditinternal.Event, annotations *[]annotation
func addAuditAnnotationsFrom(ctx context.Context, ev *auditinternal.Event) {
mutex, ok := auditAnnotationsMutex(ctx)
if !ok {
klog.Errorf("Attempted to copy audit annotations from unsupported request chain")
// auditing is not enabled
return
}

View File

@ -175,17 +175,9 @@ const (
// owner: @kevindelgado
// kep: http://kep.k8s.io/2885
// alpha: v1.23
// beta: v1.24
//
// Enables server-side field validation.
ServerSideFieldValidation featuregate.Feature = "ServerSideFieldValidation"
// owner: @deejross
// kep: http://kep.k8s.io/3140
// alpha: v1.24
//
// Enables support for time zones in CronJobs.
CronJobTimeZone featuregate.Feature = "CronJobTimeZone"
)
func init() {
@ -214,6 +206,5 @@ var defaultKubernetesFeatureGates = map[featuregate.Feature]featuregate.FeatureS
OpenAPIEnums: {Default: true, PreRelease: featuregate.Beta},
CustomResourceValidationExpressions: {Default: false, PreRelease: featuregate.Alpha},
OpenAPIV3: {Default: true, PreRelease: featuregate.Beta},
ServerSideFieldValidation: {Default: true, PreRelease: featuregate.Beta},
CronJobTimeZone: {Default: false, PreRelease: featuregate.Alpha},
ServerSideFieldValidation: {Default: false, PreRelease: featuregate.Alpha},
}

View File

@ -439,11 +439,6 @@ func (e *Store) Create(ctx context.Context, obj runtime.Object, createValidation
if e.Decorator != nil {
e.Decorator(out)
}
if dryrun.IsDryRun(options.DryRun) {
if err := dryrun.ResetMetadata(obj, out); err != nil {
return nil, err
}
}
return out, nil
}

View File

@ -16,41 +16,7 @@ limitations under the License.
package dryrun
import (
"k8s.io/apimachinery/pkg/api/errors"
"k8s.io/apimachinery/pkg/api/meta"
"k8s.io/apimachinery/pkg/runtime"
)
// IsDryRun returns true if the DryRun flag is an actual dry-run.
func IsDryRun(flag []string) bool {
return len(flag) > 0
}
// ResetMetadata resets metadata fields that are not allowed to be set by dry-run.
func ResetMetadata(originalObj, newObj runtime.Object) error {
originalObjMeta, err := meta.Accessor(originalObj)
if err != nil {
return errors.NewInternalError(err)
}
newObjMeta, err := meta.Accessor(newObj)
if err != nil {
return errors.NewInternalError(err)
}
// If a resource is created with dry-run enabled where generateName is set, the
// store will set the name to the generated name. We need to reset the name and restore
// the generateName metadata fields in order for the returned object to match the intent
// of the original template.
if originalObjMeta.GetGenerateName() != "" {
newObjMeta.SetName("")
}
newObjMeta.SetGenerateName(originalObjMeta.GetGenerateName())
// If UID is set in the dry-run output then that output cannot be used to create a resource. Reset
// the UID to allow the output to be used to create resources.
newObjMeta.SetUID("")
// If the resourceVersion is set in the dry-run output then that output cannot be used to create
// a resource. Reset the resourceVersion to allow the output to be used to create resources.
newObjMeta.SetResourceVersion("")
return nil
}

View File

@ -21,6 +21,7 @@ import (
"strconv"
"time"
"k8s.io/apiserver/pkg/server/httplog"
"k8s.io/apiserver/pkg/server/mux"
fq "k8s.io/apiserver/pkg/util/flowcontrol/fairqueuing"
"k8s.io/apiserver/pkg/util/flowcontrol/fairqueuing/eventclock"
@ -186,7 +187,9 @@ func (cfgCtlr *configController) Handle(ctx context.Context, requestDigest Reque
executed = true
startExecutionTime := time.Now()
defer func() {
metrics.ObserveExecutionDuration(ctx, pl.Name, fs.Name, time.Since(startExecutionTime))
executionTime := time.Since(startExecutionTime)
httplog.AddKeyValue(ctx, "apf_execution_time", executionTime)
metrics.ObserveExecutionDuration(ctx, pl.Name, fs.Name, executionTime)
}()
execFn()
})

View File

@ -68,17 +68,23 @@ func (e *listWorkEstimator) estimate(r *http.Request, flowSchemaName, priorityLe
// pruner will eventually remove the CRD from the cache.
return WorkEstimate{InitialSeats: maximumSeats}
case err == ObjectCountNotFoundErr:
// there are two scenarios in which we can see this error:
// there are multiple scenarios in which we can see this error:
// a. the type is truly unknown, a typo on the caller's part.
// b. the count has gone stale for too long and the pruner
// has removed the type from the cache.
// we don't have a way to distinguish between a and b. b seems to indicate
// to a more severe case of degradation, although b can naturally trigger
// when a CRD is removed. let's be conservative and allocate maximum seats.
return WorkEstimate{InitialSeats: maximumSeats}
// c. the type is an aggregated resource that is served by a
// different apiserver (thus its object count is not updated)
// we don't have a way to distinguish between those situations.
// However, in case c, the request is delegated to a different apiserver,
// and thus its cost for our server is minimal. To avoid the situation
// when aggregated API calls are overestimated, we allocate the minimum
// possible seats (see #109106 as an example when being more conservative
// led to problems).
return WorkEstimate{InitialSeats: minimumSeats}
case err != nil:
// we should never be here since Get returns either ObjectCountStaleErr or
// ObjectCountNotFoundErr, return maximumSeats to be on the safe side.
klog.ErrorS(err, "Unexpected error from object count tracker")
return WorkEstimate{InitialSeats: maximumSeats}
}

View File

@ -1,39 +0,0 @@
/*
Copyright The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by applyconfiguration-gen. DO NOT EDIT.
package v1
// HostIPApplyConfiguration represents an declarative configuration of the HostIP type for use
// with apply.
type HostIPApplyConfiguration struct {
IP *string `json:"ip,omitempty"`
}
// HostIPApplyConfiguration constructs an declarative configuration of the HostIP type for use with
// apply.
func HostIP() *HostIPApplyConfiguration {
return &HostIPApplyConfiguration{}
}
// WithIP sets the IP field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the IP field is set to the value of the last call.
func (b *HostIPApplyConfiguration) WithIP(value string) *HostIPApplyConfiguration {
b.IP = &value
return b
}

View File

@ -32,7 +32,6 @@ type PodStatusApplyConfiguration struct {
Reason *string `json:"reason,omitempty"`
NominatedNodeName *string `json:"nominatedNodeName,omitempty"`
HostIP *string `json:"hostIP,omitempty"`
HostIPs []HostIPApplyConfiguration `json:"hostIPs,omitempty"`
PodIP *string `json:"podIP,omitempty"`
PodIPs []PodIPApplyConfiguration `json:"podIPs,omitempty"`
StartTime *metav1.Time `json:"startTime,omitempty"`
@ -101,19 +100,6 @@ func (b *PodStatusApplyConfiguration) WithHostIP(value string) *PodStatusApplyCo
return b
}
// WithHostIPs adds the given value to the HostIPs field in the declarative configuration
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
// If called multiple times, values provided by each call will be appended to the HostIPs field.
func (b *PodStatusApplyConfiguration) WithHostIPs(values ...*HostIPApplyConfiguration) *PodStatusApplyConfiguration {
for i := range values {
if values[i] == nil {
panic("nil value passed to WithHostIPs")
}
b.HostIPs = append(b.HostIPs, *values[i])
}
return b
}
// WithPodIP sets the PodIP field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the PodIP field is set to the value of the last call.

View File

@ -4629,12 +4629,6 @@ var schemaYAML = typed.YAMLObject(`types:
- name: ip
type:
scalar: string
- name: io.k8s.api.core.v1.HostIP
map:
fields:
- name: ip
type:
scalar: string
- name: io.k8s.api.core.v1.HostPathVolumeSource
map:
fields:
@ -5895,12 +5889,6 @@ var schemaYAML = typed.YAMLObject(`types:
- name: hostIP
type:
scalar: string
- name: hostIPs
type:
list:
elementType:
namedType: io.k8s.api.core.v1.HostIP
elementRelationship: associative
- name: initContainerStatuses
type:
list:
@ -9531,57 +9519,6 @@ var schemaYAML = typed.YAMLObject(`types:
- name: number
type:
scalar: numeric
- name: io.k8s.api.networking.v1alpha1.ClusterCIDRConfig
map:
fields:
- name: apiVersion
type:
scalar: string
- name: kind
type:
scalar: string
- name: metadata
type:
namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta
default: {}
- name: spec
type:
namedType: io.k8s.api.networking.v1alpha1.ClusterCIDRConfigSpec
default: {}
- name: status
type:
namedType: io.k8s.api.networking.v1alpha1.ClusterCIDRConfigStatus
default: {}
- name: io.k8s.api.networking.v1alpha1.ClusterCIDRConfigSpec
map:
fields:
- name: ipv4CIDR
type:
scalar: string
default: ""
- name: ipv6CIDR
type:
scalar: string
default: ""
- name: nodeSelector
type:
namedType: io.k8s.api.core.v1.NodeSelector
- name: perNodeHostBits
type:
scalar: numeric
default: 0
- name: io.k8s.api.networking.v1alpha1.ClusterCIDRConfigStatus
map:
elementType:
scalar: untyped
list:
elementType:
namedType: __untyped_atomic_
elementRelationship: atomic
map:
elementType:
namedType: __untyped_deduced_
elementRelationship: separable
- name: io.k8s.api.networking.v1beta1.HTTPIngressPath
map:
fields:

View File

@ -1,66 +0,0 @@
/*
Copyright The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by applyconfiguration-gen. DO NOT EDIT.
package v1
// ListMetaApplyConfiguration represents an declarative configuration of the ListMeta type for use
// with apply.
type ListMetaApplyConfiguration struct {
SelfLink *string `json:"selfLink,omitempty"`
ResourceVersion *string `json:"resourceVersion,omitempty"`
Continue *string `json:"continue,omitempty"`
RemainingItemCount *int64 `json:"remainingItemCount,omitempty"`
}
// ListMetaApplyConfiguration constructs an declarative configuration of the ListMeta type for use with
// apply.
func ListMeta() *ListMetaApplyConfiguration {
return &ListMetaApplyConfiguration{}
}
// WithSelfLink sets the SelfLink field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the SelfLink field is set to the value of the last call.
func (b *ListMetaApplyConfiguration) WithSelfLink(value string) *ListMetaApplyConfiguration {
b.SelfLink = &value
return b
}
// WithResourceVersion sets the ResourceVersion field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the ResourceVersion field is set to the value of the last call.
func (b *ListMetaApplyConfiguration) WithResourceVersion(value string) *ListMetaApplyConfiguration {
b.ResourceVersion = &value
return b
}
// WithContinue sets the Continue field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the Continue field is set to the value of the last call.
func (b *ListMetaApplyConfiguration) WithContinue(value string) *ListMetaApplyConfiguration {
b.Continue = &value
return b
}
// WithRemainingItemCount sets the RemainingItemCount field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the RemainingItemCount field is set to the value of the last call.
func (b *ListMetaApplyConfiguration) WithRemainingItemCount(value int64) *ListMetaApplyConfiguration {
b.RemainingItemCount = &value
return b
}

View File

@ -1,48 +0,0 @@
/*
Copyright The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by applyconfiguration-gen. DO NOT EDIT.
package v1alpha1
// CIDRConfigApplyConfiguration represents an declarative configuration of the CIDRConfig type for use
// with apply.
type CIDRConfigApplyConfiguration struct {
CIDR *string `json:"cidr,omitempty"`
PerNodeMaskSize *int32 `json:"perNodeMaskSize,omitempty"`
}
// CIDRConfigApplyConfiguration constructs an declarative configuration of the CIDRConfig type for use with
// apply.
func CIDRConfig() *CIDRConfigApplyConfiguration {
return &CIDRConfigApplyConfiguration{}
}
// WithCIDR sets the CIDR field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the CIDR field is set to the value of the last call.
func (b *CIDRConfigApplyConfiguration) WithCIDR(value string) *CIDRConfigApplyConfiguration {
b.CIDR = &value
return b
}
// WithPerNodeMaskSize sets the PerNodeMaskSize field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the PerNodeMaskSize field is set to the value of the last call.
func (b *CIDRConfigApplyConfiguration) WithPerNodeMaskSize(value int32) *CIDRConfigApplyConfiguration {
b.PerNodeMaskSize = &value
return b
}

View File

@ -1,256 +0,0 @@
/*
Copyright The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by applyconfiguration-gen. DO NOT EDIT.
package v1alpha1
import (
networkingv1alpha1 "k8s.io/api/networking/v1alpha1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
managedfields "k8s.io/apimachinery/pkg/util/managedfields"
internal "k8s.io/client-go/applyconfigurations/internal"
v1 "k8s.io/client-go/applyconfigurations/meta/v1"
)
// ClusterCIDRConfigApplyConfiguration represents an declarative configuration of the ClusterCIDRConfig type for use
// with apply.
type ClusterCIDRConfigApplyConfiguration struct {
v1.TypeMetaApplyConfiguration `json:",inline"`
*v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"`
Spec *ClusterCIDRConfigSpecApplyConfiguration `json:"spec,omitempty"`
Status *networkingv1alpha1.ClusterCIDRConfigStatus `json:"status,omitempty"`
}
// ClusterCIDRConfig constructs an declarative configuration of the ClusterCIDRConfig type for use with
// apply.
func ClusterCIDRConfig(name string) *ClusterCIDRConfigApplyConfiguration {
b := &ClusterCIDRConfigApplyConfiguration{}
b.WithName(name)
b.WithKind("ClusterCIDRConfig")
b.WithAPIVersion("networking.k8s.io/v1alpha1")
return b
}
// ExtractClusterCIDRConfig extracts the applied configuration owned by fieldManager from
// clusterCIDRConfig. If no managedFields are found in clusterCIDRConfig for fieldManager, a
// ClusterCIDRConfigApplyConfiguration is returned with only the Name, Namespace (if applicable),
// APIVersion and Kind populated. It is possible that no managed fields were found for because other
// field managers have taken ownership of all the fields previously owned by fieldManager, or because
// the fieldManager never owned fields any fields.
// clusterCIDRConfig must be a unmodified ClusterCIDRConfig API object that was retrieved from the Kubernetes API.
// ExtractClusterCIDRConfig provides a way to perform a extract/modify-in-place/apply workflow.
// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously
// applied if another fieldManager has updated or force applied any of the previously applied fields.
// Experimental!
func ExtractClusterCIDRConfig(clusterCIDRConfig *networkingv1alpha1.ClusterCIDRConfig, fieldManager string) (*ClusterCIDRConfigApplyConfiguration, error) {
return extractClusterCIDRConfig(clusterCIDRConfig, fieldManager, "")
}
// ExtractClusterCIDRConfigStatus is the same as ExtractClusterCIDRConfig except
// that it extracts the status subresource applied configuration.
// Experimental!
func ExtractClusterCIDRConfigStatus(clusterCIDRConfig *networkingv1alpha1.ClusterCIDRConfig, fieldManager string) (*ClusterCIDRConfigApplyConfiguration, error) {
return extractClusterCIDRConfig(clusterCIDRConfig, fieldManager, "status")
}
func extractClusterCIDRConfig(clusterCIDRConfig *networkingv1alpha1.ClusterCIDRConfig, fieldManager string, subresource string) (*ClusterCIDRConfigApplyConfiguration, error) {
b := &ClusterCIDRConfigApplyConfiguration{}
err := managedfields.ExtractInto(clusterCIDRConfig, internal.Parser().Type("io.k8s.api.networking.v1alpha1.ClusterCIDRConfig"), fieldManager, b, subresource)
if err != nil {
return nil, err
}
b.WithName(clusterCIDRConfig.Name)
b.WithKind("ClusterCIDRConfig")
b.WithAPIVersion("networking.k8s.io/v1alpha1")
return b, nil
}
// WithKind sets the Kind field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the Kind field is set to the value of the last call.
func (b *ClusterCIDRConfigApplyConfiguration) WithKind(value string) *ClusterCIDRConfigApplyConfiguration {
b.Kind = &value
return b
}
// WithAPIVersion sets the APIVersion field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the APIVersion field is set to the value of the last call.
func (b *ClusterCIDRConfigApplyConfiguration) WithAPIVersion(value string) *ClusterCIDRConfigApplyConfiguration {
b.APIVersion = &value
return b
}
// WithName sets the Name field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the Name field is set to the value of the last call.
func (b *ClusterCIDRConfigApplyConfiguration) WithName(value string) *ClusterCIDRConfigApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.Name = &value
return b
}
// WithGenerateName sets the GenerateName field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the GenerateName field is set to the value of the last call.
func (b *ClusterCIDRConfigApplyConfiguration) WithGenerateName(value string) *ClusterCIDRConfigApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.GenerateName = &value
return b
}
// WithNamespace sets the Namespace field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the Namespace field is set to the value of the last call.
func (b *ClusterCIDRConfigApplyConfiguration) WithNamespace(value string) *ClusterCIDRConfigApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.Namespace = &value
return b
}
// WithUID sets the UID field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the UID field is set to the value of the last call.
func (b *ClusterCIDRConfigApplyConfiguration) WithUID(value types.UID) *ClusterCIDRConfigApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.UID = &value
return b
}
// WithResourceVersion sets the ResourceVersion field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the ResourceVersion field is set to the value of the last call.
func (b *ClusterCIDRConfigApplyConfiguration) WithResourceVersion(value string) *ClusterCIDRConfigApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.ResourceVersion = &value
return b
}
// WithGeneration sets the Generation field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the Generation field is set to the value of the last call.
func (b *ClusterCIDRConfigApplyConfiguration) WithGeneration(value int64) *ClusterCIDRConfigApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.Generation = &value
return b
}
// WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the CreationTimestamp field is set to the value of the last call.
func (b *ClusterCIDRConfigApplyConfiguration) WithCreationTimestamp(value metav1.Time) *ClusterCIDRConfigApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.CreationTimestamp = &value
return b
}
// WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the DeletionTimestamp field is set to the value of the last call.
func (b *ClusterCIDRConfigApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *ClusterCIDRConfigApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.DeletionTimestamp = &value
return b
}
// WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call.
func (b *ClusterCIDRConfigApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *ClusterCIDRConfigApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.DeletionGracePeriodSeconds = &value
return b
}
// WithLabels puts the entries into the Labels field in the declarative configuration
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
// If called multiple times, the entries provided by each call will be put on the Labels field,
// overwriting an existing map entries in Labels field with the same key.
func (b *ClusterCIDRConfigApplyConfiguration) WithLabels(entries map[string]string) *ClusterCIDRConfigApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
if b.Labels == nil && len(entries) > 0 {
b.Labels = make(map[string]string, len(entries))
}
for k, v := range entries {
b.Labels[k] = v
}
return b
}
// WithAnnotations puts the entries into the Annotations field in the declarative configuration
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
// If called multiple times, the entries provided by each call will be put on the Annotations field,
// overwriting an existing map entries in Annotations field with the same key.
func (b *ClusterCIDRConfigApplyConfiguration) WithAnnotations(entries map[string]string) *ClusterCIDRConfigApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
if b.Annotations == nil && len(entries) > 0 {
b.Annotations = make(map[string]string, len(entries))
}
for k, v := range entries {
b.Annotations[k] = v
}
return b
}
// WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
// If called multiple times, values provided by each call will be appended to the OwnerReferences field.
func (b *ClusterCIDRConfigApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *ClusterCIDRConfigApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
for i := range values {
if values[i] == nil {
panic("nil value passed to WithOwnerReferences")
}
b.OwnerReferences = append(b.OwnerReferences, *values[i])
}
return b
}
// WithFinalizers adds the given value to the Finalizers field in the declarative configuration
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
// If called multiple times, values provided by each call will be appended to the Finalizers field.
func (b *ClusterCIDRConfigApplyConfiguration) WithFinalizers(values ...string) *ClusterCIDRConfigApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
for i := range values {
b.Finalizers = append(b.Finalizers, values[i])
}
return b
}
func (b *ClusterCIDRConfigApplyConfiguration) ensureObjectMetaApplyConfigurationExists() {
if b.ObjectMetaApplyConfiguration == nil {
b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{}
}
}
// WithSpec sets the Spec field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the Spec field is set to the value of the last call.
func (b *ClusterCIDRConfigApplyConfiguration) WithSpec(value *ClusterCIDRConfigSpecApplyConfiguration) *ClusterCIDRConfigApplyConfiguration {
b.Spec = value
return b
}
// WithStatus sets the Status field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the Status field is set to the value of the last call.
func (b *ClusterCIDRConfigApplyConfiguration) WithStatus(value networkingv1alpha1.ClusterCIDRConfigStatus) *ClusterCIDRConfigApplyConfiguration {
b.Status = &value
return b
}

View File

@ -1,70 +0,0 @@
/*
Copyright The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by applyconfiguration-gen. DO NOT EDIT.
package v1alpha1
import (
v1 "k8s.io/client-go/applyconfigurations/core/v1"
)
// ClusterCIDRConfigSpecApplyConfiguration represents an declarative configuration of the ClusterCIDRConfigSpec type for use
// with apply.
type ClusterCIDRConfigSpecApplyConfiguration struct {
NodeSelector *v1.NodeSelectorApplyConfiguration `json:"nodeSelector,omitempty"`
PerNodeHostBits *int32 `json:"perNodeHostBits,omitempty"`
IPv4CIDR *string `json:"ipv4CIDR,omitempty"`
IPv6CIDR *string `json:"ipv6CIDR,omitempty"`
}
// ClusterCIDRConfigSpecApplyConfiguration constructs an declarative configuration of the ClusterCIDRConfigSpec type for use with
// apply.
func ClusterCIDRConfigSpec() *ClusterCIDRConfigSpecApplyConfiguration {
return &ClusterCIDRConfigSpecApplyConfiguration{}
}
// WithNodeSelector sets the NodeSelector field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the NodeSelector field is set to the value of the last call.
func (b *ClusterCIDRConfigSpecApplyConfiguration) WithNodeSelector(value *v1.NodeSelectorApplyConfiguration) *ClusterCIDRConfigSpecApplyConfiguration {
b.NodeSelector = value
return b
}
// WithPerNodeHostBits sets the PerNodeHostBits field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the PerNodeHostBits field is set to the value of the last call.
func (b *ClusterCIDRConfigSpecApplyConfiguration) WithPerNodeHostBits(value int32) *ClusterCIDRConfigSpecApplyConfiguration {
b.PerNodeHostBits = &value
return b
}
// WithIPv4CIDR sets the IPv4CIDR field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the IPv4CIDR field is set to the value of the last call.
func (b *ClusterCIDRConfigSpecApplyConfiguration) WithIPv4CIDR(value string) *ClusterCIDRConfigSpecApplyConfiguration {
b.IPv4CIDR = &value
return b
}
// WithIPv6CIDR sets the IPv6CIDR field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the IPv6CIDR field is set to the value of the last call.
func (b *ClusterCIDRConfigSpecApplyConfiguration) WithIPv6CIDR(value string) *ClusterCIDRConfigSpecApplyConfiguration {
b.IPv6CIDR = &value
return b
}

View File

@ -1,48 +0,0 @@
/*
Copyright The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by applyconfiguration-gen. DO NOT EDIT.
package v1alpha1
import (
v1 "k8s.io/client-go/applyconfigurations/meta/v1"
)
// ClusterCIDRConfigStatusApplyConfiguration represents an declarative configuration of the ClusterCIDRConfigStatus type for use
// with apply.
type ClusterCIDRConfigStatusApplyConfiguration struct {
Conditions []v1.ConditionApplyConfiguration `json:"conditions,omitempty"`
}
// ClusterCIDRConfigStatusApplyConfiguration constructs an declarative configuration of the ClusterCIDRConfigStatus type for use with
// apply.
func ClusterCIDRConfigStatus() *ClusterCIDRConfigStatusApplyConfiguration {
return &ClusterCIDRConfigStatusApplyConfiguration{}
}
// WithConditions adds the given value to the Conditions field in the declarative configuration
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
// If called multiple times, values provided by each call will be appended to the Conditions field.
func (b *ClusterCIDRConfigStatusApplyConfiguration) WithConditions(values ...*v1.ConditionApplyConfiguration) *ClusterCIDRConfigStatusApplyConfiguration {
for i := range values {
if values[i] == nil {
panic("nil value passed to WithConditions")
}
b.Conditions = append(b.Conditions, *values[i])
}
return b
}

View File

@ -47,7 +47,6 @@ import (
flowcontrolv1beta1 "k8s.io/api/flowcontrol/v1beta1"
flowcontrolv1beta2 "k8s.io/api/flowcontrol/v1beta2"
networkingv1 "k8s.io/api/networking/v1"
networkingv1alpha1 "k8s.io/api/networking/v1alpha1"
networkingv1beta1 "k8s.io/api/networking/v1beta1"
nodev1 "k8s.io/api/node/v1"
nodev1alpha1 "k8s.io/api/node/v1alpha1"
@ -273,10 +272,6 @@ func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource
case networkingv1.SchemeGroupVersion.WithResource("networkpolicies"):
return &genericInformer{resource: resource.GroupResource(), informer: f.Networking().V1().NetworkPolicies().Informer()}, nil
// Group=networking.k8s.io, Version=v1alpha1
case networkingv1alpha1.SchemeGroupVersion.WithResource("clustercidrconfigs"):
return &genericInformer{resource: resource.GroupResource(), informer: f.Networking().V1alpha1().ClusterCIDRConfigs().Informer()}, nil
// Group=networking.k8s.io, Version=v1beta1
case networkingv1beta1.SchemeGroupVersion.WithResource("ingresses"):
return &genericInformer{resource: resource.GroupResource(), informer: f.Networking().V1beta1().Ingresses().Informer()}, nil

View File

@ -21,7 +21,6 @@ package networking
import (
internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
v1 "k8s.io/client-go/informers/networking/v1"
v1alpha1 "k8s.io/client-go/informers/networking/v1alpha1"
v1beta1 "k8s.io/client-go/informers/networking/v1beta1"
)
@ -29,8 +28,6 @@ import (
type Interface interface {
// V1 provides access to shared informers for resources in V1.
V1() v1.Interface
// V1alpha1 provides access to shared informers for resources in V1alpha1.
V1alpha1() v1alpha1.Interface
// V1beta1 provides access to shared informers for resources in V1beta1.
V1beta1() v1beta1.Interface
}
@ -51,11 +48,6 @@ func (g *group) V1() v1.Interface {
return v1.New(g.factory, g.namespace, g.tweakListOptions)
}
// V1alpha1 returns a new v1alpha1.Interface.
func (g *group) V1alpha1() v1alpha1.Interface {
return v1alpha1.New(g.factory, g.namespace, g.tweakListOptions)
}
// V1beta1 returns a new v1beta1.Interface.
func (g *group) V1beta1() v1beta1.Interface {
return v1beta1.New(g.factory, g.namespace, g.tweakListOptions)

View File

@ -1,89 +0,0 @@
/*
Copyright The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by informer-gen. DO NOT EDIT.
package v1alpha1
import (
"context"
time "time"
networkingv1alpha1 "k8s.io/api/networking/v1alpha1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
runtime "k8s.io/apimachinery/pkg/runtime"
watch "k8s.io/apimachinery/pkg/watch"
internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
kubernetes "k8s.io/client-go/kubernetes"
v1alpha1 "k8s.io/client-go/listers/networking/v1alpha1"
cache "k8s.io/client-go/tools/cache"
)
// ClusterCIDRConfigInformer provides access to a shared informer and lister for
// ClusterCIDRConfigs.
type ClusterCIDRConfigInformer interface {
Informer() cache.SharedIndexInformer
Lister() v1alpha1.ClusterCIDRConfigLister
}
type clusterCIDRConfigInformer struct {
factory internalinterfaces.SharedInformerFactory
tweakListOptions internalinterfaces.TweakListOptionsFunc
}
// NewClusterCIDRConfigInformer constructs a new informer for ClusterCIDRConfig type.
// Always prefer using an informer factory to get a shared informer instead of getting an independent
// one. This reduces memory footprint and number of connections to the server.
func NewClusterCIDRConfigInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
return NewFilteredClusterCIDRConfigInformer(client, resyncPeriod, indexers, nil)
}
// NewFilteredClusterCIDRConfigInformer constructs a new informer for ClusterCIDRConfig type.
// Always prefer using an informer factory to get a shared informer instead of getting an independent
// one. This reduces memory footprint and number of connections to the server.
func NewFilteredClusterCIDRConfigInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
return cache.NewSharedIndexInformer(
&cache.ListWatch{
ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
if tweakListOptions != nil {
tweakListOptions(&options)
}
return client.NetworkingV1alpha1().ClusterCIDRConfigs().List(context.TODO(), options)
},
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
if tweakListOptions != nil {
tweakListOptions(&options)
}
return client.NetworkingV1alpha1().ClusterCIDRConfigs().Watch(context.TODO(), options)
},
},
&networkingv1alpha1.ClusterCIDRConfig{},
resyncPeriod,
indexers,
)
}
func (f *clusterCIDRConfigInformer) defaultInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
return NewFilteredClusterCIDRConfigInformer(client, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
}
func (f *clusterCIDRConfigInformer) Informer() cache.SharedIndexInformer {
return f.factory.InformerFor(&networkingv1alpha1.ClusterCIDRConfig{}, f.defaultInformer)
}
func (f *clusterCIDRConfigInformer) Lister() v1alpha1.ClusterCIDRConfigLister {
return v1alpha1.NewClusterCIDRConfigLister(f.Informer().GetIndexer())
}

View File

@ -1,45 +0,0 @@
/*
Copyright The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by informer-gen. DO NOT EDIT.
package v1alpha1
import (
internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
)
// Interface provides access to all the informers in this group version.
type Interface interface {
// ClusterCIDRConfigs returns a ClusterCIDRConfigInformer.
ClusterCIDRConfigs() ClusterCIDRConfigInformer
}
type version struct {
factory internalinterfaces.SharedInformerFactory
namespace string
tweakListOptions internalinterfaces.TweakListOptionsFunc
}
// New returns a new Interface.
func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) Interface {
return &version{factory: f, namespace: namespace, tweakListOptions: tweakListOptions}
}
// ClusterCIDRConfigs returns a ClusterCIDRConfigInformer.
func (v *version) ClusterCIDRConfigs() ClusterCIDRConfigInformer {
return &clusterCIDRConfigInformer{factory: v.factory, tweakListOptions: v.tweakListOptions}
}

View File

@ -53,7 +53,6 @@ import (
flowcontrolv1beta1 "k8s.io/client-go/kubernetes/typed/flowcontrol/v1beta1"
flowcontrolv1beta2 "k8s.io/client-go/kubernetes/typed/flowcontrol/v1beta2"
networkingv1 "k8s.io/client-go/kubernetes/typed/networking/v1"
networkingv1alpha1 "k8s.io/client-go/kubernetes/typed/networking/v1alpha1"
networkingv1beta1 "k8s.io/client-go/kubernetes/typed/networking/v1beta1"
nodev1 "k8s.io/client-go/kubernetes/typed/node/v1"
nodev1alpha1 "k8s.io/client-go/kubernetes/typed/node/v1alpha1"
@ -105,7 +104,6 @@ type Interface interface {
FlowcontrolV1beta1() flowcontrolv1beta1.FlowcontrolV1beta1Interface
FlowcontrolV1beta2() flowcontrolv1beta2.FlowcontrolV1beta2Interface
NetworkingV1() networkingv1.NetworkingV1Interface
NetworkingV1alpha1() networkingv1alpha1.NetworkingV1alpha1Interface
NetworkingV1beta1() networkingv1beta1.NetworkingV1beta1Interface
NodeV1() nodev1.NodeV1Interface
NodeV1alpha1() nodev1alpha1.NodeV1alpha1Interface
@ -157,7 +155,6 @@ type Clientset struct {
flowcontrolV1beta1 *flowcontrolv1beta1.FlowcontrolV1beta1Client
flowcontrolV1beta2 *flowcontrolv1beta2.FlowcontrolV1beta2Client
networkingV1 *networkingv1.NetworkingV1Client
networkingV1alpha1 *networkingv1alpha1.NetworkingV1alpha1Client
networkingV1beta1 *networkingv1beta1.NetworkingV1beta1Client
nodeV1 *nodev1.NodeV1Client
nodeV1alpha1 *nodev1alpha1.NodeV1alpha1Client
@ -325,11 +322,6 @@ func (c *Clientset) NetworkingV1() networkingv1.NetworkingV1Interface {
return c.networkingV1
}
// NetworkingV1alpha1 retrieves the NetworkingV1alpha1Client
func (c *Clientset) NetworkingV1alpha1() networkingv1alpha1.NetworkingV1alpha1Interface {
return c.networkingV1alpha1
}
// NetworkingV1beta1 retrieves the NetworkingV1beta1Client
func (c *Clientset) NetworkingV1beta1() networkingv1beta1.NetworkingV1beta1Interface {
return c.networkingV1beta1
@ -569,10 +561,6 @@ func NewForConfigAndClient(c *rest.Config, httpClient *http.Client) (*Clientset,
if err != nil {
return nil, err
}
cs.networkingV1alpha1, err = networkingv1alpha1.NewForConfigAndClient(&configShallowCopy, httpClient)
if err != nil {
return nil, err
}
cs.networkingV1beta1, err = networkingv1beta1.NewForConfigAndClient(&configShallowCopy, httpClient)
if err != nil {
return nil, err
@ -684,7 +672,6 @@ func New(c rest.Interface) *Clientset {
cs.flowcontrolV1beta1 = flowcontrolv1beta1.New(c)
cs.flowcontrolV1beta2 = flowcontrolv1beta2.New(c)
cs.networkingV1 = networkingv1.New(c)
cs.networkingV1alpha1 = networkingv1alpha1.New(c)
cs.networkingV1beta1 = networkingv1beta1.New(c)
cs.nodeV1 = nodev1.New(c)
cs.nodeV1alpha1 = nodev1alpha1.New(c)

View File

@ -84,8 +84,6 @@ import (
fakeflowcontrolv1beta2 "k8s.io/client-go/kubernetes/typed/flowcontrol/v1beta2/fake"
networkingv1 "k8s.io/client-go/kubernetes/typed/networking/v1"
fakenetworkingv1 "k8s.io/client-go/kubernetes/typed/networking/v1/fake"
networkingv1alpha1 "k8s.io/client-go/kubernetes/typed/networking/v1alpha1"
fakenetworkingv1alpha1 "k8s.io/client-go/kubernetes/typed/networking/v1alpha1/fake"
networkingv1beta1 "k8s.io/client-go/kubernetes/typed/networking/v1beta1"
fakenetworkingv1beta1 "k8s.io/client-go/kubernetes/typed/networking/v1beta1/fake"
nodev1 "k8s.io/client-go/kubernetes/typed/node/v1"
@ -319,11 +317,6 @@ func (c *Clientset) NetworkingV1() networkingv1.NetworkingV1Interface {
return &fakenetworkingv1.FakeNetworkingV1{Fake: &c.Fake}
}
// NetworkingV1alpha1 retrieves the NetworkingV1alpha1Client
func (c *Clientset) NetworkingV1alpha1() networkingv1alpha1.NetworkingV1alpha1Interface {
return &fakenetworkingv1alpha1.FakeNetworkingV1alpha1{Fake: &c.Fake}
}
// NetworkingV1beta1 retrieves the NetworkingV1beta1Client
func (c *Clientset) NetworkingV1beta1() networkingv1beta1.NetworkingV1beta1Interface {
return &fakenetworkingv1beta1.FakeNetworkingV1beta1{Fake: &c.Fake}

View File

@ -49,7 +49,6 @@ import (
flowcontrolv1beta1 "k8s.io/api/flowcontrol/v1beta1"
flowcontrolv1beta2 "k8s.io/api/flowcontrol/v1beta2"
networkingv1 "k8s.io/api/networking/v1"
networkingv1alpha1 "k8s.io/api/networking/v1alpha1"
networkingv1beta1 "k8s.io/api/networking/v1beta1"
nodev1 "k8s.io/api/node/v1"
nodev1alpha1 "k8s.io/api/node/v1alpha1"
@ -106,7 +105,6 @@ var localSchemeBuilder = runtime.SchemeBuilder{
flowcontrolv1beta1.AddToScheme,
flowcontrolv1beta2.AddToScheme,
networkingv1.AddToScheme,
networkingv1alpha1.AddToScheme,
networkingv1beta1.AddToScheme,
nodev1.AddToScheme,
nodev1alpha1.AddToScheme,

View File

@ -49,7 +49,6 @@ import (
flowcontrolv1beta1 "k8s.io/api/flowcontrol/v1beta1"
flowcontrolv1beta2 "k8s.io/api/flowcontrol/v1beta2"
networkingv1 "k8s.io/api/networking/v1"
networkingv1alpha1 "k8s.io/api/networking/v1alpha1"
networkingv1beta1 "k8s.io/api/networking/v1beta1"
nodev1 "k8s.io/api/node/v1"
nodev1alpha1 "k8s.io/api/node/v1alpha1"
@ -106,7 +105,6 @@ var localSchemeBuilder = runtime.SchemeBuilder{
flowcontrolv1beta1.AddToScheme,
flowcontrolv1beta2.AddToScheme,
networkingv1.AddToScheme,
networkingv1alpha1.AddToScheme,
networkingv1beta1.AddToScheme,
nodev1.AddToScheme,
nodev1alpha1.AddToScheme,

View File

@ -1,243 +0,0 @@
/*
Copyright The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by client-gen. DO NOT EDIT.
package v1alpha1
import (
"context"
json "encoding/json"
"fmt"
"time"
v1alpha1 "k8s.io/api/networking/v1alpha1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
networkingv1alpha1 "k8s.io/client-go/applyconfigurations/networking/v1alpha1"
scheme "k8s.io/client-go/kubernetes/scheme"
rest "k8s.io/client-go/rest"
)
// ClusterCIDRConfigsGetter has a method to return a ClusterCIDRConfigInterface.
// A group's client should implement this interface.
type ClusterCIDRConfigsGetter interface {
ClusterCIDRConfigs() ClusterCIDRConfigInterface
}
// ClusterCIDRConfigInterface has methods to work with ClusterCIDRConfig resources.
type ClusterCIDRConfigInterface interface {
Create(ctx context.Context, clusterCIDRConfig *v1alpha1.ClusterCIDRConfig, opts v1.CreateOptions) (*v1alpha1.ClusterCIDRConfig, error)
Update(ctx context.Context, clusterCIDRConfig *v1alpha1.ClusterCIDRConfig, opts v1.UpdateOptions) (*v1alpha1.ClusterCIDRConfig, error)
UpdateStatus(ctx context.Context, clusterCIDRConfig *v1alpha1.ClusterCIDRConfig, opts v1.UpdateOptions) (*v1alpha1.ClusterCIDRConfig, error)
Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha1.ClusterCIDRConfig, error)
List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.ClusterCIDRConfigList, error)
Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error)
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.ClusterCIDRConfig, err error)
Apply(ctx context.Context, clusterCIDRConfig *networkingv1alpha1.ClusterCIDRConfigApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.ClusterCIDRConfig, err error)
ApplyStatus(ctx context.Context, clusterCIDRConfig *networkingv1alpha1.ClusterCIDRConfigApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.ClusterCIDRConfig, err error)
ClusterCIDRConfigExpansion
}
// clusterCIDRConfigs implements ClusterCIDRConfigInterface
type clusterCIDRConfigs struct {
client rest.Interface
}
// newClusterCIDRConfigs returns a ClusterCIDRConfigs
func newClusterCIDRConfigs(c *NetworkingV1alpha1Client) *clusterCIDRConfigs {
return &clusterCIDRConfigs{
client: c.RESTClient(),
}
}
// Get takes name of the clusterCIDRConfig, and returns the corresponding clusterCIDRConfig object, and an error if there is any.
func (c *clusterCIDRConfigs) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.ClusterCIDRConfig, err error) {
result = &v1alpha1.ClusterCIDRConfig{}
err = c.client.Get().
Resource("clustercidrconfigs").
Name(name).
VersionedParams(&options, scheme.ParameterCodec).
Do(ctx).
Into(result)
return
}
// List takes label and field selectors, and returns the list of ClusterCIDRConfigs that match those selectors.
func (c *clusterCIDRConfigs) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.ClusterCIDRConfigList, err error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
result = &v1alpha1.ClusterCIDRConfigList{}
err = c.client.Get().
Resource("clustercidrconfigs").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Do(ctx).
Into(result)
return
}
// Watch returns a watch.Interface that watches the requested clusterCIDRConfigs.
func (c *clusterCIDRConfigs) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
opts.Watch = true
return c.client.Get().
Resource("clustercidrconfigs").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Watch(ctx)
}
// Create takes the representation of a clusterCIDRConfig and creates it. Returns the server's representation of the clusterCIDRConfig, and an error, if there is any.
func (c *clusterCIDRConfigs) Create(ctx context.Context, clusterCIDRConfig *v1alpha1.ClusterCIDRConfig, opts v1.CreateOptions) (result *v1alpha1.ClusterCIDRConfig, err error) {
result = &v1alpha1.ClusterCIDRConfig{}
err = c.client.Post().
Resource("clustercidrconfigs").
VersionedParams(&opts, scheme.ParameterCodec).
Body(clusterCIDRConfig).
Do(ctx).
Into(result)
return
}
// Update takes the representation of a clusterCIDRConfig and updates it. Returns the server's representation of the clusterCIDRConfig, and an error, if there is any.
func (c *clusterCIDRConfigs) Update(ctx context.Context, clusterCIDRConfig *v1alpha1.ClusterCIDRConfig, opts v1.UpdateOptions) (result *v1alpha1.ClusterCIDRConfig, err error) {
result = &v1alpha1.ClusterCIDRConfig{}
err = c.client.Put().
Resource("clustercidrconfigs").
Name(clusterCIDRConfig.Name).
VersionedParams(&opts, scheme.ParameterCodec).
Body(clusterCIDRConfig).
Do(ctx).
Into(result)
return
}
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *clusterCIDRConfigs) UpdateStatus(ctx context.Context, clusterCIDRConfig *v1alpha1.ClusterCIDRConfig, opts v1.UpdateOptions) (result *v1alpha1.ClusterCIDRConfig, err error) {
result = &v1alpha1.ClusterCIDRConfig{}
err = c.client.Put().
Resource("clustercidrconfigs").
Name(clusterCIDRConfig.Name).
SubResource("status").
VersionedParams(&opts, scheme.ParameterCodec).
Body(clusterCIDRConfig).
Do(ctx).
Into(result)
return
}
// Delete takes name of the clusterCIDRConfig and deletes it. Returns an error if one occurs.
func (c *clusterCIDRConfigs) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
return c.client.Delete().
Resource("clustercidrconfigs").
Name(name).
Body(&opts).
Do(ctx).
Error()
}
// DeleteCollection deletes a collection of objects.
func (c *clusterCIDRConfigs) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
var timeout time.Duration
if listOpts.TimeoutSeconds != nil {
timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
}
return c.client.Delete().
Resource("clustercidrconfigs").
VersionedParams(&listOpts, scheme.ParameterCodec).
Timeout(timeout).
Body(&opts).
Do(ctx).
Error()
}
// Patch applies the patch and returns the patched clusterCIDRConfig.
func (c *clusterCIDRConfigs) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.ClusterCIDRConfig, err error) {
result = &v1alpha1.ClusterCIDRConfig{}
err = c.client.Patch(pt).
Resource("clustercidrconfigs").
Name(name).
SubResource(subresources...).
VersionedParams(&opts, scheme.ParameterCodec).
Body(data).
Do(ctx).
Into(result)
return
}
// Apply takes the given apply declarative configuration, applies it and returns the applied clusterCIDRConfig.
func (c *clusterCIDRConfigs) Apply(ctx context.Context, clusterCIDRConfig *networkingv1alpha1.ClusterCIDRConfigApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.ClusterCIDRConfig, err error) {
if clusterCIDRConfig == nil {
return nil, fmt.Errorf("clusterCIDRConfig provided to Apply must not be nil")
}
patchOpts := opts.ToPatchOptions()
data, err := json.Marshal(clusterCIDRConfig)
if err != nil {
return nil, err
}
name := clusterCIDRConfig.Name
if name == nil {
return nil, fmt.Errorf("clusterCIDRConfig.Name must be provided to Apply")
}
result = &v1alpha1.ClusterCIDRConfig{}
err = c.client.Patch(types.ApplyPatchType).
Resource("clustercidrconfigs").
Name(*name).
VersionedParams(&patchOpts, scheme.ParameterCodec).
Body(data).
Do(ctx).
Into(result)
return
}
// ApplyStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus().
func (c *clusterCIDRConfigs) ApplyStatus(ctx context.Context, clusterCIDRConfig *networkingv1alpha1.ClusterCIDRConfigApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.ClusterCIDRConfig, err error) {
if clusterCIDRConfig == nil {
return nil, fmt.Errorf("clusterCIDRConfig provided to Apply must not be nil")
}
patchOpts := opts.ToPatchOptions()
data, err := json.Marshal(clusterCIDRConfig)
if err != nil {
return nil, err
}
name := clusterCIDRConfig.Name
if name == nil {
return nil, fmt.Errorf("clusterCIDRConfig.Name must be provided to Apply")
}
result = &v1alpha1.ClusterCIDRConfig{}
err = c.client.Patch(types.ApplyPatchType).
Resource("clustercidrconfigs").
Name(*name).
SubResource("status").
VersionedParams(&patchOpts, scheme.ParameterCodec).
Body(data).
Do(ctx).
Into(result)
return
}

View File

@ -1,20 +0,0 @@
/*
Copyright The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by client-gen. DO NOT EDIT.
// This package has the automatically generated typed clients.
package v1alpha1

View File

@ -1,20 +0,0 @@
/*
Copyright The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by client-gen. DO NOT EDIT.
// Package fake has the automatically generated clients.
package fake

View File

@ -1,179 +0,0 @@
/*
Copyright The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by client-gen. DO NOT EDIT.
package fake
import (
"context"
json "encoding/json"
"fmt"
v1alpha1 "k8s.io/api/networking/v1alpha1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
labels "k8s.io/apimachinery/pkg/labels"
schema "k8s.io/apimachinery/pkg/runtime/schema"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
networkingv1alpha1 "k8s.io/client-go/applyconfigurations/networking/v1alpha1"
testing "k8s.io/client-go/testing"
)
// FakeClusterCIDRConfigs implements ClusterCIDRConfigInterface
type FakeClusterCIDRConfigs struct {
Fake *FakeNetworkingV1alpha1
}
var clustercidrconfigsResource = schema.GroupVersionResource{Group: "networking.k8s.io", Version: "v1alpha1", Resource: "clustercidrconfigs"}
var clustercidrconfigsKind = schema.GroupVersionKind{Group: "networking.k8s.io", Version: "v1alpha1", Kind: "ClusterCIDRConfig"}
// Get takes name of the clusterCIDRConfig, and returns the corresponding clusterCIDRConfig object, and an error if there is any.
func (c *FakeClusterCIDRConfigs) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.ClusterCIDRConfig, err error) {
obj, err := c.Fake.
Invokes(testing.NewRootGetAction(clustercidrconfigsResource, name), &v1alpha1.ClusterCIDRConfig{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.ClusterCIDRConfig), err
}
// List takes label and field selectors, and returns the list of ClusterCIDRConfigs that match those selectors.
func (c *FakeClusterCIDRConfigs) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.ClusterCIDRConfigList, err error) {
obj, err := c.Fake.
Invokes(testing.NewRootListAction(clustercidrconfigsResource, clustercidrconfigsKind, opts), &v1alpha1.ClusterCIDRConfigList{})
if obj == nil {
return nil, err
}
label, _, _ := testing.ExtractFromListOptions(opts)
if label == nil {
label = labels.Everything()
}
list := &v1alpha1.ClusterCIDRConfigList{ListMeta: obj.(*v1alpha1.ClusterCIDRConfigList).ListMeta}
for _, item := range obj.(*v1alpha1.ClusterCIDRConfigList).Items {
if label.Matches(labels.Set(item.Labels)) {
list.Items = append(list.Items, item)
}
}
return list, err
}
// Watch returns a watch.Interface that watches the requested clusterCIDRConfigs.
func (c *FakeClusterCIDRConfigs) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(testing.NewRootWatchAction(clustercidrconfigsResource, opts))
}
// Create takes the representation of a clusterCIDRConfig and creates it. Returns the server's representation of the clusterCIDRConfig, and an error, if there is any.
func (c *FakeClusterCIDRConfigs) Create(ctx context.Context, clusterCIDRConfig *v1alpha1.ClusterCIDRConfig, opts v1.CreateOptions) (result *v1alpha1.ClusterCIDRConfig, err error) {
obj, err := c.Fake.
Invokes(testing.NewRootCreateAction(clustercidrconfigsResource, clusterCIDRConfig), &v1alpha1.ClusterCIDRConfig{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.ClusterCIDRConfig), err
}
// Update takes the representation of a clusterCIDRConfig and updates it. Returns the server's representation of the clusterCIDRConfig, and an error, if there is any.
func (c *FakeClusterCIDRConfigs) Update(ctx context.Context, clusterCIDRConfig *v1alpha1.ClusterCIDRConfig, opts v1.UpdateOptions) (result *v1alpha1.ClusterCIDRConfig, err error) {
obj, err := c.Fake.
Invokes(testing.NewRootUpdateAction(clustercidrconfigsResource, clusterCIDRConfig), &v1alpha1.ClusterCIDRConfig{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.ClusterCIDRConfig), err
}
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *FakeClusterCIDRConfigs) UpdateStatus(ctx context.Context, clusterCIDRConfig *v1alpha1.ClusterCIDRConfig, opts v1.UpdateOptions) (*v1alpha1.ClusterCIDRConfig, error) {
obj, err := c.Fake.
Invokes(testing.NewRootUpdateSubresourceAction(clustercidrconfigsResource, "status", clusterCIDRConfig), &v1alpha1.ClusterCIDRConfig{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.ClusterCIDRConfig), err
}
// Delete takes name of the clusterCIDRConfig and deletes it. Returns an error if one occurs.
func (c *FakeClusterCIDRConfigs) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
_, err := c.Fake.
Invokes(testing.NewRootDeleteActionWithOptions(clustercidrconfigsResource, name, opts), &v1alpha1.ClusterCIDRConfig{})
return err
}
// DeleteCollection deletes a collection of objects.
func (c *FakeClusterCIDRConfigs) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
action := testing.NewRootDeleteCollectionAction(clustercidrconfigsResource, listOpts)
_, err := c.Fake.Invokes(action, &v1alpha1.ClusterCIDRConfigList{})
return err
}
// Patch applies the patch and returns the patched clusterCIDRConfig.
func (c *FakeClusterCIDRConfigs) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.ClusterCIDRConfig, err error) {
obj, err := c.Fake.
Invokes(testing.NewRootPatchSubresourceAction(clustercidrconfigsResource, name, pt, data, subresources...), &v1alpha1.ClusterCIDRConfig{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.ClusterCIDRConfig), err
}
// Apply takes the given apply declarative configuration, applies it and returns the applied clusterCIDRConfig.
func (c *FakeClusterCIDRConfigs) Apply(ctx context.Context, clusterCIDRConfig *networkingv1alpha1.ClusterCIDRConfigApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.ClusterCIDRConfig, err error) {
if clusterCIDRConfig == nil {
return nil, fmt.Errorf("clusterCIDRConfig provided to Apply must not be nil")
}
data, err := json.Marshal(clusterCIDRConfig)
if err != nil {
return nil, err
}
name := clusterCIDRConfig.Name
if name == nil {
return nil, fmt.Errorf("clusterCIDRConfig.Name must be provided to Apply")
}
obj, err := c.Fake.
Invokes(testing.NewRootPatchSubresourceAction(clustercidrconfigsResource, *name, types.ApplyPatchType, data), &v1alpha1.ClusterCIDRConfig{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.ClusterCIDRConfig), err
}
// ApplyStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus().
func (c *FakeClusterCIDRConfigs) ApplyStatus(ctx context.Context, clusterCIDRConfig *networkingv1alpha1.ClusterCIDRConfigApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.ClusterCIDRConfig, err error) {
if clusterCIDRConfig == nil {
return nil, fmt.Errorf("clusterCIDRConfig provided to Apply must not be nil")
}
data, err := json.Marshal(clusterCIDRConfig)
if err != nil {
return nil, err
}
name := clusterCIDRConfig.Name
if name == nil {
return nil, fmt.Errorf("clusterCIDRConfig.Name must be provided to Apply")
}
obj, err := c.Fake.
Invokes(testing.NewRootPatchSubresourceAction(clustercidrconfigsResource, *name, types.ApplyPatchType, data, "status"), &v1alpha1.ClusterCIDRConfig{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.ClusterCIDRConfig), err
}

View File

@ -1,40 +0,0 @@
/*
Copyright The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by client-gen. DO NOT EDIT.
package fake
import (
v1alpha1 "k8s.io/client-go/kubernetes/typed/networking/v1alpha1"
rest "k8s.io/client-go/rest"
testing "k8s.io/client-go/testing"
)
type FakeNetworkingV1alpha1 struct {
*testing.Fake
}
func (c *FakeNetworkingV1alpha1) ClusterCIDRConfigs() v1alpha1.ClusterCIDRConfigInterface {
return &FakeClusterCIDRConfigs{c}
}
// RESTClient returns a RESTClient that is used to communicate
// with API server by this client implementation.
func (c *FakeNetworkingV1alpha1) RESTClient() rest.Interface {
var ret *rest.RESTClient
return ret
}

View File

@ -1,21 +0,0 @@
/*
Copyright The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by client-gen. DO NOT EDIT.
package v1alpha1
type ClusterCIDRConfigExpansion interface{}

View File

@ -1,107 +0,0 @@
/*
Copyright The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by client-gen. DO NOT EDIT.
package v1alpha1
import (
"net/http"
v1alpha1 "k8s.io/api/networking/v1alpha1"
"k8s.io/client-go/kubernetes/scheme"
rest "k8s.io/client-go/rest"
)
type NetworkingV1alpha1Interface interface {
RESTClient() rest.Interface
ClusterCIDRConfigsGetter
}
// NetworkingV1alpha1Client is used to interact with features provided by the networking.k8s.io group.
type NetworkingV1alpha1Client struct {
restClient rest.Interface
}
func (c *NetworkingV1alpha1Client) ClusterCIDRConfigs() ClusterCIDRConfigInterface {
return newClusterCIDRConfigs(c)
}
// NewForConfig creates a new NetworkingV1alpha1Client for the given config.
// NewForConfig is equivalent to NewForConfigAndClient(c, httpClient),
// where httpClient was generated with rest.HTTPClientFor(c).
func NewForConfig(c *rest.Config) (*NetworkingV1alpha1Client, error) {
config := *c
if err := setConfigDefaults(&config); err != nil {
return nil, err
}
httpClient, err := rest.HTTPClientFor(&config)
if err != nil {
return nil, err
}
return NewForConfigAndClient(&config, httpClient)
}
// NewForConfigAndClient creates a new NetworkingV1alpha1Client for the given config and http client.
// Note the http client provided takes precedence over the configured transport values.
func NewForConfigAndClient(c *rest.Config, h *http.Client) (*NetworkingV1alpha1Client, error) {
config := *c
if err := setConfigDefaults(&config); err != nil {
return nil, err
}
client, err := rest.RESTClientForConfigAndClient(&config, h)
if err != nil {
return nil, err
}
return &NetworkingV1alpha1Client{client}, nil
}
// NewForConfigOrDie creates a new NetworkingV1alpha1Client for the given config and
// panics if there is an error in the config.
func NewForConfigOrDie(c *rest.Config) *NetworkingV1alpha1Client {
client, err := NewForConfig(c)
if err != nil {
panic(err)
}
return client
}
// New creates a new NetworkingV1alpha1Client for the given RESTClient.
func New(c rest.Interface) *NetworkingV1alpha1Client {
return &NetworkingV1alpha1Client{c}
}
func setConfigDefaults(config *rest.Config) error {
gv := v1alpha1.SchemeGroupVersion
config.GroupVersion = &gv
config.APIPath = "/apis"
config.NegotiatedSerializer = scheme.Codecs.WithoutConversion()
if config.UserAgent == "" {
config.UserAgent = rest.DefaultKubernetesUserAgent()
}
return nil
}
// RESTClient returns a RESTClient that is used to communicate
// with API server by this client implementation.
func (c *NetworkingV1alpha1Client) RESTClient() rest.Interface {
if c == nil {
return nil
}
return c.restClient
}

View File

@ -1,68 +0,0 @@
/*
Copyright The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by lister-gen. DO NOT EDIT.
package v1alpha1
import (
v1alpha1 "k8s.io/api/networking/v1alpha1"
"k8s.io/apimachinery/pkg/api/errors"
"k8s.io/apimachinery/pkg/labels"
"k8s.io/client-go/tools/cache"
)
// ClusterCIDRConfigLister helps list ClusterCIDRConfigs.
// All objects returned here must be treated as read-only.
type ClusterCIDRConfigLister interface {
// List lists all ClusterCIDRConfigs in the indexer.
// Objects returned here must be treated as read-only.
List(selector labels.Selector) (ret []*v1alpha1.ClusterCIDRConfig, err error)
// Get retrieves the ClusterCIDRConfig from the index for a given name.
// Objects returned here must be treated as read-only.
Get(name string) (*v1alpha1.ClusterCIDRConfig, error)
ClusterCIDRConfigListerExpansion
}
// clusterCIDRConfigLister implements the ClusterCIDRConfigLister interface.
type clusterCIDRConfigLister struct {
indexer cache.Indexer
}
// NewClusterCIDRConfigLister returns a new ClusterCIDRConfigLister.
func NewClusterCIDRConfigLister(indexer cache.Indexer) ClusterCIDRConfigLister {
return &clusterCIDRConfigLister{indexer: indexer}
}
// List lists all ClusterCIDRConfigs in the indexer.
func (s *clusterCIDRConfigLister) List(selector labels.Selector) (ret []*v1alpha1.ClusterCIDRConfig, err error) {
err = cache.ListAll(s.indexer, selector, func(m interface{}) {
ret = append(ret, m.(*v1alpha1.ClusterCIDRConfig))
})
return ret, err
}
// Get retrieves the ClusterCIDRConfig from the index for a given name.
func (s *clusterCIDRConfigLister) Get(name string) (*v1alpha1.ClusterCIDRConfig, error) {
obj, exists, err := s.indexer.GetByKey(name)
if err != nil {
return nil, err
}
if !exists {
return nil, errors.NewNotFound(v1alpha1.Resource("clustercidrconfig"), name)
}
return obj.(*v1alpha1.ClusterCIDRConfig), nil
}

View File

@ -1,23 +0,0 @@
/*
Copyright The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by lister-gen. DO NOT EDIT.
package v1alpha1
// ClusterCIDRConfigListerExpansion allows custom methods to be added to
// ClusterCIDRConfigLister.
type ClusterCIDRConfigListerExpansion interface{}

View File

@ -82,6 +82,12 @@ func (r *RequestConstructionError) Error() string {
var noBackoff = &NoBackoff{}
type requestRetryFunc func(maxRetries int) WithRetry
func defaultRequestRetryFn(maxRetries int) WithRetry {
return &withRetry{maxRetries: maxRetries}
}
// Request allows for building up a request to a server in a chained fashion.
// Any errors are stored until the end of your call, so you only have to
// check once.
@ -93,6 +99,7 @@ type Request struct {
rateLimiter flowcontrol.RateLimiter
backoff BackoffManager
timeout time.Duration
maxRetries int
// generic components accessible via method setters
verb string
@ -109,9 +116,10 @@ type Request struct {
subresource string
// output
err error
body io.Reader
retry WithRetry
err error
body io.Reader
retryFn requestRetryFunc
}
// NewRequest creates a new request helper object for accessing runtime.Objects on a server.
@ -142,7 +150,8 @@ func NewRequest(c *RESTClient) *Request {
backoff: backoff,
timeout: timeout,
pathPrefix: pathPrefix,
retry: &withRetry{maxRetries: 10},
maxRetries: 10,
retryFn: defaultRequestRetryFn,
warningHandler: c.warningHandler,
}
@ -408,7 +417,10 @@ func (r *Request) Timeout(d time.Duration) *Request {
// function is specifically called with a different value.
// A zero maxRetries prevent it from doing retires and return an error immediately.
func (r *Request) MaxRetries(maxRetries int) *Request {
r.retry.SetMaxRetries(maxRetries)
if maxRetries < 0 {
maxRetries = 0
}
r.maxRetries = maxRetries
return r
}
@ -612,20 +624,21 @@ func (r *Request) Watch(ctx context.Context) (watch.Interface, error) {
}
return false
}
retry := r.retryFn(r.maxRetries)
url := r.URL().String()
for {
if err := retry.Before(ctx, r); err != nil {
return nil, retry.WrapPreviousError(err)
}
req, err := r.newHTTPRequest(ctx)
if err != nil {
return nil, err
}
if err := r.retry.Before(ctx, r); err != nil {
return nil, r.retry.WrapPreviousError(err)
}
resp, err := client.Do(req)
updateURLMetrics(ctx, r, resp, err)
r.retry.After(ctx, r, resp, err)
retry.After(ctx, r, resp, err)
if err == nil && resp.StatusCode == http.StatusOK {
return r.newStreamWatcher(resp)
}
@ -633,7 +646,7 @@ func (r *Request) Watch(ctx context.Context) (watch.Interface, error) {
done, transformErr := func() (bool, error) {
defer readAndCloseResponseBody(resp)
if r.retry.IsNextRetry(ctx, r, req, resp, err, isErrRetryableFunc) {
if retry.IsNextRetry(ctx, r, req, resp, err, isErrRetryableFunc) {
return false, nil
}
@ -655,7 +668,7 @@ func (r *Request) Watch(ctx context.Context) (watch.Interface, error) {
// we need to return the error object from that.
err = transformErr
}
return nil, r.retry.WrapPreviousError(err)
return nil, retry.WrapPreviousError(err)
}
}
}
@ -720,8 +733,13 @@ func (r *Request) Stream(ctx context.Context) (io.ReadCloser, error) {
client = http.DefaultClient
}
retry := r.retryFn(r.maxRetries)
url := r.URL().String()
for {
if err := retry.Before(ctx, r); err != nil {
return nil, err
}
req, err := r.newHTTPRequest(ctx)
if err != nil {
return nil, err
@ -729,14 +747,9 @@ func (r *Request) Stream(ctx context.Context) (io.ReadCloser, error) {
if r.body != nil {
req.Body = ioutil.NopCloser(r.body)
}
if err := r.retry.Before(ctx, r); err != nil {
return nil, err
}
resp, err := client.Do(req)
updateURLMetrics(ctx, r, resp, err)
r.retry.After(ctx, r, resp, err)
retry.After(ctx, r, resp, err)
if err != nil {
// we only retry on an HTTP response with 'Retry-After' header
return nil, err
@ -751,7 +764,7 @@ func (r *Request) Stream(ctx context.Context) (io.ReadCloser, error) {
done, transformErr := func() (bool, error) {
defer resp.Body.Close()
if r.retry.IsNextRetry(ctx, r, req, resp, err, neverRetryError) {
if retry.IsNextRetry(ctx, r, req, resp, err, neverRetryError) {
return false, nil
}
result := r.transformResponse(resp, req)
@ -858,15 +871,15 @@ func (r *Request) request(ctx context.Context, fn func(*http.Request, *http.Resp
}
// Right now we make about ten retry attempts if we get a Retry-After response.
retry := r.retryFn(r.maxRetries)
for {
if err := retry.Before(ctx, r); err != nil {
return retry.WrapPreviousError(err)
}
req, err := r.newHTTPRequest(ctx)
if err != nil {
return err
}
if err := r.retry.Before(ctx, r); err != nil {
return r.retry.WrapPreviousError(err)
}
resp, err := client.Do(req)
updateURLMetrics(ctx, r, resp, err)
// The value -1 or a value of 0 with a non-nil Body indicates that the length is unknown.
@ -874,7 +887,7 @@ func (r *Request) request(ctx context.Context, fn func(*http.Request, *http.Resp
if req.ContentLength >= 0 && !(req.Body != nil && req.ContentLength == 0) {
metrics.RequestSize.Observe(ctx, r.verb, r.URL().Host, float64(req.ContentLength))
}
r.retry.After(ctx, r, resp, err)
retry.After(ctx, r, resp, err)
done := func() bool {
defer readAndCloseResponseBody(resp)
@ -887,7 +900,7 @@ func (r *Request) request(ctx context.Context, fn func(*http.Request, *http.Resp
fn(req, resp)
}
if r.retry.IsNextRetry(ctx, r, req, resp, err, isErrRetryableFunc) {
if retry.IsNextRetry(ctx, r, req, resp, err, isErrRetryableFunc) {
return false
}
@ -895,7 +908,7 @@ func (r *Request) request(ctx context.Context, fn func(*http.Request, *http.Resp
return true
}()
if done {
return r.retry.WrapPreviousError(err)
return retry.WrapPreviousError(err)
}
}
}

View File

@ -52,12 +52,6 @@ var neverRetryError = IsRetryableErrorFunc(func(_ *http.Request, _ error) bool {
// Note that WithRetry is not safe for concurrent use by multiple
// goroutines without additional locking or coordination.
type WithRetry interface {
// SetMaxRetries makes the request use the specified integer as a ceiling
// for retries upon receiving a 429 status code and the "Retry-After" header
// in the response.
// A zero maxRetries should prevent from doing any retry and return immediately.
SetMaxRetries(maxRetries int)
// IsNextRetry advances the retry counter appropriately
// and returns true if the request should be retried,
// otherwise it returns false, if:
@ -78,8 +72,12 @@ type WithRetry interface {
IsNextRetry(ctx context.Context, restReq *Request, httpReq *http.Request, resp *http.Response, err error, f IsRetryableErrorFunc) bool
// Before should be invoked prior to each attempt, including
// the first one. if an error is returned, the request
// should be aborted immediately.
// the first one. If an error is returned, the request should
// be aborted immediately.
//
// Before may also be additionally responsible for preparing
// the request for the next retry, namely in terms of resetting
// the request body in case it has been read.
Before(ctx context.Context, r *Request) error
// After should be invoked immediately after an attempt is made.
@ -140,13 +138,6 @@ type withRetry struct {
previousErr, currentErr error
}
func (r *withRetry) SetMaxRetries(maxRetries int) {
if maxRetries < 0 {
maxRetries = 0
}
r.maxRetries = maxRetries
}
func (r *withRetry) trackPreviousError(err error) {
// keep track of two most recent errors
if r.currentErr != nil {
@ -194,46 +185,18 @@ func (r *withRetry) IsNextRetry(ctx context.Context, restReq *Request, httpReq *
r.retryAfter.Wait = time.Duration(seconds) * time.Second
r.retryAfter.Reason = getRetryReason(r.attempts, seconds, resp, err)
if err := r.prepareForNextRetry(ctx, restReq); err != nil {
klog.V(4).Infof("Could not retry request - %v", err)
return false
}
return true
}
// prepareForNextRetry is responsible for carrying out operations that need
// to be completed before the next retry is initiated:
// - if the request context is already canceled there is no need to
// retry, the function will return ctx.Err().
// - we need to seek to the beginning of the request body before we
// initiate the next retry, the function should return an error if
// it fails to do so.
func (r *withRetry) prepareForNextRetry(ctx context.Context, request *Request) error {
if ctx.Err() != nil {
return ctx.Err()
}
// Ensure the response body is fully read and closed before
// we reconnect, so that we reuse the same TCP connection.
if seeker, ok := request.body.(io.Seeker); ok && request.body != nil {
if _, err := seeker.Seek(0, 0); err != nil {
return fmt.Errorf("can't Seek() back to beginning of body for %T", request)
}
}
klog.V(4).Infof("Got a Retry-After %s response for attempt %d to %v", r.retryAfter.Wait, r.retryAfter.Attempt, request.URL().String())
return nil
}
func (r *withRetry) Before(ctx context.Context, request *Request) error {
// If the request context is already canceled there
// is no need to retry.
if ctx.Err() != nil {
r.trackPreviousError(ctx.Err())
return ctx.Err()
}
url := request.URL()
// r.retryAfter represents the retry after parameters calculated
// from the (response, err) tuple from the last attempt, so 'Before'
// can apply these retry after parameters prior to the next attempt.
@ -245,6 +208,18 @@ func (r *withRetry) Before(ctx context.Context, request *Request) error {
return nil
}
// At this point we've made atleast one attempt, post which the response
// body should have been fully read and closed in order for it to be safe
// to reset the request body before we reconnect, in order for us to reuse
// the same TCP connection.
if seeker, ok := request.body.(io.Seeker); ok && request.body != nil {
if _, err := seeker.Seek(0, io.SeekStart); err != nil {
err = fmt.Errorf("failed to reset the request body while retrying a request: %v", err)
r.trackPreviousError(err)
return err
}
}
// if we are here, we have made attempt(s) al least once before.
if request.backoff != nil {
// TODO(tkashem) with default set to use exponential backoff
@ -263,6 +238,7 @@ func (r *withRetry) Before(ctx context.Context, request *Request) error {
return err
}
klog.V(4).Infof("Got a Retry-After %s response for attempt %d to %v", r.retryAfter.Wait, r.retryAfter.Attempt, request.URL().String())
return nil
}

View File

@ -9,23 +9,23 @@ require (
github.com/spf13/cobra v1.4.0
github.com/spf13/pflag v1.0.5
github.com/stretchr/testify v1.7.0
k8s.io/api v0.24.0-beta.0
k8s.io/apimachinery v0.24.0-beta.0
k8s.io/apiserver v0.24.0-beta.0
k8s.io/client-go v0.24.0-beta.0
k8s.io/component-base v0.24.0-beta.0
k8s.io/component-helpers v0.24.0-beta.0
k8s.io/controller-manager v0.24.0-beta.0
k8s.io/api v0.25.0-alpha.0
k8s.io/apimachinery v0.25.0-alpha.0
k8s.io/apiserver v0.25.0-alpha.0
k8s.io/client-go v0.25.0-alpha.0
k8s.io/component-base v0.25.0-alpha.0
k8s.io/component-helpers v0.25.0-alpha.0
k8s.io/controller-manager v0.25.0-alpha.0
k8s.io/klog/v2 v2.60.1
k8s.io/utils v0.0.0-20220210201930-3a6ce19ff2f9
)
replace (
k8s.io/api => k8s.io/api v0.24.0-beta.0
k8s.io/apimachinery => k8s.io/apimachinery v0.24.0-beta.0
k8s.io/apiserver => k8s.io/apiserver v0.24.0-beta.0
k8s.io/client-go => k8s.io/client-go v0.24.0-beta.0
k8s.io/component-base => k8s.io/component-base v0.24.0-beta.0
k8s.io/component-helpers => k8s.io/component-helpers v0.24.0-beta.0
k8s.io/controller-manager => k8s.io/controller-manager v0.24.0-beta.0
k8s.io/api => k8s.io/api v0.25.0-alpha.0
k8s.io/apimachinery => k8s.io/apimachinery v0.25.0-alpha.0
k8s.io/apiserver => k8s.io/apiserver v0.25.0-alpha.0
k8s.io/client-go => k8s.io/client-go v0.25.0-alpha.0
k8s.io/component-base => k8s.io/component-base v0.25.0-alpha.0
k8s.io/component-helpers => k8s.io/component-helpers v0.25.0-alpha.0
k8s.io/controller-manager => k8s.io/controller-manager v0.25.0-alpha.0
)

View File

@ -950,20 +950,20 @@ 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.24.0-beta.0 h1:7knNqNYI1Az5hWcebdyUff4ETyCZkvmUT1N2hi/qS/Y=
k8s.io/api v0.24.0-beta.0/go.mod h1:D7w5dDA57yCeRJnl0vPuRj6KBAwWYxea4Dwo5kgJGIY=
k8s.io/apimachinery v0.24.0-beta.0 h1:69KiS/m3i2oi3FaCVX6whePxOelsJkhIfO0J5fGDYv8=
k8s.io/apimachinery v0.24.0-beta.0/go.mod h1:82Bi4sCzVBdpYjyI4jY6aHX+YCUchUIrZrXKedjd2UM=
k8s.io/apiserver v0.24.0-beta.0 h1:alwKvg2qKXvXZbjP0v/Ozfagaygh/shCmvNMZW/arg8=
k8s.io/apiserver v0.24.0-beta.0/go.mod h1:pPF5/dEQukQjwauSxjW8IHKn8W1r8u2nERGojwFFlj4=
k8s.io/client-go v0.24.0-beta.0 h1:ISWwVXNtOr2f1O5afJGi66vxAzC6Gb/3+VWlz4WseFc=
k8s.io/client-go v0.24.0-beta.0/go.mod h1:D4rgRqnNPdFCFMMrcCqCOAouzIwJkPuKXr3zWThEExM=
k8s.io/component-base v0.24.0-beta.0 h1:Qh9X14PLVX9YfVXEdsWeYVbN/ssm18pkf7RwPX8fCSg=
k8s.io/component-base v0.24.0-beta.0/go.mod h1:UrgHIn7am00FE1rRmr0GHCiNZg7oZO+Oh6iXROJt2oU=
k8s.io/component-helpers v0.24.0-beta.0 h1:ZUd0qDgMzL1gFGz8giE8+TKvnClrRyNtTRJ3BO4cUDc=
k8s.io/component-helpers v0.24.0-beta.0/go.mod h1:dTw0PfziOO6g9Wj3+6nNN3VBfDvEOfYADXxVcmCWWe4=
k8s.io/controller-manager v0.24.0-beta.0 h1:ph5Bqi+pV6OXVocTTJkrWzLHx4ei9q0b3X+tk4zNzM4=
k8s.io/controller-manager v0.24.0-beta.0/go.mod h1:wqi0opKDUj7GhktwzN+s6VUYMT5BGn4QSQjkRZO31Q4=
k8s.io/api v0.25.0-alpha.0 h1:BiYeMLWoLcGGWE46gdnlwluFa23+Hr3I2Qp8U6c2wYY=
k8s.io/api v0.25.0-alpha.0/go.mod h1:sOibYBePcsE/DBjbbi+Z+FCG9lFPR7xuKSR2r6RTCNs=
k8s.io/apimachinery v0.25.0-alpha.0 h1:gAzcXIp+FkB3w8+m34na2qxSScwQWKtryRU8JfkS/NU=
k8s.io/apimachinery v0.25.0-alpha.0/go.mod h1:82Bi4sCzVBdpYjyI4jY6aHX+YCUchUIrZrXKedjd2UM=
k8s.io/apiserver v0.25.0-alpha.0 h1:xBfhlvO+nR5+8bXa6QWAAUJlKnoeilyfADlsX68nSVI=
k8s.io/apiserver v0.25.0-alpha.0/go.mod h1:3uSXO9FDkLMo4+9e7wAFYPZG9u9k7pu0uDOIldSH4p0=
k8s.io/client-go v0.25.0-alpha.0 h1:IwIWODi6Uz7QlOU8J2tv8APdDtytoowveKF9IoKpHa4=
k8s.io/client-go v0.25.0-alpha.0/go.mod h1:V7vCXDCdD8Goobi4oQhsSNXtlWfyBJi+LHFaiYWpR5s=
k8s.io/component-base v0.25.0-alpha.0 h1:3vKkR1bElViOZg8/n+tGPPao4J8wVtgYufpKiVpYVoY=
k8s.io/component-base v0.25.0-alpha.0/go.mod h1:XjXouECWA+3uLTEckIOMeu6P0BjjCNDUaS6a6Ci3EwE=
k8s.io/component-helpers v0.25.0-alpha.0 h1:TWTgK2pOwXwBY5P9FFpd1PoGvkFfyfugSZDi7xI99f8=
k8s.io/component-helpers v0.25.0-alpha.0/go.mod h1:sXP162Q/1YnH2yf2ql7XkinHYmuZU5u6QdkwJG5PVjQ=
k8s.io/controller-manager v0.25.0-alpha.0 h1:UXqwP4x0TpM71JoxrxHlrnnNwTMQQQ3nQ8Rbhc86kGw=
k8s.io/controller-manager v0.25.0-alpha.0/go.mod h1:S7RMjQWbPiYRBbDC1+QB8TGxeL4KVsW/0vOCyOjqr4Q=
k8s.io/gengo v0.0.0-20210813121822-485abfe95c7c/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E=
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=

View File

@ -212,13 +212,13 @@ func (v *CounterVec) Reset() {
func (v *CounterVec) WithContext(ctx context.Context) *CounterVecWithContext {
return &CounterVecWithContext{
ctx: ctx,
CounterVec: *v,
CounterVec: v,
}
}
// CounterVecWithContext is the wrapper of CounterVec with context.
type CounterVecWithContext struct {
CounterVec
*CounterVec
ctx context.Context
}

View File

@ -189,8 +189,8 @@ func (v *GaugeVec) Reset() {
v.GaugeVec.Reset()
}
func newGaugeFunc(opts GaugeOpts, function func() float64, v semver.Version) GaugeFunc {
g := NewGauge(&opts)
func newGaugeFunc(opts *GaugeOpts, function func() float64, v semver.Version) GaugeFunc {
g := NewGauge(opts)
if !g.Create(&v) {
return nil
@ -205,7 +205,7 @@ func newGaugeFunc(opts GaugeOpts, function func() float64, v semver.Version) Gau
// concurrently. If that results in concurrent calls to Write, like in the case
// where a GaugeFunc is directly registered with Prometheus, the provided
// function must be concurrency-safe.
func NewGaugeFunc(opts GaugeOpts, function func() float64) GaugeFunc {
func NewGaugeFunc(opts *GaugeOpts, function func() float64) GaugeFunc {
v := parseVersion(version.Get())
return newGaugeFunc(opts, function, v)
@ -215,13 +215,13 @@ func NewGaugeFunc(opts GaugeOpts, function func() float64) GaugeFunc {
func (v *GaugeVec) WithContext(ctx context.Context) *GaugeVecWithContext {
return &GaugeVecWithContext{
ctx: ctx,
GaugeVec: *v,
GaugeVec: v,
}
}
// GaugeVecWithContext is the wrapper of GaugeVec with context.
type GaugeVecWithContext struct {
GaugeVec
*GaugeVec
ctx context.Context
}

View File

@ -199,13 +199,13 @@ func (v *HistogramVec) Reset() {
func (v *HistogramVec) WithContext(ctx context.Context) *HistogramVecWithContext {
return &HistogramVecWithContext{
ctx: ctx,
HistogramVec: *v,
HistogramVec: v,
}
}
// HistogramVecWithContext is the wrapper of HistogramVec with context.
type HistogramVecWithContext struct {
HistogramVec
*HistogramVec
ctx context.Context
}

View File

@ -169,8 +169,8 @@ func (r *lazyMetric) ClearState() {
r.isDeprecated = false
r.isHidden = false
r.isCreated = false
r.markDeprecationOnce = *(new(sync.Once))
r.createOnce = *(new(sync.Once))
r.markDeprecationOnce = sync.Once{}
r.createOnce = sync.Once{}
}
// FQName returns the fully-qualified metric name of the collector.

View File

@ -83,7 +83,7 @@ var (
execPluginCertTTLAdapter = &expiryToTTLAdapter{}
execPluginCertTTL = k8smetrics.NewGaugeFunc(
k8smetrics.GaugeOpts{
&k8smetrics.GaugeOpts{
Name: "rest_client_exec_plugin_ttl_seconds",
Help: "Gauge of the shortest TTL (time-to-live) of the client " +
"certificate(s) managed by the auth exec plugin. The value " +

View File

@ -193,13 +193,13 @@ func (v *SummaryVec) Reset() {
func (v *SummaryVec) WithContext(ctx context.Context) *SummaryVecWithContext {
return &SummaryVecWithContext{
ctx: ctx,
SummaryVec: *v,
SummaryVec: v,
}
}
// SummaryVecWithContext is the wrapper of SummaryVec with context.
type SummaryVecWithContext struct {
SummaryVec
*SummaryVec
ctx context.Context
}

View File

@ -6,12 +6,12 @@ go 1.16
require (
github.com/stretchr/testify v1.7.0
k8s.io/api v0.24.0-beta.0
k8s.io/apimachinery v0.24.0-beta.0
k8s.io/api v0.25.0-alpha.0
k8s.io/apimachinery v0.25.0-alpha.0
k8s.io/klog/v2 v2.60.1
)
replace (
k8s.io/api => k8s.io/api v0.24.0-beta.0
k8s.io/apimachinery => k8s.io/apimachinery v0.24.0-beta.0
k8s.io/api => k8s.io/api v0.25.0-alpha.0
k8s.io/apimachinery => k8s.io/apimachinery v0.25.0-alpha.0
)

View File

@ -220,10 +220,10 @@ gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b h1:h8qDotaEPuJATrMmW04NCwg7v
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
k8s.io/api v0.24.0-beta.0 h1:7knNqNYI1Az5hWcebdyUff4ETyCZkvmUT1N2hi/qS/Y=
k8s.io/api v0.24.0-beta.0/go.mod h1:D7w5dDA57yCeRJnl0vPuRj6KBAwWYxea4Dwo5kgJGIY=
k8s.io/apimachinery v0.24.0-beta.0 h1:69KiS/m3i2oi3FaCVX6whePxOelsJkhIfO0J5fGDYv8=
k8s.io/apimachinery v0.24.0-beta.0/go.mod h1:82Bi4sCzVBdpYjyI4jY6aHX+YCUchUIrZrXKedjd2UM=
k8s.io/api v0.25.0-alpha.0 h1:BiYeMLWoLcGGWE46gdnlwluFa23+Hr3I2Qp8U6c2wYY=
k8s.io/api v0.25.0-alpha.0/go.mod h1:sOibYBePcsE/DBjbbi+Z+FCG9lFPR7xuKSR2r6RTCNs=
k8s.io/apimachinery v0.25.0-alpha.0 h1:gAzcXIp+FkB3w8+m34na2qxSScwQWKtryRU8JfkS/NU=
k8s.io/apimachinery v0.25.0-alpha.0/go.mod h1:82Bi4sCzVBdpYjyI4jY6aHX+YCUchUIrZrXKedjd2UM=
k8s.io/gengo v0.0.0-20210813121822-485abfe95c7c/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E=
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=

View File

@ -45,6 +45,7 @@ var (
managedDiskPathRE = regexp.MustCompile(`.*/subscriptions/(?:.*)/resourceGroups/(?:.*)/providers/Microsoft.Compute/disks/(.+)`)
unmanagedDiskPathRE = regexp.MustCompile(`http(?:.*)://(?:.*)/vhds/(.+)`)
managed = string(v1.AzureManagedDisk)
unzonedCSIRegionRE = regexp.MustCompile(`^[0-9]+$`)
)
var _ InTreePlugin = &azureDiskCSITranslator{}
@ -86,6 +87,7 @@ func (t *azureDiskCSITranslator) TranslateInTreeStorageClassToCSI(sc *storage.St
}
sc.AllowedTopologies = newTopologies
}
sc.AllowedTopologies = t.replaceFailureDomainsToCSI(sc.AllowedTopologies)
sc.Parameters = params
@ -273,3 +275,34 @@ func getDiskName(diskURI string) (string, error) {
}
return matches[1], nil
}
// Replace topology values for failure domains ("<number>") to "",
// as it's the value that the CSI driver expects.
func (t *azureDiskCSITranslator) replaceFailureDomainsToCSI(terms []v1.TopologySelectorTerm) []v1.TopologySelectorTerm {
if terms == nil {
return nil
}
newTopologies := []v1.TopologySelectorTerm{}
for _, term := range terms {
newTerm := term.DeepCopy()
for i := range newTerm.MatchLabelExpressions {
exp := &newTerm.MatchLabelExpressions[i]
if exp.Key == AzureDiskTopologyKey {
for j := range exp.Values {
if unzonedCSIRegionRE.Match([]byte(exp.Values[j])) {
// Topologies "0", "1" etc are used when in-tree topology is translated to CSI in Azure
// regions that don't have availability zones. E.g.:
// topology.kubernetes.io/region: westus
// topology.kubernetes.io/zone: "0"
// The CSI driver uses zone "" instead of "0" in this case.
// topology.disk.csi.azure.com/zone": ""
exp.Values[j] = ""
}
}
}
}
newTopologies = append(newTopologies, *newTerm)
}
return newTopologies
}

View File

@ -827,7 +827,7 @@ func buildKubeletClientConfig(ctx context.Context, s *options.KubeletServer, nod
}
legacyregistry.RawMustRegister(metrics.NewGaugeFunc(
metrics.GaugeOpts{
&metrics.GaugeOpts{
Subsystem: kubeletmetrics.KubeletSubsystem,
Name: "certificate_manager_client_ttl_seconds",
Help: "Gauge of the TTL (time-to-live) of the Kubelet's client certificate. " +

View File

@ -434,8 +434,6 @@ func GetValidationOptionsFromPodSpecAndMeta(podSpec, oldPodSpec *api.PodSpec, po
AllowExpandedDNSConfig: utilfeature.DefaultFeatureGate.Enabled(features.ExpandedDNSConfig) || haveSameExpandedDNSConfig(podSpec, oldPodSpec),
// Allow pod spec to use OS field
AllowOSField: utilfeature.DefaultFeatureGate.Enabled(features.IdentifyPodOS),
// Allow pod spec to use status.hostIPs in downward API if feature is enabled
AllowHostIPsField: utilfeature.DefaultFeatureGate.Enabled(features.PodHostIPs),
// The default sysctl value does not contain a forward slash, and in 1.24 we intend to relax this to be true by default
AllowSysctlRegexContainSlash: false,
}
@ -456,9 +454,6 @@ func GetValidationOptionsFromPodSpecAndMeta(podSpec, oldPodSpec *api.PodSpec, po
// if old spec has OS field set, we must allow it
opts.AllowOSField = opts.AllowOSField || oldPodSpec.OS != nil
// if old spec has status.hostIPs downwardAPI set, we must allow it
opts.AllowHostIPsField = opts.AllowHostIPsField || hasUsedDownwardAPIFieldPathWithPodSpec(oldPodSpec, "status.hostIPs")
// if old spec used non-integer multiple of huge page unit size, we must allow it
opts.AllowIndivisibleHugePagesValues = usesIndivisibleHugePagesValues(oldPodSpec)
@ -475,57 +470,6 @@ func GetValidationOptionsFromPodSpecAndMeta(podSpec, oldPodSpec *api.PodSpec, po
return opts
}
func hasUsedDownwardAPIFieldPathWithPodSpec(podSpec *api.PodSpec, fieldPath string) bool {
if podSpec == nil {
return false
}
for _, vol := range podSpec.Volumes {
if hasUsedDownwardAPIFieldPathWithVolume(&vol, fieldPath) {
return true
}
}
for _, c := range podSpec.InitContainers {
if hasUsedDownwardAPIFieldPathWithContainer(&c, fieldPath) {
return true
}
}
for _, c := range podSpec.Containers {
if hasUsedDownwardAPIFieldPathWithContainer(&c, fieldPath) {
return true
}
}
return false
}
func hasUsedDownwardAPIFieldPathWithVolume(volume *api.Volume, fieldPath string) bool {
if volume == nil {
return false
}
if volume.DownwardAPI != nil {
for _, file := range volume.DownwardAPI.Items {
if file.FieldRef != nil &&
file.FieldRef.FieldPath == fieldPath {
return true
}
}
}
return false
}
func hasUsedDownwardAPIFieldPathWithContainer(container *api.Container, fieldPath string) bool {
if container == nil {
return false
}
for _, env := range container.Env {
if env.ValueFrom != nil &&
env.ValueFrom.FieldRef != nil &&
env.ValueFrom.FieldRef.FieldPath == fieldPath {
return true
}
}
return false
}
// GetValidationOptionsFromPodTemplate will return pod validation options for specified template.
func GetValidationOptionsFromPodTemplate(podTemplate, oldPodTemplate *api.PodTemplateSpec) apivalidation.PodValidationOptions {
var newPodSpec, oldPodSpec *api.PodSpec
@ -568,39 +512,19 @@ func DropDisabledTemplateFields(podTemplate, oldPodTemplate *api.PodTemplateSpec
func DropDisabledPodFields(pod, oldPod *api.Pod) {
var (
podSpec *api.PodSpec
podStatus *api.PodStatus
podAnnotations map[string]string
oldPodSpec *api.PodSpec
oldPodStatus *api.PodStatus
oldPodAnnotations map[string]string
)
if pod != nil {
podSpec = &pod.Spec
podAnnotations = pod.Annotations
podStatus = &pod.Status
}
if oldPod != nil {
oldPodSpec = &oldPod.Spec
oldPodAnnotations = oldPod.Annotations
oldPodStatus = &oldPod.Status
}
dropDisabledFields(podSpec, podAnnotations, oldPodSpec, oldPodAnnotations)
dropDisabledStatusFields(podStatus, oldPodStatus)
}
// dropDisabledStatusFields removes disabled fields from the pod status
func dropDisabledStatusFields(podStatus *api.PodStatus, oldPodStatus *api.PodStatus) {
// drop HostIPs to empty (disable PodHostIPs).
if !utilfeature.DefaultFeatureGate.Enabled(features.PodHostIPs) && !hostIPsInUse(oldPodStatus) {
podStatus.HostIPs = nil
}
}
func hostIPsInUse(podStatus *api.PodStatus) bool {
if podStatus == nil {
return false
}
return len(podStatus.HostIPs) > 0
}
// dropDisabledFields removes disabled fields from the pod metadata and spec.

View File

@ -67,8 +67,8 @@ func GetLoadBalancerSourceRanges(service *v1.Service) (utilnet.IPNetSet, error)
return ipnets, nil
}
// RequestsOnlyLocalTraffic checks if service requests OnlyLocal traffic.
func RequestsOnlyLocalTraffic(service *v1.Service) bool {
// ExternalPolicyLocal checks if service has ETP = Local.
func ExternalPolicyLocal(service *v1.Service) bool {
if service.Spec.Type != v1.ServiceTypeLoadBalancer &&
service.Spec.Type != v1.ServiceTypeNodePort {
return false
@ -76,9 +76,8 @@ func RequestsOnlyLocalTraffic(service *v1.Service) bool {
return service.Spec.ExternalTrafficPolicy == v1.ServiceExternalTrafficPolicyTypeLocal
}
// RequestsOnlyLocalTrafficForInternal checks if service prefers Node Local
// endpoints for internal traffic
func RequestsOnlyLocalTrafficForInternal(service *v1.Service) bool {
// InternalPolicyLocal checks if service has ITP = Local.
func InternalPolicyLocal(service *v1.Service) bool {
if service.Spec.InternalTrafficPolicy == nil {
return false
}
@ -90,7 +89,7 @@ func NeedsHealthCheck(service *v1.Service) bool {
if service.Spec.Type != v1.ServiceTypeLoadBalancer {
return false
}
return RequestsOnlyLocalTraffic(service)
return ExternalPolicyLocal(service)
}
// GetServiceHealthCheckPathPort returns the path and nodePort programmed into the Cloud LB Health Check

View File

@ -257,6 +257,7 @@ type StatefulSetStatus struct {
// Total number of available pods (ready for at least minReadySeconds) targeted by this statefulset.
// This is a beta field and requires enabling StatefulSetMinReadySeconds feature gate.
// +optional
AvailableReplicas int32
}

View File

@ -88,7 +88,6 @@ func ConvertDownwardAPIFieldLabel(version, label, value string) (string, string,
"spec.schedulerName",
"status.phase",
"status.hostIP",
"status.hostIPs",
"status.podIP",
"status.podIPs":
return label, value, nil

View File

@ -3212,14 +3212,10 @@ type PodDNSConfigOption struct {
}
// PodIP represents the IP address of a pod.
// IP address information. Each entry includes:
// IP: An IP address allocated to the pod. Routable at least within
// the cluster.
type PodIP struct {
// ip is an IP address assigned to the pod
IP string
}
// HostIP represents the IP address of a host.
type HostIP struct {
// ip is an IP address assigned to the host
IP string
}
@ -3360,22 +3356,9 @@ type PodStatus struct {
// give the resources on this node to a higher priority pod that is created after preemption.
// +optional
NominatedNodeName string
// HostIP holds the IP address of the host to which the pod is assigned.
// Empty if the pod has not started yet.
// A pod can be assigned to a node that has a problem in kubelet which in turns mean that HostIP will
// not be updated even if there is node is assigned to pod
// +optional
HostIP string
// HostIPs holds the IP addresses allocated to the host. If this field is specified, the first entry must
// match the hostIP field. This list is empty if the pod has not started yet.
// A pod can be assigned to a node that has a problem in kubelet which in turns means that HostIPs will
// not be updated even if there is a node is assigned to this pod.
// match the hostIP field. This list is empty if no IPs have been allocated yet.
// +optional
HostIPs []HostIP
// PodIPs holds all of the known IP addresses allocated to the pod. Pods may be assigned AT MOST
// one value for each of IPv4 and IPv6.
// +optional

View File

@ -270,17 +270,6 @@ func Convert_v1_PodStatus_To_core_PodStatus(in *v1.PodStatus, out *core.PodStatu
},
}
}
// If both fields (v1.HostIPs and v1.HostIP) are provided and differ, then HostIP is authoritative for compatibility with older kubelets
if (len(in.HostIP) > 0 && len(in.HostIPs) > 0) && (in.HostIP != in.HostIPs[0].IP) {
out.HostIPs = []core.HostIP{{IP: in.HostIP}}
}
// at the this point, autoConvert copied v1.HostIPs -> core.HostIPs
// if v1.HostIPs was empty but v1.HostIP is not, then set core.HostIPs[0] with v1.HostIP
if len(in.HostIP) > 0 && len(in.HostIPs) == 0 {
out.HostIPs = []core.HostIP{{IP: in.HostIP}}
}
return nil
}
@ -294,11 +283,6 @@ func Convert_core_PodStatus_To_v1_PodStatus(in *core.PodStatus, out *v1.PodStatu
if len(in.PodIPs) > 0 {
out.PodIP = in.PodIPs[0].IP
}
// at the this point autoConvert copied core.HostIPs -> v1.HostIPs
if len(in.HostIPs) > 0 {
out.HostIP = in.HostIPs[0].IP
}
return nil
}

View File

@ -370,62 +370,3 @@ func ScopedResourceSelectorRequirementsAsSelector(ssr v1.ScopedResourceSelectorR
selector = selector.Add(*r)
return selector, nil
}
// NodeSelectorRequirementsAsLabelRequirements converts the NodeSelectorRequirement
// type to a labels.Requirement type.
func NodeSelectorRequirementsAsLabelRequirements(nsr v1.NodeSelectorRequirement) (*labels.Requirement, error) {
var op selection.Operator
switch nsr.Operator {
case v1.NodeSelectorOpIn:
op = selection.In
case v1.NodeSelectorOpNotIn:
op = selection.NotIn
case v1.NodeSelectorOpExists:
op = selection.Exists
case v1.NodeSelectorOpDoesNotExist:
op = selection.DoesNotExist
case v1.NodeSelectorOpGt:
op = selection.GreaterThan
case v1.NodeSelectorOpLt:
op = selection.LessThan
default:
return nil, fmt.Errorf("%q is not a valid node selector operator", nsr.Operator)
}
return labels.NewRequirement(nsr.Key, op, nsr.Values)
}
// NodeSelectorAsSelector converts the NodeSelector api type into a struct that
// implements labels.Selector
// Note: This function should be kept in sync with the selector methods in
// pkg/labels/selector.go
func NodeSelectorAsSelector(ns *v1.NodeSelector) (labels.Selector, error) {
if ns == nil {
return labels.Nothing(), nil
}
if len(ns.NodeSelectorTerms) == 0 {
return labels.Everything(), nil
}
requirements := make([]labels.Requirement, 0)
for _, nsTerm := range ns.NodeSelectorTerms {
for _, expr := range nsTerm.MatchExpressions {
req, err := NodeSelectorRequirementsAsLabelRequirements(expr)
if err != nil {
return nil, err
}
requirements = append(requirements, *req)
}
for _, field := range nsTerm.MatchFields {
req, err := NodeSelectorRequirementsAsLabelRequirements(field)
if err != nil {
return nil, err
}
requirements = append(requirements, *req)
}
}
selector := labels.NewSelector()
selector = selector.Add(requirements...)
return selector, nil
}

View File

@ -712,16 +712,6 @@ func RegisterConversions(s *runtime.Scheme) error {
}); err != nil {
return err
}
if err := s.AddGeneratedConversionFunc((*v1.HostIP)(nil), (*core.HostIP)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_v1_HostIP_To_core_HostIP(a.(*v1.HostIP), b.(*core.HostIP), scope)
}); err != nil {
return err
}
if err := s.AddGeneratedConversionFunc((*core.HostIP)(nil), (*v1.HostIP)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_core_HostIP_To_v1_HostIP(a.(*core.HostIP), b.(*v1.HostIP), scope)
}); err != nil {
return err
}
if err := s.AddGeneratedConversionFunc((*v1.HostPathVolumeSource)(nil), (*core.HostPathVolumeSource)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_v1_HostPathVolumeSource_To_core_HostPathVolumeSource(a.(*v1.HostPathVolumeSource), b.(*core.HostPathVolumeSource), scope)
}); err != nil {
@ -4015,26 +4005,6 @@ func Convert_core_HostAlias_To_v1_HostAlias(in *core.HostAlias, out *v1.HostAlia
return autoConvert_core_HostAlias_To_v1_HostAlias(in, out, s)
}
func autoConvert_v1_HostIP_To_core_HostIP(in *v1.HostIP, out *core.HostIP, s conversion.Scope) error {
out.IP = in.IP
return nil
}
// Convert_v1_HostIP_To_core_HostIP is an autogenerated conversion function.
func Convert_v1_HostIP_To_core_HostIP(in *v1.HostIP, out *core.HostIP, s conversion.Scope) error {
return autoConvert_v1_HostIP_To_core_HostIP(in, out, s)
}
func autoConvert_core_HostIP_To_v1_HostIP(in *core.HostIP, out *v1.HostIP, s conversion.Scope) error {
out.IP = in.IP
return nil
}
// Convert_core_HostIP_To_v1_HostIP is an autogenerated conversion function.
func Convert_core_HostIP_To_v1_HostIP(in *core.HostIP, out *v1.HostIP, s conversion.Scope) error {
return autoConvert_core_HostIP_To_v1_HostIP(in, out, s)
}
func autoConvert_v1_HostPathVolumeSource_To_core_HostPathVolumeSource(in *v1.HostPathVolumeSource, out *core.HostPathVolumeSource, s conversion.Scope) error {
out.Path = in.Path
out.Type = (*core.HostPathType)(unsafe.Pointer(in.Type))
@ -6277,7 +6247,6 @@ func autoConvert_v1_PodStatus_To_core_PodStatus(in *v1.PodStatus, out *core.PodS
out.Reason = in.Reason
out.NominatedNodeName = in.NominatedNodeName
out.HostIP = in.HostIP
out.HostIPs = *(*[]core.HostIP)(unsafe.Pointer(&in.HostIPs))
// WARNING: in.PodIP requires manual conversion: does not exist in peer-type
out.PodIPs = *(*[]core.PodIP)(unsafe.Pointer(&in.PodIPs))
out.StartTime = (*metav1.Time)(unsafe.Pointer(in.StartTime))
@ -6295,7 +6264,6 @@ func autoConvert_core_PodStatus_To_v1_PodStatus(in *core.PodStatus, out *v1.PodS
out.Reason = in.Reason
out.NominatedNodeName = in.NominatedNodeName
out.HostIP = in.HostIP
out.HostIPs = *(*[]v1.HostIP)(unsafe.Pointer(&in.HostIPs))
out.PodIPs = *(*[]v1.PodIP)(unsafe.Pointer(&in.PodIPs))
out.StartTime = (*metav1.Time)(unsafe.Pointer(in.StartTime))
out.QOSClass = v1.PodQOSClass(in.QOSClass)

View File

@ -1044,7 +1044,6 @@ func validateDownwardAPIVolumeFile(file *core.DownwardAPIVolumeFile, fldPath *fi
if file.ResourceFieldRef != nil {
allErrs = append(allErrs, field.Invalid(fldPath, "resource", "fieldRef and resourceFieldRef can not be specified simultaneously"))
}
allErrs = append(allErrs, validateDownwardAPIHostIPs(file.FieldRef, fldPath.Child("fieldRef"), opts)...)
} else if file.ResourceFieldRef != nil {
localValidContainerResourceFieldPathPrefixes := validContainerResourceFieldPathPrefixes
if opts.AllowDownwardAPIHugePages {
@ -2330,10 +2329,8 @@ var validEnvDownwardAPIFieldPathExpressions = sets.NewString(
"spec.nodeName",
"spec.serviceAccountName",
"status.hostIP",
"status.hostIPs",
"status.podIP",
"status.podIPs",
)
"status.podIPs")
var validContainerResourceFieldPathExpressions = sets.NewString("limits.cpu", "limits.memory", "limits.ephemeral-storage", "requests.cpu", "requests.memory", "requests.ephemeral-storage")
@ -2356,7 +2353,6 @@ func validateEnvVarValueFrom(ev core.EnvVar, fldPath *field.Path, opts PodValida
if ev.ValueFrom.FieldRef != nil {
numSources++
allErrs = append(allErrs, validateObjectFieldSelector(ev.ValueFrom.FieldRef, &validEnvDownwardAPIFieldPathExpressions, fldPath.Child("fieldRef"))...)
allErrs = append(allErrs, validateDownwardAPIHostIPs(ev.ValueFrom.FieldRef, fldPath.Child("fieldRef"), opts)...)
}
if ev.ValueFrom.ResourceFieldRef != nil {
numSources++
@ -2427,16 +2423,6 @@ func validateObjectFieldSelector(fs *core.ObjectFieldSelector, expressions *sets
return allErrs
}
func validateDownwardAPIHostIPs(fieldSel *core.ObjectFieldSelector, fldPath *field.Path, opts PodValidationOptions) field.ErrorList {
allErrs := field.ErrorList{}
if !opts.AllowHostIPsField {
if fieldSel.FieldPath == "status.hostIPs" {
allErrs = append(allErrs, field.Invalid(fldPath, "status.hostIPs", "not allowed when feature gate 'PodHostIPs' is not enabled"))
}
}
return allErrs
}
func validateContainerResourceFieldSelector(fs *core.ResourceFieldSelector, expressions *sets.String, prefixes *sets.String, fldPath *field.Path, volume bool) field.ErrorList {
allErrs := field.ErrorList{}
@ -3429,8 +3415,6 @@ type PodValidationOptions struct {
AllowExpandedDNSConfig bool
// Allow OSField to be set in the pod spec
AllowOSField bool
// Allow pod spec to use status.hostIPs in downward API
AllowHostIPsField bool
// Allow sysctl name to contain a slash
AllowSysctlRegexContainSlash bool
}

View File

@ -1802,22 +1802,6 @@ func (in *HostAlias) DeepCopy() *HostAlias {
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *HostIP) DeepCopyInto(out *HostIP) {
*out = *in
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HostIP.
func (in *HostIP) DeepCopy() *HostIP {
if in == nil {
return nil
}
out := new(HostIP)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *HostPathVolumeSource) DeepCopyInto(out *HostPathVolumeSource) {
*out = *in
@ -3990,11 +3974,6 @@ func (in *PodStatus) DeepCopyInto(out *PodStatus) {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
if in.HostIPs != nil {
in, out := &in.HostIPs, &out.HostIPs
*out = make([]HostIP, len(*in))
copy(*out, *in)
}
if in.PodIPs != nil {
in, out := &in.PodIPs, &out.PodIPs
*out = make([]PodIP, len(*in))

View File

@ -52,8 +52,6 @@ func addKnownTypes(scheme *runtime.Scheme) error {
&IngressList{},
&IngressClass{},
&IngressClassList{},
&ClusterCIDRConfig{},
&ClusterCIDRConfigList{},
)
return nil
}

View File

@ -585,61 +585,3 @@ type ServiceBackendPort struct {
// +optional
Number int32
}
// +genclient
// +genclient:nonNamespaced
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// ClusterCIDRConfig is the Schema for the clustercidrconfigs API.
type ClusterCIDRConfig struct {
metav1.TypeMeta
metav1.ObjectMeta
Spec ClusterCIDRConfigSpec
Status ClusterCIDRConfigStatus
}
// ClusterCIDRConfigSpec defines the desired state of ClusterCIDRConfig.
type ClusterCIDRConfigSpec struct {
// NodeSelector defines which nodes the config is applicable to.
// An empty or nil NodeSelector functions as a default that applies to all nodes.
// This field is immutable.
// +optional
NodeSelector *api.NodeSelector
// PerNodeHostBits defines the number of host bits to be configured per node.
// A subnet mask determines how much of the address is used for network bits
// and host bits. For example and IPv4 address of 192.168.0.0/24, splits the
// address into 24 bits for the network portion and 8 bits for the host portion.
// For a /24 mask for IPv4 or a /120 for IPv6, configure PerNodeHostBits=8
// This field is immutable.
// +optional
PerNodeHostBits int32
// IPv4CIDR defines an IPv4 IP block in CIDR notation(e.g. "10.0.0.0/8").
// This field is immutable.
// +optional
IPv4CIDR string
// IPv6CIDR defines an IPv6 IP block in CIDR notation(e.g. "fd12:3456:789a:1::/64").
// This field is immutable.
// +optional
IPv6CIDR string
}
// ClusterCIDRConfigStatus defines the observed state of ClusterCIDRConfig.
type ClusterCIDRConfigStatus struct {
}
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// ClusterCIDRConfigList contains a list of ClusterCIDRConfigs.
type ClusterCIDRConfigList struct {
metav1.TypeMeta
// +optional
metav1.ListMeta
// Items is the list of ClusterCIDRConfigs.
Items []ClusterCIDRConfig
}

View File

@ -28,104 +28,6 @@ import (
core "k8s.io/kubernetes/pkg/apis/core"
)
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ClusterCIDRConfig) DeepCopyInto(out *ClusterCIDRConfig) {
*out = *in
out.TypeMeta = in.TypeMeta
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
in.Spec.DeepCopyInto(&out.Spec)
out.Status = in.Status
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterCIDRConfig.
func (in *ClusterCIDRConfig) DeepCopy() *ClusterCIDRConfig {
if in == nil {
return nil
}
out := new(ClusterCIDRConfig)
in.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *ClusterCIDRConfig) DeepCopyObject() runtime.Object {
if c := in.DeepCopy(); c != nil {
return c
}
return nil
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ClusterCIDRConfigList) DeepCopyInto(out *ClusterCIDRConfigList) {
*out = *in
out.TypeMeta = in.TypeMeta
in.ListMeta.DeepCopyInto(&out.ListMeta)
if in.Items != nil {
in, out := &in.Items, &out.Items
*out = make([]ClusterCIDRConfig, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterCIDRConfigList.
func (in *ClusterCIDRConfigList) DeepCopy() *ClusterCIDRConfigList {
if in == nil {
return nil
}
out := new(ClusterCIDRConfigList)
in.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *ClusterCIDRConfigList) DeepCopyObject() runtime.Object {
if c := in.DeepCopy(); c != nil {
return c
}
return nil
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ClusterCIDRConfigSpec) DeepCopyInto(out *ClusterCIDRConfigSpec) {
*out = *in
if in.NodeSelector != nil {
in, out := &in.NodeSelector, &out.NodeSelector
*out = new(core.NodeSelector)
(*in).DeepCopyInto(*out)
}
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterCIDRConfigSpec.
func (in *ClusterCIDRConfigSpec) DeepCopy() *ClusterCIDRConfigSpec {
if in == nil {
return nil
}
out := new(ClusterCIDRConfigSpec)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ClusterCIDRConfigStatus) DeepCopyInto(out *ClusterCIDRConfigStatus) {
*out = *in
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterCIDRConfigStatus.
func (in *ClusterCIDRConfigStatus) DeepCopy() *ClusterCIDRConfigStatus {
if in == nil {
return nil
}
out := new(ClusterCIDRConfigStatus)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *HTTPIngressPath) DeepCopyInto(out *HTTPIngressPath) {
*out = *in

View File

@ -120,7 +120,7 @@ func (dk *BasicDockerKeyring) Add(cfg DockerConfig) {
// Update the index used to identify which credentials to use for a given
// image. The index is reverse-sorted so more specific paths are matched
// first. For example, if for the given image "quay.io/coreos/etcd",
// first. For example, if for the given image "gcr.io/etcd-development/etcd",
// credentials for "quay.io/coreos" should match before "quay.io".
sort.Sort(sort.Reverse(sort.StringSlice(dk.index)))
}

View File

@ -412,13 +412,6 @@ const (
// Enables ipv6 dual stack
IPv6DualStack featuregate.Feature = "IPv6DualStack"
// owner: @wzshiming
// kep: http://kep.k8s.io/2681
// alpha: v1.24
//
// Adds pod.status.hostIPs and downward API
PodHostIPs featuregate.Feature = "PodHostIPs"
// owner: @robscott @freehan
// kep: http://kep.k8s.io/752
// alpha: v1.16
@ -586,9 +579,10 @@ const (
// Allows control if NodePorts shall be created for services with "type: LoadBalancer" by defining the spec.AllocateLoadBalancerNodePorts field (bool)
ServiceLBNodePortControl featuregate.Feature = "ServiceLBNodePortControl"
// owner: @janosi
// owner: @janosi @bridgetkromhout
// kep: http://kep.k8s.io/1435
// alpha: v1.20
// beta: v1.24
//
// Enables the usage of different protocols in the same Service with type=LoadBalancer
MixedProtocolLBService featuregate.Feature = "MixedProtocolLBService"
@ -821,7 +815,6 @@ const (
// owner: @deepakkinni @xing-yang
// kep: http://kep.k8s.io/2680
// alpha: v1.23
// beta: v1.24
//
// Honor Persistent Volume Reclaim Policy when it is "Delete" irrespective of PV-PVC
// deletion ordering.
@ -882,6 +875,13 @@ const (
//
// Enables NetworkPolicy status subresource
NetworkPolicyStatus featuregate.Feature = "NetworkPolicyStatus"
// owner: @deejross
// kep: http://kep.k8s.io/3140
// alpha: v1.24
//
// Enables support for time zones in CronJobs.
CronJobTimeZone featuregate.Feature = "CronJobTimeZone"
)
func init() {
@ -936,14 +936,13 @@ var defaultKubernetesFeatureGates = map[featuregate.Feature]featuregate.FeatureS
ProcMountType: {Default: false, PreRelease: featuregate.Alpha},
TTLAfterFinished: {Default: true, PreRelease: featuregate.GA, LockToDefault: true}, // remove in 1.25
IndexedJob: {Default: true, PreRelease: featuregate.GA, LockToDefault: true}, // remove in 1.26
JobTrackingWithFinalizers: {Default: true, PreRelease: featuregate.Beta},
JobTrackingWithFinalizers: {Default: false, PreRelease: featuregate.Beta}, // Disabled due to #109485
JobReadyPods: {Default: true, PreRelease: featuregate.Beta},
KubeletPodResources: {Default: true, PreRelease: featuregate.Beta},
LocalStorageCapacityIsolationFSQuotaMonitoring: {Default: false, PreRelease: featuregate.Alpha},
NonPreemptingPriority: {Default: true, PreRelease: featuregate.GA, LockToDefault: true}, // remove in 1.25
PodOverhead: {Default: true, PreRelease: featuregate.GA, LockToDefault: true}, // remove in 1.26
IPv6DualStack: {Default: true, PreRelease: featuregate.GA, LockToDefault: true}, // remove in 1.25
PodHostIPs: {Default: false, PreRelease: featuregate.Alpha},
EndpointSlice: {Default: true, PreRelease: featuregate.GA, LockToDefault: true}, // remove in 1.25
EndpointSliceProxying: {Default: true, PreRelease: featuregate.GA, LockToDefault: true}, // remove in 1.25
EndpointSliceTerminatingCondition: {Default: true, PreRelease: featuregate.Beta},
@ -965,7 +964,7 @@ var defaultKubernetesFeatureGates = map[featuregate.Feature]featuregate.FeatureS
GracefulNodeShutdown: {Default: true, PreRelease: featuregate.Beta},
GracefulNodeShutdownBasedOnPodPriority: {Default: true, PreRelease: featuregate.Beta},
ServiceLBNodePortControl: {Default: true, PreRelease: featuregate.GA, LockToDefault: true}, // remove in 1.26
MixedProtocolLBService: {Default: false, PreRelease: featuregate.Alpha},
MixedProtocolLBService: {Default: true, PreRelease: featuregate.Beta},
VolumeCapacityPriority: {Default: false, PreRelease: featuregate.Alpha},
PreferNominatedNode: {Default: true, PreRelease: featuregate.GA, LockToDefault: true}, // remove in 1.25
ProbeTerminationGracePeriod: {Default: false, PreRelease: featuregate.Beta}, // Default to false in beta 1.22, set to true in 1.24
@ -1000,7 +999,7 @@ var defaultKubernetesFeatureGates = map[featuregate.Feature]featuregate.FeatureS
JobMutableNodeSchedulingDirectives: {Default: true, PreRelease: featuregate.Beta},
IdentifyPodOS: {Default: true, PreRelease: featuregate.Beta},
PodAndContainerStatsFromCRI: {Default: false, PreRelease: featuregate.Alpha},
HonorPVReclaimPolicy: {Default: true, PreRelease: featuregate.Beta},
HonorPVReclaimPolicy: {Default: false, PreRelease: featuregate.Alpha},
RecoverVolumeExpansionFailure: {Default: false, PreRelease: featuregate.Alpha},
GRPCContainerProbe: {Default: true, PreRelease: featuregate.Beta},
LegacyServiceAccountTokenNoAutoGeneration: {Default: true, PreRelease: featuregate.Beta},
@ -1009,6 +1008,7 @@ var defaultKubernetesFeatureGates = map[featuregate.Feature]featuregate.FeatureS
NodeOutOfServiceVolumeDetach: {Default: false, PreRelease: featuregate.Alpha},
MaxUnavailableStatefulSet: {Default: false, PreRelease: featuregate.Alpha},
NetworkPolicyStatus: {Default: false, PreRelease: featuregate.Alpha},
CronJobTimeZone: {Default: false, PreRelease: featuregate.Alpha},
// inherited features from generic apiserver, relisted here to get a conflict if it is changed
// unintentionally on either side:
@ -1021,7 +1021,7 @@ var defaultKubernetesFeatureGates = map[featuregate.Feature]featuregate.FeatureS
genericfeatures.OpenAPIEnums: {Default: true, PreRelease: featuregate.Beta},
genericfeatures.CustomResourceValidationExpressions: {Default: false, PreRelease: featuregate.Alpha},
genericfeatures.OpenAPIV3: {Default: true, PreRelease: featuregate.Beta},
genericfeatures.ServerSideFieldValidation: {Default: true, PreRelease: featuregate.Beta},
genericfeatures.ServerSideFieldValidation: {Default: false, PreRelease: featuregate.Alpha},
// features that enable backwards compatibility but are scheduled to be removed
// ...
HPAScaleToZero: {Default: false, PreRelease: featuregate.Alpha},

View File

@ -130,7 +130,7 @@ func NewKubeletServerCertificateManager(kubeClient clientset.Interface, kubeCfg
return nil, fmt.Errorf("failed to initialize server certificate manager: %v", err)
}
legacyregistry.RawMustRegister(compbasemetrics.NewGaugeFunc(
compbasemetrics.GaugeOpts{
&compbasemetrics.GaugeOpts{
Subsystem: metrics.KubeletSubsystem,
Name: "certificate_manager_server_ttl_seconds",
Help: "Gauge of the shortest TTL (time-to-live) of " +

View File

@ -826,19 +826,6 @@ func (kl *Kubelet) podFieldSelectorRuntimeValue(fs *v1.ObjectFieldSelector, pod
return "", err
}
return hostIPs[0].String(), nil
case "status.hostIPs":
if !utilfeature.DefaultFeatureGate.Enabled(features.PodHostIPs) {
return "", nil
}
hostIPs, err := kl.getHostIPsAnyWay()
if err != nil {
return "", err
}
ips := make([]string, 0, len(hostIPs))
for _, ip := range hostIPs {
ips = append(ips, ip.String())
}
return strings.Join(ips, ","), nil
case "status.podIP":
return podIP, nil
case "status.podIPs":
@ -1530,13 +1517,6 @@ func (kl *Kubelet) generateAPIPodStatus(pod *v1.Pod, podStatus *kubecontainer.Po
klog.V(4).InfoS("Cannot get host IPs", "err", err)
} else {
s.HostIP = hostIPs[0].String()
if utilfeature.DefaultFeatureGate.Enabled(features.PodHostIPs) {
ips := make([]v1.HostIP, 0, len(hostIPs))
for _, hostIP := range hostIPs {
ips = append(ips, v1.HostIP{IP: hostIP.String()})
}
s.HostIPs = ips
}
// HostNetwork Pods inherit the node IPs as PodIPs. They are immutable once set,
// other than that if the node becomes dual-stack, we add the secondary IP.
if kubecontainer.IsHostNetworkPod(pod) {

View File

@ -343,7 +343,7 @@ func (dswp *desiredStateOfWorldPopulator) checkVolumeFSResize(
volumeSpec *volume.Spec,
uniquePodName volumetypes.UniquePodName,
mountedVolumesForPod map[volumetypes.UniquePodName]map[string]cache.MountedVolume) {
if podVolume.PersistentVolumeClaim == nil {
if podVolume.PersistentVolumeClaim == nil || pvc == nil {
// Only PVC supports resize operation.
return
}

View File

@ -38,9 +38,11 @@ import (
"k8s.io/apimachinery/pkg/types"
"k8s.io/apimachinery/pkg/util/sets"
"k8s.io/apimachinery/pkg/util/wait"
utilfeature "k8s.io/apiserver/pkg/util/feature"
"k8s.io/client-go/tools/events"
utilsysctl "k8s.io/component-helpers/node/util/sysctl"
"k8s.io/klog/v2"
"k8s.io/kubernetes/pkg/features"
"k8s.io/kubernetes/pkg/proxy"
"k8s.io/kubernetes/pkg/proxy/healthcheck"
"k8s.io/kubernetes/pkg/proxy/metaproxier"
@ -115,11 +117,11 @@ const sysctlBridgeCallIPTables = "net/bridge/bridge-nf-call-iptables"
type serviceInfo struct {
*proxy.BaseServiceInfo
// The following fields are computed and stored for performance reasons.
serviceNameString string
servicePortChainName utiliptables.Chain
serviceLocalChainName utiliptables.Chain
serviceFirewallChainName utiliptables.Chain
serviceLBChainName utiliptables.Chain
nameString string
clusterPolicyChainName utiliptables.Chain
localPolicyChainName utiliptables.Chain
firewallChainName utiliptables.Chain
externalChainName utiliptables.Chain
}
// returns a new proxy.ServicePort which abstracts a serviceInfo
@ -130,11 +132,11 @@ func newServiceInfo(port *v1.ServicePort, service *v1.Service, baseInfo *proxy.B
svcName := types.NamespacedName{Namespace: service.Namespace, Name: service.Name}
svcPortName := proxy.ServicePortName{NamespacedName: svcName, Port: port.Name}
protocol := strings.ToLower(string(info.Protocol()))
info.serviceNameString = svcPortName.String()
info.servicePortChainName = servicePortChainName(info.serviceNameString, protocol)
info.serviceLocalChainName = serviceLocalChainName(info.serviceNameString, protocol)
info.serviceFirewallChainName = serviceFirewallChainName(info.serviceNameString, protocol)
info.serviceLBChainName = serviceLBChainName(info.serviceNameString, protocol)
info.nameString = svcPortName.String()
info.clusterPolicyChainName = servicePortPolicyClusterChain(info.nameString, protocol)
info.localPolicyChainName = servicePortPolicyLocalChainName(info.nameString, protocol)
info.firewallChainName = serviceFirewallChainName(info.nameString, protocol)
info.externalChainName = serviceExternalChainName(info.nameString, protocol)
return info
}
@ -684,25 +686,28 @@ func portProtoHash(servicePortName string, protocol string) string {
}
const (
servicePortChainNamePrefix = "KUBE-SVC-"
serviceLocalChainNamePrefix = "KUBE-SVL-"
serviceFirewallChainNamePrefix = "KUBE-FW-"
serviceLBChainNamePrefix = "KUBE-XLB-"
servicePortEndpointChainNamePrefix = "KUBE-SEP-"
servicePortPolicyClusterChainNamePrefix = "KUBE-SVC-"
servicePortPolicyLocalChainNamePrefix = "KUBE-SVL-"
serviceFirewallChainNamePrefix = "KUBE-FW-"
serviceExternalChainNamePrefix = "KUBE-EXT-"
servicePortEndpointChainNamePrefix = "KUBE-SEP-"
// For cleanup. This can be removed after 1.26 is released.
deprecatedServiceLBChainNamePrefix = "KUBE-XLB-"
)
// servicePortChainName returns the name of the KUBE-SVC-XXXX chain for a service, which is the
// servicePortPolicyClusterChain returns the name of the KUBE-SVC-XXXX chain for a service, which is the
// main iptables chain for that service, used for dispatching to endpoints when using `Cluster`
// traffic policy.
func servicePortChainName(servicePortName string, protocol string) utiliptables.Chain {
return utiliptables.Chain(servicePortChainNamePrefix + portProtoHash(servicePortName, protocol))
func servicePortPolicyClusterChain(servicePortName string, protocol string) utiliptables.Chain {
return utiliptables.Chain(servicePortPolicyClusterChainNamePrefix + portProtoHash(servicePortName, protocol))
}
// serviceLocalChainName returns the name of the KUBE-SVL-XXXX chain for a service, which
// servicePortPolicyLocalChainName returns the name of the KUBE-SVL-XXXX chain for a service, which
// handles dispatching to local endpoints when using `Local` traffic policy. This chain only
// exists if the service has `Local` internal or external traffic policy.
func serviceLocalChainName(servicePortName string, protocol string) utiliptables.Chain {
return utiliptables.Chain(serviceLocalChainNamePrefix + portProtoHash(servicePortName, protocol))
func servicePortPolicyLocalChainName(servicePortName string, protocol string) utiliptables.Chain {
return utiliptables.Chain(servicePortPolicyLocalChainNamePrefix + portProtoHash(servicePortName, protocol))
}
// serviceFirewallChainName returns the name of the KUBE-FW-XXXX chain for a service, which
@ -711,12 +716,12 @@ func serviceFirewallChainName(servicePortName string, protocol string) utiliptab
return utiliptables.Chain(serviceFirewallChainNamePrefix + portProtoHash(servicePortName, protocol))
}
// serviceLBChainName returns the name of the KUBE-XLB-XXXX chain for a service, which
// implements "short-circuiting" for internally-originated load balancer traffic when using
// `Local` external traffic policy. It forwards traffic from local sources to the KUBE-SVC-XXXX
// serviceExternalChainName returns the name of the KUBE-EXT-XXXX chain for a service, which
// implements "short-circuiting" for internally-originated external-destination traffic when using
// `Local` external traffic policy. It forwards traffic from local sources to the KUBE-SVC-XXXX
// chain and traffic from external sources to the KUBE-SVL-XXXX chain.
func serviceLBChainName(servicePortName string, protocol string) utiliptables.Chain {
return utiliptables.Chain(serviceLBChainNamePrefix + portProtoHash(servicePortName, protocol))
func serviceExternalChainName(servicePortName string, protocol string) utiliptables.Chain {
return utiliptables.Chain(serviceExternalChainNamePrefix + portProtoHash(servicePortName, protocol))
}
// servicePortEndpointChainName returns the name of the KUBE-SEP-XXXX chain for a particular
@ -729,11 +734,12 @@ func servicePortEndpointChainName(servicePortName string, protocol string, endpo
func isServiceChainName(chainString string) bool {
prefixes := []string{
servicePortChainNamePrefix,
serviceLocalChainNamePrefix,
servicePortPolicyClusterChainNamePrefix,
servicePortPolicyLocalChainNamePrefix,
servicePortEndpointChainNamePrefix,
serviceFirewallChainNamePrefix,
serviceLBChainNamePrefix,
serviceExternalChainNamePrefix,
deprecatedServiceLBChainNamePrefix,
}
for _, p := range prefixes {
@ -989,16 +995,20 @@ func (proxier *Proxier) syncProxyRules() {
}
}
// Build rules for each service.
// These two variables are used to publish the sync_proxy_rules_no_endpoints_total
// metric.
serviceNoLocalEndpointsTotalInternal := 0
serviceNoLocalEndpointsTotalExternal := 0
// Build rules for each service-port.
for svcName, svc := range proxier.serviceMap {
svcInfo, ok := svc.(*serviceInfo)
if !ok {
klog.ErrorS(nil, "Failed to cast serviceInfo", "serviceName", svcName)
continue
}
isIPv6 := netutils.IsIPv6(svcInfo.ClusterIP())
protocol := strings.ToLower(string(svcInfo.Protocol()))
svcNameString := svcInfo.serviceNameString
svcNameString := svcInfo.nameString
allEndpoints := proxier.endpointsMap[svcName]
@ -1042,80 +1052,108 @@ func (proxier *Proxier) syncProxyRules() {
proxier.natRules.Write(args)
}
policyClusterChain := svcInfo.servicePortChainName
policyLocalChain := svcInfo.serviceLocalChainName
svcXlbChain := svcInfo.serviceLBChainName
// These chains represent the sets of endpoints to use when internal or
// external traffic policy is "Cluster" vs "Local".
clusterPolicyChain := svcInfo.clusterPolicyChainName
localPolicyChain := svcInfo.localPolicyChainName
internalTrafficChain := policyClusterChain
externalTrafficChain := policyClusterChain
if svcInfo.NodeLocalInternal() {
internalTrafficChain = policyLocalChain
// These chains designate which policy chain to use for internal- and
// external-destination traffic.
internalPolicyChain := clusterPolicyChain
externalPolicyChain := clusterPolicyChain
if svcInfo.InternalPolicyLocal() {
internalPolicyChain = localPolicyChain
}
if svcInfo.NodeLocalExternal() {
externalTrafficChain = svcXlbChain
if svcInfo.ExternalPolicyLocal() {
externalPolicyChain = localPolicyChain
}
// These chains are where *ALL* rules which match traffic that is
// service-destined should jump. ClusterIP traffic is considered
// "internal" while NodePort, LoadBalancer, and ExternalIPs traffic is
// considered "external".
internalTrafficChain := internalPolicyChain
externalTrafficChain := svcInfo.externalChainName // eventually jumps to externalPolicyChain
// Declare the clusterPolicyChain if needed.
if hasEndpoints && svcInfo.UsesClusterEndpoints() {
// Create the Cluster traffic policy chain, retaining counters if possible.
if chain, ok := existingNATChains[policyClusterChain]; ok {
if chain, ok := existingNATChains[clusterPolicyChain]; ok {
proxier.natChains.WriteBytes(chain)
} else {
proxier.natChains.Write(utiliptables.MakeChainLine(policyClusterChain))
proxier.natChains.Write(utiliptables.MakeChainLine(clusterPolicyChain))
}
activeNATChains[policyClusterChain] = true
}
if hasEndpoints && svcInfo.ExternallyAccessible() && svcInfo.NodeLocalExternal() {
if chain, ok := existingNATChains[svcXlbChain]; ok {
proxier.natChains.WriteBytes(chain)
} else {
proxier.natChains.Write(utiliptables.MakeChainLine(svcXlbChain))
}
activeNATChains[svcXlbChain] = true
// The XLB chain redirects all pod -> external VIP
// traffic to the Service's ClusterIP instead. This happens
// whether or not we have local endpoints; only if localDetector
// is implemented
if proxier.localDetector.IsImplemented() {
proxier.natRules.Write(
"-A", string(svcXlbChain),
"-m", "comment", "--comment",
`"Redirect pods trying to reach external loadbalancer VIP to clusterIP"`,
proxier.localDetector.IfLocal(),
"-j", string(policyClusterChain))
}
// Next, redirect all src-type=LOCAL -> LB IP to the service chain
// for externalTrafficPolicy=Local This allows traffic originating
// from the host to be redirected to the service correctly,
// otherwise traffic to LB IPs are dropped if there are no local
// endpoints.
proxier.natRules.Write(
"-A", string(svcXlbChain),
"-m", "comment", "--comment", fmt.Sprintf(`"masquerade LOCAL traffic for %s LB IP"`, svcNameString),
"-m", "addrtype", "--src-type", "LOCAL",
"-j", string(KubeMarkMasqChain))
proxier.natRules.Write(
"-A", string(svcXlbChain),
"-m", "comment", "--comment", fmt.Sprintf(`"route LOCAL traffic for %s LB IP to service chain"`, svcNameString),
"-m", "addrtype", "--src-type", "LOCAL",
"-j", string(policyClusterChain))
// Everything else goes to the SVL chain
proxier.natRules.Write(
"-A", string(svcXlbChain),
"-j", string(policyLocalChain))
activeNATChains[clusterPolicyChain] = true
}
// Declare the localPolicyChain if needed.
if hasEndpoints && svcInfo.UsesLocalEndpoints() {
if chain, ok := existingNATChains[policyLocalChain]; ok {
if chain, ok := existingNATChains[localPolicyChain]; ok {
proxier.natChains.WriteBytes(chain)
} else {
proxier.natChains.Write(utiliptables.MakeChainLine(policyLocalChain))
proxier.natChains.Write(utiliptables.MakeChainLine(localPolicyChain))
}
activeNATChains[policyLocalChain] = true
activeNATChains[localPolicyChain] = true
}
// If any "external" destinations are enabled, set up external traffic
// handling. All captured traffic for all external destinations should
// jump to externalTrafficChain, which will handle some special-cases
// and then jump to externalPolicyChain.
if hasEndpoints && svcInfo.ExternallyAccessible() {
if chain, ok := existingNATChains[externalTrafficChain]; ok {
proxier.natChains.WriteBytes(chain)
} else {
proxier.natChains.Write(utiliptables.MakeChainLine(externalTrafficChain))
}
activeNATChains[externalTrafficChain] = true
if !svcInfo.ExternalPolicyLocal() {
// If we are using non-local endpoints we need to masquerade,
// in case we cross nodes.
proxier.natRules.Write(
"-A", string(externalTrafficChain),
"-m", "comment", "--comment", fmt.Sprintf(`"masquerade traffic for %s external destinations"`, svcNameString),
"-j", string(KubeMarkMasqChain))
} else {
// If we are only using same-node endpoints, we can retain the
// source IP in most cases.
if proxier.localDetector.IsImplemented() {
// Treat all locally-originated pod -> external destination
// traffic as a special-case. It is subject to neither
// form of traffic policy, which simulates going up-and-out
// to an external load-balancer and coming back in.
proxier.natRules.Write(
"-A", string(externalTrafficChain),
"-m", "comment", "--comment", fmt.Sprintf(`"pod traffic for %s external destinations"`, svcNameString),
proxier.localDetector.IfLocal(),
"-j", string(clusterPolicyChain))
}
// Locally originated traffic (not a pod, but the host node)
// still needs masquerade because the LBIP itself is a local
// address, so that will be the chosen source IP.
proxier.natRules.Write(
"-A", string(externalTrafficChain),
"-m", "comment", "--comment", fmt.Sprintf(`"masquerade LOCAL traffic for %s external destinations"`, svcNameString),
"-m", "addrtype", "--src-type", "LOCAL",
"-j", string(KubeMarkMasqChain))
// Redirect all src-type=LOCAL -> external destination to the
// policy=cluster chain. This allows traffic originating
// from the host to be redirected to the service correctly.
proxier.natRules.Write(
"-A", string(externalTrafficChain),
"-m", "comment", "--comment", fmt.Sprintf(`"route LOCAL traffic for %s external destinations"`, svcNameString),
"-m", "addrtype", "--src-type", "LOCAL",
"-j", string(clusterPolicyChain))
}
// Anything else falls thru to the appropriate policy chain.
proxier.natRules.Write(
"-A", string(externalTrafficChain),
"-j", string(externalPolicyChain))
}
// Capture the clusterIP.
@ -1161,37 +1199,14 @@ func (proxier *Proxier) syncProxyRules() {
// Capture externalIPs.
for _, externalIP := range svcInfo.ExternalIPStrings() {
if hasEndpoints {
args = append(args[:0],
// Send traffic bound for external IPs to the "external
// destinations" chain.
proxier.natRules.Write(
"-A", string(kubeServicesChain),
"-m", "comment", "--comment", fmt.Sprintf(`"%s external IP"`, svcNameString),
"-m", protocol, "-p", protocol,
"-d", externalIP,
"--dport", strconv.Itoa(svcInfo.Port()),
)
// We have to SNAT packets to external IPs if externalTrafficPolicy is cluster
// and the traffic is NOT Local. Local traffic coming from Pods and Nodes will
// be always forwarded to the corresponding Service, so no need to SNAT
// If we can't differentiate the local traffic we always SNAT.
if !svcInfo.NodeLocalExternal() {
appendTo := []string{"-A", string(policyClusterChain)}
// This masquerades off-cluster traffic to a External IP.
if proxier.localDetector.IsImplemented() {
proxier.natRules.Write(
appendTo,
args,
proxier.localDetector.IfNotLocal(),
"-j", string(KubeMarkMasqChain))
} else {
proxier.natRules.Write(
appendTo,
args,
"-j", string(KubeMarkMasqChain))
}
}
// Send traffic bound for external IPs to the service chain.
proxier.natRules.Write(
"-A", string(kubeServicesChain),
args,
"-j", string(externalTrafficChain))
} else {
@ -1208,45 +1223,48 @@ func (proxier *Proxier) syncProxyRules() {
}
// Capture load-balancer ingress.
fwChain := svcInfo.serviceFirewallChainName
for _, ingress := range svcInfo.LoadBalancerIPStrings() {
if hasEndpoints {
// create service firewall chain
if len(svcInfo.LoadBalancerIPStrings()) > 0 && hasEndpoints {
// Normally we send LB matches to the "external destination" chain.
nextChain := externalTrafficChain
// If the service specifies any LB source ranges, we need to insert
// a firewall chain first.
if len(svcInfo.LoadBalancerSourceRanges()) > 0 {
fwChain := svcInfo.firewallChainName
// Declare the service firewall chain.
if chain, ok := existingNATChains[fwChain]; ok {
proxier.natChains.WriteBytes(chain)
} else {
proxier.natChains.Write(utiliptables.MakeChainLine(fwChain))
}
activeNATChains[fwChain] = true
// The service firewall rules are created based on ServiceSpec.loadBalancerSourceRanges field.
// This currently works for loadbalancers that preserves source ips.
// For loadbalancers which direct traffic to service NodePort, the firewall rules will not apply.
args = append(args[:0],
// The firewall chain will jump to the "external destination"
// chain.
nextChain = svcInfo.firewallChainName
}
for _, lbip := range svcInfo.LoadBalancerIPStrings() {
proxier.natRules.Write(
"-A", string(kubeServicesChain),
"-m", "comment", "--comment", fmt.Sprintf(`"%s loadbalancer IP"`, svcNameString),
"-m", protocol, "-p", protocol,
"-d", ingress,
"-d", lbip,
"--dport", strconv.Itoa(svcInfo.Port()),
)
// jump to service firewall chain
proxier.natRules.Write(args, "-j", string(fwChain))
"-j", string(nextChain))
args = append(args[:0],
"-A", string(fwChain),
"-m", "comment", "--comment", fmt.Sprintf(`"%s loadbalancer IP"`, svcNameString),
)
// The service firewall rules are created based on the
// loadBalancerSourceRanges field. This only works for
// VIP-like loadbalancers that preserve source IPs. For
// loadbalancers which direct traffic to service NodePort, the
// firewall rules will not apply.
if len(svcInfo.LoadBalancerSourceRanges()) > 0 {
args = append(args[:0],
"-A", string(nextChain),
"-m", "comment", "--comment", fmt.Sprintf(`"%s loadbalancer IP"`, svcNameString),
)
// If we are proxying globally, we need to masquerade in case we cross nodes.
// If we are proxying only locally, we can retain the source IP.
if !svcInfo.NodeLocalExternal() {
proxier.natRules.Write(args, "-j", string(KubeMarkMasqChain))
}
if len(svcInfo.LoadBalancerSourceRanges()) == 0 {
// allow all sources, so jump directly to the KUBE-SVC or KUBE-XLB chain
proxier.natRules.Write(args, "-j", string(externalTrafficChain))
} else {
// firewall filter based on each source range
allowFromNode := false
for _, src := range svcInfo.LoadBalancerSourceRanges() {
@ -1258,67 +1276,48 @@ func (proxier *Proxier) syncProxyRules() {
allowFromNode = true
}
}
// generally, ip route rule was added to intercept request to loadbalancer vip from the
// loadbalancer's backend hosts. In this case, request will not hit the loadbalancer but loop back directly.
// Need to add the following rule to allow request on host.
// For VIP-like LBs, the VIP is often added as a local
// address (via an IP route rule). In that case, a request
// from a node to the VIP will not hit the loadbalancer but
// will loop back with the source IP set to the VIP. We
// need the following rule to allow requests from this node.
if allowFromNode {
proxier.natRules.Write(
args,
"-s", ingress,
"-s", lbip,
"-j", string(externalTrafficChain))
}
// If the packet was able to reach the end of firewall chain,
// then it did not get DNATed. It means the packet cannot go
// thru the firewall, then mark it for DROP.
proxier.natRules.Write(args, "-j", string(KubeMarkDropChain))
}
// If the packet was able to reach the end of firewall chain, then it did not get DNATed.
// It means the packet cannot go thru the firewall, then mark it for DROP
proxier.natRules.Write(args, "-j", string(KubeMarkDropChain))
} else {
// No endpoints.
}
} else {
// No endpoints.
for _, lbip := range svcInfo.LoadBalancerIPStrings() {
proxier.filterRules.Write(
"-A", string(kubeExternalServicesChain),
"-m", "comment", "--comment", fmt.Sprintf(`"%s has no endpoints"`, svcNameString),
"-m", protocol, "-p", protocol,
"-d", ingress,
"-d", lbip,
"--dport", strconv.Itoa(svcInfo.Port()),
"-j", "REJECT",
)
}
}
// Capture nodeports. If we had more than 2 rules it might be
// worthwhile to make a new per-service chain for nodeport rules, but
// with just 2 rules it ends up being a waste and a cognitive burden.
// Capture nodeports.
if svcInfo.NodePort() != 0 && len(nodeAddresses) != 0 {
if hasEndpoints {
args = append(args[:0],
// Jump to the external destination chain. For better or for
// worse, nodeports are not subect to loadBalancerSourceRanges,
// and we can't change that.
proxier.natRules.Write(
"-A", string(kubeNodePortsChain),
"-m", "comment", "--comment", svcNameString,
"-m", protocol, "-p", protocol,
"--dport", strconv.Itoa(svcInfo.NodePort()),
)
if !svcInfo.NodeLocalExternal() {
// Nodeports need SNAT, unless they're local.
proxier.natRules.Write(
"-A", string(policyClusterChain),
args,
"-j", string(KubeMarkMasqChain))
} else {
// TODO: Make all nodePorts jump to the firewall chain.
// Currently we only create it for loadbalancers (#33586).
// Fix localhost martian source error
loopback := "127.0.0.0/8"
if isIPv6 {
loopback = "::1/128"
}
proxier.natRules.Write(
"-A", string(kubeNodePortsChain),
args,
"-s", loopback, "-j", string(KubeMarkMasqChain))
}
// Jump to the service chain.
proxier.natRules.Write(
"-A", string(kubeNodePortsChain),
args,
"-j", string(externalTrafficChain))
} else {
// No endpoints.
@ -1347,24 +1346,32 @@ func (proxier *Proxier) syncProxyRules() {
}
if svcInfo.UsesClusterEndpoints() {
// Write rules jumping from policyClusterChain to clusterEndpoints
proxier.writeServiceToEndpointRules(svcNameString, svcInfo, policyClusterChain, clusterEndpoints, args)
// Write rules jumping from clusterPolicyChain to clusterEndpoints
proxier.writeServiceToEndpointRules(svcNameString, svcInfo, clusterPolicyChain, clusterEndpoints, args)
}
if svcInfo.UsesLocalEndpoints() {
if len(localEndpoints) != 0 {
// Write rules jumping from policyLocalChain to localEndpointChains
proxier.writeServiceToEndpointRules(svcNameString, svcInfo, policyLocalChain, localEndpoints, args)
} else if hasEndpoints {
// Blackhole all traffic since there are no local endpoints
args = append(args[:0],
"-A", string(policyLocalChain),
"-m", "comment", "--comment",
fmt.Sprintf(`"%s has no local endpoints"`, svcNameString),
"-j",
string(KubeMarkDropChain),
)
proxier.natRules.Write(args)
// Write rules jumping from localPolicyChain to localEndpointChains
proxier.writeServiceToEndpointRules(svcNameString, svcInfo, localPolicyChain, localEndpoints, args)
} else {
if svcInfo.InternalPolicyLocal() && utilfeature.DefaultFeatureGate.Enabled(features.ServiceInternalTrafficPolicy) {
serviceNoLocalEndpointsTotalInternal++
}
if svcInfo.ExternalPolicyLocal() {
serviceNoLocalEndpointsTotalExternal++
}
if hasEndpoints {
// Blackhole all traffic since there are no local endpoints
args = append(args[:0],
"-A", string(localPolicyChain),
"-m", "comment", "--comment",
fmt.Sprintf(`"%s has no local endpoints"`, svcNameString),
"-j",
string(KubeMarkDropChain),
)
proxier.natRules.Write(args)
}
}
}
}
@ -1388,14 +1395,12 @@ func (proxier *Proxier) syncProxyRules() {
// Finally, tail-call to the nodeports chain. This needs to be after all
// other service portal rules.
for address := range nodeAddresses {
// TODO(thockin, m1093782566): If/when we have dual-stack support we will want to distinguish v4 from v6 zero-CIDRs.
if utilproxy.IsZeroCIDR(address) {
args = append(args[:0],
proxier.natRules.Write(
"-A", string(kubeServicesChain),
"-m", "comment", "--comment", `"kubernetes service nodeports; NOTE: this must be the last rule in this chain"`,
"-m", "addrtype", "--dst-type", "LOCAL",
"-j", string(kubeNodePortsChain))
proxier.natRules.Write(args)
// Nothing else matters after the zero CIDR.
break
}
@ -1405,12 +1410,11 @@ func (proxier *Proxier) syncProxyRules() {
continue
}
// create nodeport rules for each IP one by one
args = append(args[:0],
proxier.natRules.Write(
"-A", string(kubeServicesChain),
"-m", "comment", "--comment", `"kubernetes service nodeports; NOTE: this must be the last rule in this chain"`,
"-d", address,
"-j", string(kubeNodePortsChain))
proxier.natRules.Write(args)
}
// Drop the packets in INVALID state, which would potentially cause
@ -1489,6 +1493,8 @@ func (proxier *Proxier) syncProxyRules() {
}
}
metrics.SyncProxyRulesNoLocalEndpointsTotal.WithLabelValues("internal").Set(float64(serviceNoLocalEndpointsTotalInternal))
metrics.SyncProxyRulesNoLocalEndpointsTotal.WithLabelValues("external").Set(float64(serviceNoLocalEndpointsTotalExternal))
if proxier.healthzServer != nil {
proxier.healthzServer.Updated()
}
@ -1532,10 +1538,12 @@ func (proxier *Proxier) writeServiceToEndpointRules(svcNameString string, svcInf
if !ok {
continue
}
comment := fmt.Sprintf(`"%s -> %s"`, svcNameString, epInfo.Endpoint)
args = append(args[:0],
"-A", string(svcChain),
)
args = proxier.appendServiceCommentLocked(args, svcNameString)
args = proxier.appendServiceCommentLocked(args, comment)
args = append(args,
"-m", "recent", "--name", string(epInfo.ChainName),
"--rcheck", "--seconds", strconv.Itoa(svcInfo.StickyMaxAgeSeconds()), "--reap",
@ -1552,9 +1560,10 @@ func (proxier *Proxier) writeServiceToEndpointRules(svcNameString string, svcInf
if !ok {
continue
}
comment := fmt.Sprintf(`"%s -> %s"`, svcNameString, epInfo.Endpoint)
args = append(args[:0], "-A", string(svcChain))
args = proxier.appendServiceCommentLocked(args, svcNameString)
args = proxier.appendServiceCommentLocked(args, comment)
if i < (numEndpoints - 1) {
// Each rule is a probabilistic match.
args = append(args,

View File

@ -273,6 +273,20 @@ type Proxier struct {
// Inject for test purpose.
networkInterfacer utilproxy.NetworkInterfacer
gracefuldeleteManager *GracefulTerminationManager
// serviceNoLocalEndpointsInternal represents the set of services that couldn't be applied
// due to the absence of local endpoints when the internal traffic policy is "Local".
// It is used to publish the sync_proxy_rules_no_endpoints_total
// metric with the traffic_policy label set to "internal".
// sets.String is used here since we end up calculating endpoint topology multiple times for the same Service
// if it has multiple ports but each Service should only be counted once.
serviceNoLocalEndpointsInternal sets.String
// serviceNoLocalEndpointsExternal irepresents the set of services that couldn't be applied
// due to the absence of any endpoints when the external traffic policy is "Local".
// It is used to publish the sync_proxy_rules_no_endpoints_total
// metric with the traffic_policy label set to "external".
// sets.String is used here since we end up calculating endpoint topology multiple times for the same Service
// if it has multiple ports but each Service should only be counted once.
serviceNoLocalEndpointsExternal sets.String
}
// IPGetter helps get node network interface IP and IPs binded to the IPVS dummy interface
@ -1027,6 +1041,8 @@ func (proxier *Proxier) syncProxyRules() {
klog.V(3).InfoS("Syncing ipvs proxier rules")
proxier.serviceNoLocalEndpointsInternal = sets.NewString()
proxier.serviceNoLocalEndpointsExternal = sets.NewString()
// Begin install iptables
// Reset all buffers used later.
@ -1202,7 +1218,7 @@ func (proxier *Proxier) syncProxyRules() {
// ExternalTrafficPolicy only works for NodePort and external LB traffic, does not affect ClusterIP
// So we still need clusterIP rules in onlyNodeLocalEndpoints mode.
internalNodeLocal := false
if utilfeature.DefaultFeatureGate.Enabled(features.ServiceInternalTrafficPolicy) && svcInfo.NodeLocalInternal() {
if utilfeature.DefaultFeatureGate.Enabled(features.ServiceInternalTrafficPolicy) && svcInfo.InternalPolicyLocal() {
internalNodeLocal = true
}
if err := proxier.syncEndpoint(svcName, internalNodeLocal, serv); err != nil {
@ -1222,7 +1238,7 @@ func (proxier *Proxier) syncProxyRules() {
SetType: utilipset.HashIPPort,
}
if svcInfo.NodeLocalExternal() {
if svcInfo.ExternalPolicyLocal() {
if valid := proxier.ipsetList[kubeExternalIPLocalSet].validateEntry(entry); !valid {
klog.ErrorS(nil, "Error adding entry to ipset", "entry", entry, "ipset", proxier.ipsetList[kubeExternalIPLocalSet].Name)
continue
@ -1252,7 +1268,7 @@ func (proxier *Proxier) syncProxyRules() {
activeIPVSServices[serv.String()] = true
activeBindAddrs[serv.Address.String()] = true
if err := proxier.syncEndpoint(svcName, svcInfo.NodeLocalExternal(), serv); err != nil {
if err := proxier.syncEndpoint(svcName, svcInfo.ExternalPolicyLocal(), serv); err != nil {
klog.ErrorS(err, "Failed to sync endpoint for service", "serviceName", svcName, "virtualServer", serv)
}
} else {
@ -1279,7 +1295,7 @@ func (proxier *Proxier) syncProxyRules() {
}
proxier.ipsetList[kubeLoadBalancerSet].activeEntries.Insert(entry.String())
// insert loadbalancer entry to lbIngressLocalSet if service externaltrafficpolicy=local
if svcInfo.NodeLocalExternal() {
if svcInfo.ExternalPolicyLocal() {
if valid := proxier.ipsetList[kubeLoadBalancerLocalSet].validateEntry(entry); !valid {
klog.ErrorS(nil, "Error adding entry to ipset", "entry", entry, "ipset", proxier.ipsetList[kubeLoadBalancerLocalSet].Name)
continue
@ -1351,7 +1367,7 @@ func (proxier *Proxier) syncProxyRules() {
if err := proxier.syncService(svcNameString, serv, true, bindedAddresses); err == nil {
activeIPVSServices[serv.String()] = true
activeBindAddrs[serv.Address.String()] = true
if err := proxier.syncEndpoint(svcName, svcInfo.NodeLocalExternal(), serv); err != nil {
if err := proxier.syncEndpoint(svcName, svcInfo.ExternalPolicyLocal(), serv); err != nil {
klog.ErrorS(err, "Failed to sync endpoint for service", "serviceName", svcName, "virtualServer", serv)
}
} else {
@ -1449,7 +1465,7 @@ func (proxier *Proxier) syncProxyRules() {
}
// Add externaltrafficpolicy=local type nodeport entry
if svcInfo.NodeLocalExternal() {
if svcInfo.ExternalPolicyLocal() {
var nodePortLocalSet *IPSet
switch protocol {
case utilipset.ProtocolTCP:
@ -1494,7 +1510,7 @@ func (proxier *Proxier) syncProxyRules() {
// There is no need to bind Node IP to dummy interface, so set parameter `bindAddr` to `false`.
if err := proxier.syncService(svcNameString, serv, false, bindedAddresses); err == nil {
activeIPVSServices[serv.String()] = true
if err := proxier.syncEndpoint(svcName, svcInfo.NodeLocalExternal(), serv); err != nil {
if err := proxier.syncEndpoint(svcName, svcInfo.ExternalPolicyLocal(), serv); err != nil {
klog.ErrorS(err, "Failed to sync endpoint for service", "serviceName", svcName, "virtualServer", serv)
}
} else {
@ -1599,6 +1615,9 @@ func (proxier *Proxier) syncProxyRules() {
}
}
proxier.deleteEndpointConnections(endpointUpdateResult.StaleEndpoints)
metrics.SyncProxyRulesNoLocalEndpointsTotal.WithLabelValues("internal").Set(float64(proxier.serviceNoLocalEndpointsInternal.Len()))
metrics.SyncProxyRulesNoLocalEndpointsTotal.WithLabelValues("external").Set(float64(proxier.serviceNoLocalEndpointsExternal.Len()))
}
// writeIptablesRules write all iptables rules to proxier.natRules or proxier.FilterRules that ipvs proxier needed
@ -1980,6 +1999,14 @@ func (proxier *Proxier) syncEndpoint(svcPortName proxy.ServicePortName, onlyNode
// Traffic from an external source will be routed but the reply
// will have the POD address and will be discarded.
endpoints = clusterEndpoints
if svcInfo.InternalPolicyLocal() && utilfeature.DefaultFeatureGate.Enabled(features.ServiceInternalTrafficPolicy) {
proxier.serviceNoLocalEndpointsInternal.Insert(svcPortName.NamespacedName.String())
}
if svcInfo.ExternalPolicyLocal() {
proxier.serviceNoLocalEndpointsExternal.Insert(svcPortName.NamespacedName.String())
}
}
} else {
endpoints = clusterEndpoints

View File

@ -148,6 +148,19 @@ var (
StabilityLevel: metrics.ALPHA,
},
)
// SyncProxyRulesNoLocalEndpointsTotal is the total number of rules that do
// not have an available endpoint. This can be caused by an internal
// traffic policy with no available local workload.
SyncProxyRulesNoLocalEndpointsTotal = metrics.NewGaugeVec(
&metrics.GaugeOpts{
Subsystem: kubeProxySubsystem,
Name: "sync_proxy_rules_no_local_endpoints_total",
Help: "Number of services with a Local traffic policy and no endpoints",
StabilityLevel: metrics.ALPHA,
},
[]string{"traffic_policy"},
)
)
var registerMetricsOnce sync.Once
@ -165,6 +178,7 @@ func RegisterMetrics() {
legacyregistry.MustRegister(IptablesRulesTotal)
legacyregistry.MustRegister(IptablesRestoreFailuresTotal)
legacyregistry.MustRegister(SyncProxyRulesLastQueuedTimestamp)
legacyregistry.MustRegister(SyncProxyRulesNoLocalEndpointsTotal)
})
}

View File

@ -52,8 +52,8 @@ type BaseServiceInfo struct {
externalIPs []string
loadBalancerSourceRanges []string
healthCheckNodePort int
nodeLocalExternal bool
nodeLocalInternal bool
externalPolicyLocal bool
internalPolicyLocal bool
internalTrafficPolicy *v1.ServiceInternalTrafficPolicyType
hintsAnnotation string
}
@ -119,14 +119,14 @@ func (info *BaseServiceInfo) LoadBalancerIPStrings() []string {
return ips
}
// NodeLocalExternal is part of ServicePort interface.
func (info *BaseServiceInfo) NodeLocalExternal() bool {
return info.nodeLocalExternal
// ExternalPolicyLocal is part of ServicePort interface.
func (info *BaseServiceInfo) ExternalPolicyLocal() bool {
return info.externalPolicyLocal
}
// NodeLocalInternal is part of ServicePort interface
func (info *BaseServiceInfo) NodeLocalInternal() bool {
return info.nodeLocalInternal
// InternalPolicyLocal is part of ServicePort interface
func (info *BaseServiceInfo) InternalPolicyLocal() bool {
return info.internalPolicyLocal
}
// InternalTrafficPolicy is part of ServicePort interface
@ -149,22 +149,22 @@ func (info *BaseServiceInfo) UsesClusterEndpoints() bool {
// The service port uses Cluster endpoints if the internal traffic policy is "Cluster",
// or if it accepts external traffic at all. (Even if the external traffic policy is
// "Local", we need Cluster endpoints to implement short circuiting.)
return !info.nodeLocalInternal || info.ExternallyAccessible()
return !info.internalPolicyLocal || info.ExternallyAccessible()
}
// UsesLocalEndpoints is part of ServicePort interface.
func (info *BaseServiceInfo) UsesLocalEndpoints() bool {
return info.nodeLocalInternal || (info.nodeLocalExternal && info.ExternallyAccessible())
return info.internalPolicyLocal || (info.externalPolicyLocal && info.ExternallyAccessible())
}
func (sct *ServiceChangeTracker) newBaseServiceInfo(port *v1.ServicePort, service *v1.Service) *BaseServiceInfo {
nodeLocalExternal := false
if apiservice.RequestsOnlyLocalTraffic(service) {
nodeLocalExternal = true
externalPolicyLocal := false
if apiservice.ExternalPolicyLocal(service) {
externalPolicyLocal = true
}
nodeLocalInternal := false
internalPolicyLocal := false
if utilfeature.DefaultFeatureGate.Enabled(features.ServiceInternalTrafficPolicy) {
nodeLocalInternal = apiservice.RequestsOnlyLocalTrafficForInternal(service)
internalPolicyLocal = apiservice.InternalPolicyLocal(service)
}
var stickyMaxAgeSeconds int
if service.Spec.SessionAffinity == v1.ServiceAffinityClientIP {
@ -180,8 +180,8 @@ func (sct *ServiceChangeTracker) newBaseServiceInfo(port *v1.ServicePort, servic
nodePort: int(port.NodePort),
sessionAffinityType: service.Spec.SessionAffinity,
stickyMaxAgeSeconds: stickyMaxAgeSeconds,
nodeLocalExternal: nodeLocalExternal,
nodeLocalInternal: nodeLocalInternal,
externalPolicyLocal: externalPolicyLocal,
internalPolicyLocal: internalPolicyLocal,
internalTrafficPolicy: service.Spec.InternalTrafficPolicy,
hintsAnnotation: service.Annotations[v1.AnnotationTopologyAwareHints],
}

View File

@ -83,10 +83,10 @@ type ServicePort interface {
HealthCheckNodePort() int
// GetNodePort returns a service Node port if present. If return 0, it means not present.
NodePort() int
// NodeLocalExternal returns if a service has only node local endpoints for external traffic.
NodeLocalExternal() bool
// NodeLocalInternal returns if a service has only node local endpoints for internal traffic.
NodeLocalInternal() bool
// ExternalPolicyLocal returns if a service has only node local endpoints for external traffic.
ExternalPolicyLocal() bool
// InternalPolicyLocal returns if a service has only node local endpoints for internal traffic.
InternalPolicyLocal() bool
// InternalTrafficPolicy returns service InternalTrafficPolicy
InternalTrafficPolicy() *v1.ServiceInternalTrafficPolicyType
// HintsAnnotation returns the value of the v1.AnnotationTopologyAwareHints annotation.

View File

@ -83,7 +83,7 @@ func (s *preFilterState) Clone() framework.StateData {
// failed by this plugin schedulable.
func (pl *NodeAffinity) EventsToRegister() []framework.ClusterEvent {
return []framework.ClusterEvent{
{Resource: framework.Node, ActionType: framework.Add | framework.UpdateNodeLabel},
{Resource: framework.Node, ActionType: framework.Add | framework.Update},
}
}

View File

@ -43,7 +43,7 @@ const (
// failed by this plugin schedulable.
func (pl *NodeName) EventsToRegister() []framework.ClusterEvent {
return []framework.ClusterEvent{
{Resource: framework.Node, ActionType: framework.Add},
{Resource: framework.Node, ActionType: framework.Add | framework.Update},
}
}

View File

@ -105,7 +105,7 @@ func (pl *NodePorts) EventsToRegister() []framework.ClusterEvent {
return []framework.ClusterEvent{
// Due to immutable fields `spec.containers[*].ports`, pod update events are ignored.
{Resource: framework.Pod, ActionType: framework.Delete},
{Resource: framework.Node, ActionType: framework.Add},
{Resource: framework.Node, ActionType: framework.Add | framework.Update},
}
}

View File

@ -207,7 +207,7 @@ func getPreFilterState(cycleState *framework.CycleState) (*preFilterState, error
func (f *Fit) EventsToRegister() []framework.ClusterEvent {
return []framework.ClusterEvent{
{Resource: framework.Pod, ActionType: framework.Delete},
{Resource: framework.Node, ActionType: framework.Add | framework.UpdateNodeAllocatable},
{Resource: framework.Node, ActionType: framework.Add | framework.Update},
}
}

View File

@ -56,7 +56,7 @@ func (pl *TaintToleration) Name() string {
// failed by this plugin schedulable.
func (pl *TaintToleration) EventsToRegister() []framework.ClusterEvent {
return []framework.ClusterEvent{
{Resource: framework.Node, ActionType: framework.Add | framework.UpdateNodeTaint},
{Resource: framework.Node, ActionType: framework.Add | framework.Update},
}
}
@ -76,8 +76,7 @@ func (pl *TaintToleration) Filter(ctx context.Context, state *framework.CycleSta
return nil
}
errReason := fmt.Sprintf("node(s) had taint {%s: %s}, that the pod didn't tolerate",
taint.Key, taint.Value)
errReason := fmt.Sprintf("node(s) had untolerated taint {%s: %s}", taint.Key, taint.Value)
return framework.NewStatus(framework.UnschedulableAndUnresolvable, errReason)
}

View File

@ -870,9 +870,14 @@ func (npm *nominator) add(pi *framework.PodInfo, nominatingInfo *framework.Nomin
}
if npm.podLister != nil {
// If the pod is not alive, don't contain it.
if _, err := npm.podLister.Pods(pi.Pod.Namespace).Get(pi.Pod.Name); err != nil {
klog.V(4).InfoS("Pod doesn't exist in podLister, aborting adding it to the nominator", "pod", klog.KObj(pi.Pod))
// If the pod was removed or if it was already scheduled, don't nominate it.
updatedPod, err := npm.podLister.Pods(pi.Pod.Namespace).Get(pi.Pod.Name)
if err != nil {
klog.V(4).InfoS("Pod doesn't exist in podLister, aborted adding it to the nominator", "pod", klog.KObj(pi.Pod))
return
}
if updatedPod.Spec.NodeName != "" {
klog.V(4).InfoS("Pod is already scheduled to a node, aborted adding it to the nominator", "pod", klog.KObj(pi.Pod), "node", updatedPod.Spec.NodeName)
return
}
}

View File

@ -1485,7 +1485,7 @@ func (og *operationGenerator) GenerateVerifyControllerAttachedVolumeFunc(
claimSize := actualStateOfWorld.GetClaimSize(volumeToMount.VolumeName)
// only fetch claimSize if it was not set previously
if volumeToMount.VolumeSpec.PersistentVolume != nil && claimSize == nil {
if volumeToMount.VolumeSpec.PersistentVolume != nil && claimSize == nil && !volumeToMount.VolumeSpec.InlineVolumeSpecForCSIMigration {
pv := volumeToMount.VolumeSpec.PersistentVolume
pvc, err := og.kubeClient.CoreV1().PersistentVolumeClaims(pv.Spec.ClaimRef.Namespace).Get(context.TODO(), pv.Spec.ClaimRef.Name, metav1.GetOptions{})
if err != nil {

View File

@ -226,6 +226,7 @@ github.com/go-ozzo/ozzo-validation/is
# github.com/godbus/dbus/v5 v5.0.6
github.com/godbus/dbus/v5
# github.com/gofrs/uuid v4.0.0+incompatible
## explicit
github.com/gofrs/uuid
# github.com/gogo/protobuf v1.3.2
github.com/gogo/protobuf/gogoproto
@ -845,7 +846,7 @@ gopkg.in/warnings.v0
gopkg.in/yaml.v2
# gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b
gopkg.in/yaml.v3
# k8s.io/api v0.24.0-beta.0 => k8s.io/api v0.24.0-beta.0
# k8s.io/api v0.25.0-alpha.0 => k8s.io/api v0.25.0-alpha.0
## explicit
k8s.io/api/admission/v1
k8s.io/api/admission/v1beta1
@ -879,7 +880,6 @@ k8s.io/api/flowcontrol/v1alpha1
k8s.io/api/flowcontrol/v1beta1
k8s.io/api/flowcontrol/v1beta2
k8s.io/api/networking/v1
k8s.io/api/networking/v1alpha1
k8s.io/api/networking/v1beta1
k8s.io/api/node/v1
k8s.io/api/node/v1alpha1
@ -895,7 +895,7 @@ k8s.io/api/scheduling/v1beta1
k8s.io/api/storage/v1
k8s.io/api/storage/v1alpha1
k8s.io/api/storage/v1beta1
# k8s.io/apimachinery v0.24.0-beta.0 => k8s.io/apimachinery v0.24.0-beta.0
# k8s.io/apimachinery v0.25.0-alpha.0 => k8s.io/apimachinery v0.25.0-alpha.0
## explicit
k8s.io/apimachinery/pkg/api/equality
k8s.io/apimachinery/pkg/api/errors
@ -955,7 +955,7 @@ 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/apiserver v0.24.0-beta.0 => k8s.io/apiserver v0.24.0-beta.0
# k8s.io/apiserver v0.25.0-alpha.0 => k8s.io/apiserver v0.25.0-alpha.0
## explicit
k8s.io/apiserver/pkg/admission
k8s.io/apiserver/pkg/admission/configuration
@ -1083,7 +1083,7 @@ k8s.io/apiserver/plugin/pkg/audit/truncate
k8s.io/apiserver/plugin/pkg/audit/webhook
k8s.io/apiserver/plugin/pkg/authenticator/token/webhook
k8s.io/apiserver/plugin/pkg/authorizer/webhook
# k8s.io/client-go v0.24.0-beta.0 => k8s.io/client-go v0.24.0-beta.0
# k8s.io/client-go v0.25.0-alpha.0 => k8s.io/client-go v0.25.0-alpha.0
## explicit
k8s.io/client-go/applyconfigurations/admissionregistration/v1
k8s.io/client-go/applyconfigurations/admissionregistration/v1beta1
@ -1113,7 +1113,6 @@ k8s.io/client-go/applyconfigurations/flowcontrol/v1beta2
k8s.io/client-go/applyconfigurations/internal
k8s.io/client-go/applyconfigurations/meta/v1
k8s.io/client-go/applyconfigurations/networking/v1
k8s.io/client-go/applyconfigurations/networking/v1alpha1
k8s.io/client-go/applyconfigurations/networking/v1beta1
k8s.io/client-go/applyconfigurations/node/v1
k8s.io/client-go/applyconfigurations/node/v1alpha1
@ -1177,7 +1176,6 @@ k8s.io/client-go/informers/flowcontrol/v1beta2
k8s.io/client-go/informers/internalinterfaces
k8s.io/client-go/informers/networking
k8s.io/client-go/informers/networking/v1
k8s.io/client-go/informers/networking/v1alpha1
k8s.io/client-go/informers/networking/v1beta1
k8s.io/client-go/informers/node
k8s.io/client-go/informers/node/v1
@ -1261,8 +1259,6 @@ k8s.io/client-go/kubernetes/typed/flowcontrol/v1beta2
k8s.io/client-go/kubernetes/typed/flowcontrol/v1beta2/fake
k8s.io/client-go/kubernetes/typed/networking/v1
k8s.io/client-go/kubernetes/typed/networking/v1/fake
k8s.io/client-go/kubernetes/typed/networking/v1alpha1
k8s.io/client-go/kubernetes/typed/networking/v1alpha1/fake
k8s.io/client-go/kubernetes/typed/networking/v1beta1
k8s.io/client-go/kubernetes/typed/networking/v1beta1/fake
k8s.io/client-go/kubernetes/typed/node/v1
@ -1319,7 +1315,6 @@ k8s.io/client-go/listers/flowcontrol/v1alpha1
k8s.io/client-go/listers/flowcontrol/v1beta1
k8s.io/client-go/listers/flowcontrol/v1beta2
k8s.io/client-go/listers/networking/v1
k8s.io/client-go/listers/networking/v1alpha1
k8s.io/client-go/listers/networking/v1beta1
k8s.io/client-go/listers/node/v1
k8s.io/client-go/listers/node/v1alpha1
@ -1385,7 +1380,7 @@ k8s.io/client-go/util/homedir
k8s.io/client-go/util/keyutil
k8s.io/client-go/util/retry
k8s.io/client-go/util/workqueue
# k8s.io/cloud-provider v0.24.0-beta.0 => k8s.io/cloud-provider v0.24.0-beta.0
# k8s.io/cloud-provider v0.25.0-alpha.0 => k8s.io/cloud-provider v0.25.0-alpha.0
## explicit
k8s.io/cloud-provider
k8s.io/cloud-provider/api
@ -1395,7 +1390,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.24.0-beta.0 => k8s.io/component-base v0.24.0-beta.0
# k8s.io/component-base v0.25.0-alpha.0 => k8s.io/component-base v0.25.0-alpha.0
## explicit
k8s.io/component-base/cli/flag
k8s.io/component-base/codec
@ -1417,7 +1412,7 @@ k8s.io/component-base/metrics/testutil
k8s.io/component-base/traces
k8s.io/component-base/version
k8s.io/component-base/version/verflag
# k8s.io/component-helpers v0.24.0-beta.0 => k8s.io/component-helpers v0.24.0-beta.0
# k8s.io/component-helpers v0.25.0-alpha.0 => k8s.io/component-helpers v0.25.0-alpha.0
## explicit
k8s.io/component-helpers/apimachinery/lease
k8s.io/component-helpers/node/topology
@ -1427,12 +1422,12 @@ k8s.io/component-helpers/scheduling/corev1
k8s.io/component-helpers/scheduling/corev1/nodeaffinity
k8s.io/component-helpers/storage/ephemeral
k8s.io/component-helpers/storage/volume
# k8s.io/cri-api v0.0.0 => k8s.io/cri-api v0.24.0-beta.0
# k8s.io/cri-api v0.0.0 => k8s.io/cri-api v0.25.0-alpha.0
k8s.io/cri-api/pkg/apis
k8s.io/cri-api/pkg/apis/runtime/v1
k8s.io/cri-api/pkg/apis/runtime/v1alpha2
k8s.io/cri-api/pkg/errors
# k8s.io/csi-translation-lib v0.24.0-beta.0 => k8s.io/csi-translation-lib v0.24.0-beta.0
# k8s.io/csi-translation-lib v0.25.0-alpha.0 => k8s.io/csi-translation-lib v0.25.0-alpha.0
k8s.io/csi-translation-lib
k8s.io/csi-translation-lib/plugins
# k8s.io/klog/v2 v2.60.1
@ -1458,15 +1453,15 @@ k8s.io/kube-openapi/pkg/spec3
k8s.io/kube-openapi/pkg/util
k8s.io/kube-openapi/pkg/util/proto
k8s.io/kube-openapi/pkg/validation/spec
# k8s.io/kube-proxy v0.0.0 => k8s.io/kube-proxy v0.24.0-beta.0
# k8s.io/kube-proxy v0.0.0 => k8s.io/kube-proxy v0.25.0-alpha.0
k8s.io/kube-proxy/config/v1alpha1
# k8s.io/kube-scheduler v0.0.0 => k8s.io/kube-scheduler v0.24.0-beta.0
# k8s.io/kube-scheduler v0.0.0 => k8s.io/kube-scheduler v0.25.0-alpha.0
k8s.io/kube-scheduler/config/v1beta2
k8s.io/kube-scheduler/config/v1beta3
k8s.io/kube-scheduler/extender/v1
# k8s.io/kubectl v0.0.0 => k8s.io/kubectl v0.24.0-beta.0
# k8s.io/kubectl v0.0.0 => k8s.io/kubectl v0.25.0-alpha.0
k8s.io/kubectl/pkg/scale
# k8s.io/kubelet v0.23.0 => k8s.io/kubelet v0.24.0-beta.0
# k8s.io/kubelet v0.23.0 => k8s.io/kubelet v0.25.0-alpha.0
## explicit
k8s.io/kubelet/config/v1alpha1
k8s.io/kubelet/config/v1beta1
@ -1480,7 +1475,7 @@ k8s.io/kubelet/pkg/apis/pluginregistration/v1
k8s.io/kubelet/pkg/apis/podresources/v1
k8s.io/kubelet/pkg/apis/podresources/v1alpha1
k8s.io/kubelet/pkg/apis/stats/v1alpha1
# k8s.io/kubernetes v1.24.0-beta.0
# k8s.io/kubernetes v1.25.0-alpha.0
## explicit
k8s.io/kubernetes/cmd/kube-proxy/app
k8s.io/kubernetes/cmd/kubelet/app
@ -1755,7 +1750,7 @@ k8s.io/kubernetes/pkg/volume/vsphere_volume
k8s.io/kubernetes/pkg/windows/service
k8s.io/kubernetes/test/utils
k8s.io/kubernetes/third_party/forked/golang/expansion
# k8s.io/legacy-cloud-providers v0.0.0 => k8s.io/legacy-cloud-providers v0.24.0-beta.0
# k8s.io/legacy-cloud-providers v0.0.0 => k8s.io/legacy-cloud-providers v0.25.0-alpha.0
## explicit
k8s.io/legacy-cloud-providers/aws
k8s.io/legacy-cloud-providers/azure
@ -1799,7 +1794,7 @@ k8s.io/legacy-cloud-providers/openstack
k8s.io/legacy-cloud-providers/vsphere
k8s.io/legacy-cloud-providers/vsphere/vclib
k8s.io/legacy-cloud-providers/vsphere/vclib/diskmanagers
# k8s.io/mount-utils v0.24.0-beta.0 => k8s.io/mount-utils v0.24.0-beta.0
# k8s.io/mount-utils v0.25.0-alpha.0 => k8s.io/mount-utils v0.25.0-alpha.0
k8s.io/mount-utils
# k8s.io/utils v0.0.0-20220210201930-3a6ce19ff2f9
## explicit
@ -1886,30 +1881,30 @@ sigs.k8s.io/yaml
# github.com/aws/aws-sdk-go/service/eks => github.com/aws/aws-sdk-go/service/eks v1.38.49
# github.com/digitalocean/godo => github.com/digitalocean/godo v1.27.0
# github.com/rancher/go-rancher => github.com/rancher/go-rancher v0.1.0
# k8s.io/api => k8s.io/api v0.24.0-beta.0
# k8s.io/apiextensions-apiserver => k8s.io/apiextensions-apiserver v0.24.0-beta.0
# k8s.io/apimachinery => k8s.io/apimachinery v0.24.0-beta.0
# k8s.io/apiserver => k8s.io/apiserver v0.24.0-beta.0
# k8s.io/cli-runtime => k8s.io/cli-runtime v0.24.0-beta.0
# k8s.io/client-go => k8s.io/client-go v0.24.0-beta.0
# k8s.io/cloud-provider => k8s.io/cloud-provider v0.24.0-beta.0
# k8s.io/cluster-bootstrap => k8s.io/cluster-bootstrap v0.24.0-beta.0
# k8s.io/code-generator => k8s.io/code-generator v0.24.0-beta.0
# k8s.io/component-base => k8s.io/component-base v0.24.0-beta.0
# k8s.io/component-helpers => k8s.io/component-helpers v0.24.0-beta.0
# k8s.io/controller-manager => k8s.io/controller-manager v0.24.0-beta.0
# k8s.io/cri-api => k8s.io/cri-api v0.24.0-beta.0
# k8s.io/csi-translation-lib => k8s.io/csi-translation-lib v0.24.0-beta.0
# k8s.io/kube-aggregator => k8s.io/kube-aggregator v0.24.0-beta.0
# k8s.io/kube-controller-manager => k8s.io/kube-controller-manager v0.24.0-beta.0
# k8s.io/kube-proxy => k8s.io/kube-proxy v0.24.0-beta.0
# k8s.io/kube-scheduler => k8s.io/kube-scheduler v0.24.0-beta.0
# k8s.io/kubectl => k8s.io/kubectl v0.24.0-beta.0
# k8s.io/kubelet => k8s.io/kubelet v0.24.0-beta.0
# k8s.io/legacy-cloud-providers => k8s.io/legacy-cloud-providers v0.24.0-beta.0
# k8s.io/metrics => k8s.io/metrics v0.24.0-beta.0
# k8s.io/mount-utils => k8s.io/mount-utils v0.24.0-beta.0
# k8s.io/sample-apiserver => k8s.io/sample-apiserver v0.24.0-beta.0
# k8s.io/sample-cli-plugin => k8s.io/sample-cli-plugin v0.24.0-beta.0
# k8s.io/sample-controller => k8s.io/sample-controller v0.24.0-beta.0
# k8s.io/pod-security-admission => k8s.io/pod-security-admission v0.24.0-beta.0
# k8s.io/api => k8s.io/api v0.25.0-alpha.0
# k8s.io/apiextensions-apiserver => k8s.io/apiextensions-apiserver v0.25.0-alpha.0
# k8s.io/apimachinery => k8s.io/apimachinery v0.25.0-alpha.0
# k8s.io/apiserver => k8s.io/apiserver v0.25.0-alpha.0
# k8s.io/cli-runtime => k8s.io/cli-runtime v0.25.0-alpha.0
# k8s.io/client-go => k8s.io/client-go v0.25.0-alpha.0
# k8s.io/cloud-provider => k8s.io/cloud-provider v0.25.0-alpha.0
# k8s.io/cluster-bootstrap => k8s.io/cluster-bootstrap v0.25.0-alpha.0
# k8s.io/code-generator => k8s.io/code-generator v0.25.0-alpha.0
# k8s.io/component-base => k8s.io/component-base v0.25.0-alpha.0
# k8s.io/component-helpers => k8s.io/component-helpers v0.25.0-alpha.0
# k8s.io/controller-manager => k8s.io/controller-manager v0.25.0-alpha.0
# k8s.io/cri-api => k8s.io/cri-api v0.25.0-alpha.0
# k8s.io/csi-translation-lib => k8s.io/csi-translation-lib v0.25.0-alpha.0
# k8s.io/kube-aggregator => k8s.io/kube-aggregator v0.25.0-alpha.0
# k8s.io/kube-controller-manager => k8s.io/kube-controller-manager v0.25.0-alpha.0
# k8s.io/kube-proxy => k8s.io/kube-proxy v0.25.0-alpha.0
# k8s.io/kube-scheduler => k8s.io/kube-scheduler v0.25.0-alpha.0
# k8s.io/kubectl => k8s.io/kubectl v0.25.0-alpha.0
# k8s.io/kubelet => k8s.io/kubelet v0.25.0-alpha.0
# k8s.io/legacy-cloud-providers => k8s.io/legacy-cloud-providers v0.25.0-alpha.0
# k8s.io/metrics => k8s.io/metrics v0.25.0-alpha.0
# k8s.io/mount-utils => k8s.io/mount-utils v0.25.0-alpha.0
# k8s.io/sample-apiserver => k8s.io/sample-apiserver v0.25.0-alpha.0
# k8s.io/sample-cli-plugin => k8s.io/sample-cli-plugin v0.25.0-alpha.0
# k8s.io/sample-controller => k8s.io/sample-controller v0.25.0-alpha.0
# k8s.io/pod-security-admission => k8s.io/pod-security-admission v0.25.0-alpha.0

Some files were not shown because too many files have changed in this diff Show More